3
* Declaration of SVC Helper Process control routines.
7
* Copyright (C) 2006-2007 Oracle Corporation
9
* This file is part of VirtualBox Open Source Edition (OSE), as
10
* available from http://www.virtualbox.org. This file is free software;
11
* you can redistribute it and/or modify it under the terms of the GNU
12
* General Public License (GPL) as published by the Free Software
13
* Foundation, in version 2 as it comes in the "COPYING" file of the
14
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18
#ifndef __VBox_svchlp_h__
19
#define __VBox_svchlp_h__
21
#include "VBox/com/string.h"
22
#include "VBox/com/guid.h"
32
Null = 0, /* no parameters */
33
OK, /* no parameters */
34
Error, /* Utf8Str string (may be null but must present) */
36
CreateHostOnlyNetworkInterface = 100, /* see usage in code */
37
CreateHostOnlyNetworkInterface_OK, /* see usage in code */
38
RemoveHostOnlyNetworkInterface, /* see usage in code */
39
EnableDynamicIpConfig, /* see usage in code */
40
EnableStaticIpConfig, /* see usage in code */
41
EnableStaticIpConfigV6, /* see usage in code */
42
DhcpRediscover, /* see usage in code */
51
virtual ~SVCHlpClient();
53
int create (const char *aName);
55
int open (const char *aName);
58
bool isOpen() const { return mIsOpen; }
59
bool isServer() const { return mIsServer; }
60
const com::Utf8Str &name() const { return mName; }
62
int write (const void *aVal, size_t aLen);
63
template <typename Scalar>
64
int write (Scalar aVal) { return write (&aVal, sizeof (aVal)); }
65
int write (const com::Utf8Str &aVal);
66
int write (const com::Guid &aGuid);
68
int read (void *aVal, size_t aLen);
69
template <typename Scalar>
70
int read (Scalar &aVal) { return read (&aVal, sizeof (aVal)); }
71
int read (com::Utf8Str &aVal);
72
int read (com::Guid &aGuid);
84
class SVCHlpServer : public SVCHlpClient
93
#endif /* __VBox_svchlp_h__ */