VirtualBox

source: vbox/trunk/src/VBox/Main/include/VirtualBoxImpl.h@ 96888

Last change on this file since 96888 was 96407, checked in by vboxsync, 3 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.7 KB
Line 
1/* $Id: VirtualBoxImpl.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_VirtualBoxImpl_h
29#define MAIN_INCLUDED_VirtualBoxImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <VBox/VBoxCryptoIf.h>
35
36#include "VirtualBoxBase.h"
37#include "objectslist.h"
38#include "VirtualBoxWrap.h"
39
40#ifdef RT_OS_WINDOWS
41# include "win/resource.h"
42#endif
43
44//#ifdef DEBUG_bird
45//# define VBOXSVC_WITH_CLIENT_WATCHER
46//#endif
47
48namespace com
49{
50 class Event;
51 class EventQueue;
52}
53
54class SessionMachine;
55class GuestOSType;
56class Progress;
57class Host;
58class SystemProperties;
59class DHCPServer;
60class PerformanceCollector;
61class CloudProviderManager;
62#ifdef VBOX_WITH_EXTPACK
63class ExtPackManager;
64#endif
65class AutostartDb;
66class NATNetwork;
67#ifdef VBOX_WITH_CLOUD_NET
68class CloudNetwork;
69#endif /* VBOX_WITH_CLOUD_NET */
70
71
72typedef std::list<ComObjPtr<SessionMachine> > SessionMachinesList;
73
74#ifdef RT_OS_WINDOWS
75class SVCHlpClient;
76#endif
77
78namespace settings
79{
80 class MainConfigFile;
81 struct MediaRegistry;
82}
83
84
85#if defined(VBOX_WITH_SDS) && !defined(VBOX_WITH_XPCOM)
86class VirtualBoxClassFactory; /* See ../src-server/win/svcmain.cpp */
87#endif
88
89class ATL_NO_VTABLE VirtualBox :
90 public VirtualBoxWrap
91#ifdef RT_OS_WINDOWS
92 , public ATL::CComCoClass<VirtualBox, &CLSID_VirtualBox>
93#endif
94{
95
96public:
97
98 typedef std::list<ComPtr<IInternalSessionControl> > InternalControlList;
99 typedef ObjectsList<Machine> MachinesOList;
100
101#if 0 /* obsoleted by AsyncEvent */
102 class CallbackEvent;
103 friend class CallbackEvent;
104#endif
105 class AsyncEvent;
106 friend class AsyncEvent;
107
108#ifndef VBOX_WITH_XPCOM
109# ifdef VBOX_WITH_SDS
110 DECLARE_CLASSFACTORY_EX(VirtualBoxClassFactory)
111# else
112 DECLARE_CLASSFACTORY_SINGLETON(VirtualBox)
113# endif
114#endif
115
116 // Do not use any ATL registry support.
117 //DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX)
118
119 // Kind of redundant (VirtualBoxWrap declares itself not aggregatable and
120 // CComCoClass<VirtualBox, &CLSID_VirtualBox> as aggregatable, the former
121 // is the first inheritance), but the C++ multiple inheritance rules and
122 // the class factory in svcmain.cpp needs this to disambiguate.
123 DECLARE_NOT_AGGREGATABLE(VirtualBox)
124
125 // to postpone generation of the default ctor/dtor
126 DECLARE_COMMON_CLASS_METHODS(VirtualBox)
127
128 HRESULT FinalConstruct();
129 void FinalRelease();
130
131 // public initializer/uninitializer for internal purposes only
132 HRESULT init();
133 HRESULT initMachines();
134 HRESULT initMedia(const Guid &uuidMachineRegistry,
135 const settings::MediaRegistry &mediaRegistry,
136 const Utf8Str &strMachineFolder);
137 void uninit();
138
139 // public methods only for internal purposes
140
141 /**
142 * Override of the default locking class to be used for validating lock
143 * order with the standard member lock handle.
144 */
145 virtual VBoxLockingClass getLockingClass() const
146 {
147 return LOCKCLASS_VIRTUALBOXOBJECT;
148 }
149
150#ifdef DEBUG
151 void i_dumpAllBackRefs();
152#endif
153
154 HRESULT i_postEvent(Event *event);
155
156 HRESULT i_addProgress(IProgress *aProgress);
157 HRESULT i_removeProgress(IN_GUID aId);
158
159#ifdef RT_OS_WINDOWS
160 typedef HRESULT (*PFN_SVC_HELPER_CLIENT_T)(SVCHlpClient *aClient, Progress *aProgress, void *aUser, int *aVrc);
161 HRESULT i_startSVCHelperClient(bool aPrivileged,
162 PFN_SVC_HELPER_CLIENT_T aFunc,
163 void *aUser, Progress *aProgress);
164#endif
165
166 void i_addProcessToReap(RTPROCESS pid);
167 void i_updateClientWatcher();
168
169 int i_loadVDPlugin(const char *pszPluginLibrary);
170 int i_unloadVDPlugin(const char *pszPluginLibrary);
171
172 void i_onMediumRegistered(const Guid &aMediumId, const DeviceType_T aDevType, BOOL aRegistered);
173 void i_onMediumConfigChanged(IMedium *aMedium);
174 void i_onMediumChanged(IMediumAttachment* aMediumAttachment);
175 void i_onStorageControllerChanged(const Guid &aMachineId, const com::Utf8Str &aControllerName);
176 void i_onStorageDeviceChanged(IMediumAttachment* aStorageDevice, BOOL fRemoved, BOOL fSilent);
177 void i_onMachineStateChanged(const Guid &aId, MachineState_T aState);
178 void i_onMachineDataChanged(const Guid &aId, BOOL aTemporary = FALSE);
179 BOOL i_onExtraDataCanChange(const Guid &aId, const Utf8Str &aKey, const Utf8Str &aValue, Bstr &aError);
180 void i_onExtraDataChanged(const Guid &aId, const Utf8Str &aKey, const Utf8Str &aValue);
181 void i_onMachineRegistered(const Guid &aId, BOOL aRegistered);
182 void i_onSessionStateChanged(const Guid &aId, SessionState_T aState);
183
184 void i_onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId);
185 void i_onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId);
186 void i_onSnapshotRestored(const Guid &aMachineId, const Guid &aSnapshotId);
187 void i_onSnapshotChanged(const Guid &aMachineId, const Guid &aSnapshotId);
188
189 void i_onGuestPropertyChanged(const Guid &aMachineId, const Utf8Str &aName, const Utf8Str &aValue, const Utf8Str &aFlags,
190 const BOOL fWasDeleted);
191 void i_onNatRedirectChanged(const Guid &aMachineId, ULONG ulSlot, bool fRemove, const Utf8Str &aName,
192 NATProtocol_T aProto, const Utf8Str &aHostIp, uint16_t aHostPort,
193 const Utf8Str &aGuestIp, uint16_t aGuestPort);
194 void i_onNATNetworkChanged(const Utf8Str &aNetworkName);
195 void i_onNATNetworkStartStop(const Utf8Str &aNetworkName, BOOL aStart);
196 void i_onNATNetworkSetting(const Utf8Str &aNetworkName, BOOL aEnabled, const Utf8Str &aNetwork,
197 const Utf8Str &aGateway, BOOL aAdvertiseDefaultIpv6RouteEnabled,
198 BOOL fNeedDhcpServer);
199 void i_onNATNetworkPortForward(const Utf8Str &aNetworkName, BOOL create, BOOL fIpv6,
200 const Utf8Str &aRuleName, NATProtocol_T proto,
201 const Utf8Str &aHostIp, LONG aHostPort,
202 const Utf8Str &aGuestIp, LONG aGuestPort);
203 void i_onHostNameResolutionConfigurationChange();
204
205 int i_natNetworkRefInc(const Utf8Str &aNetworkName);
206 int i_natNetworkRefDec(const Utf8Str &aNetworkName);
207
208 RWLockHandle *i_getNatNetLock() const;
209 bool i_isNatNetStarted(const Utf8Str &aNetworkName) const;
210
211 void i_onCloudProviderListChanged(BOOL aRegistered);
212 void i_onCloudProviderRegistered(const Utf8Str &aProviderId, BOOL aRegistered);
213 void i_onCloudProviderUninstall(const Utf8Str &aProviderId);
214
215 void i_onProgressCreated(const Guid &aId, BOOL aCreated);
216
217 void i_onLanguageChanged(const Utf8Str &aLanguageId);
218
219#ifdef VBOX_WITH_UPDATE_AGENT
220 void i_onUpdateAgentAvailable(IUpdateAgent *aAgent,
221 const Utf8Str &aVer, UpdateChannel_T aChannel, UpdateSeverity_T aSev,
222 const Utf8Str &aDownloadURL, const Utf8Str &aWebURL, const Utf8Str &aReleaseNotes);
223 void i_onUpdateAgentError(IUpdateAgent *aAgent, const Utf8Str &aErrMsg, LONG aRc);
224 void i_onUpdateAgentStateChanged(IUpdateAgent *aAgent, UpdateState_T aState);
225 void i_onUpdateAgentSettingsChanged(IUpdateAgent *aAgent, const Utf8Str &aAttributeHint);
226#endif /* VBOX_WITH_UPDATE_AGENT */
227
228#ifdef VBOX_WITH_CLOUD_NET
229 HRESULT i_findCloudNetworkByName(const com::Utf8Str &aNetworkName,
230 ComObjPtr<CloudNetwork> *aNetwork = NULL);
231 HRESULT i_getEventSource(ComPtr<IEventSource>& aSource);
232#endif /* VBOX_WITH_CLOUD_NET */
233
234 ComObjPtr<GuestOSType> i_getUnknownOSType();
235
236 void i_getOpenedMachines(SessionMachinesList &aMachines,
237 InternalControlList *aControls = NULL);
238 MachinesOList &i_getMachinesList();
239
240 HRESULT i_findMachine(const Guid &aId,
241 bool fPermitInaccessible,
242 bool aSetError,
243 ComObjPtr<Machine> *aMachine = NULL);
244
245 HRESULT i_findMachineByName(const Utf8Str &aName,
246 bool aSetError,
247 ComObjPtr<Machine> *aMachine = NULL);
248
249 HRESULT i_validateMachineGroup(const com::Utf8Str &aGroup, bool fPrimary);
250 HRESULT i_convertMachineGroups(const std::vector<com::Utf8Str> aMachineGroups, StringsList *pllMachineGroups);
251
252 HRESULT i_findHardDiskById(const Guid &id,
253 bool aSetError,
254 ComObjPtr<Medium> *aHardDisk = NULL);
255 HRESULT i_findHardDiskByLocation(const Utf8Str &strLocation,
256 bool aSetError,
257 ComObjPtr<Medium> *aHardDisk = NULL);
258 HRESULT i_findDVDOrFloppyImage(DeviceType_T mediumType,
259 const Guid *aId,
260 const Utf8Str &aLocation,
261 bool aSetError,
262 ComObjPtr<Medium> *aImage = NULL);
263 HRESULT i_findRemoveableMedium(DeviceType_T mediumType,
264 const Guid &uuid,
265 bool fRefresh,
266 bool aSetError,
267 ComObjPtr<Medium> &pMedium);
268
269 HRESULT i_findGuestOSType(const Utf8Str &strOSType,
270 ComObjPtr<GuestOSType> &guestOSType);
271
272 const Guid &i_getGlobalRegistryId() const;
273
274 const ComObjPtr<Host> &i_host() const;
275 SystemProperties *i_getSystemProperties() const;
276 CloudProviderManager *i_getCloudProviderManager() const;
277#ifdef VBOX_WITH_EXTPACK
278 ExtPackManager *i_getExtPackManager() const;
279#endif
280#ifdef VBOX_WITH_RESOURCE_USAGE_API
281 const ComObjPtr<PerformanceCollector> &i_performanceCollector() const;
282#endif /* VBOX_WITH_RESOURCE_USAGE_API */
283
284 void i_getDefaultMachineFolder(Utf8Str &str) const;
285 void i_getDefaultHardDiskFormat(Utf8Str &str) const;
286
287 /** Returns the VirtualBox home directory */
288 const Utf8Str &i_homeDir() const;
289 int i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
290 void i_copyPathRelativeToConfig(const Utf8Str &strSource, Utf8Str &strTarget);
291 HRESULT i_registerMedium(const ComObjPtr<Medium> &pMedium, ComObjPtr<Medium> *ppMedium,
292 AutoWriteLock &mediaTreeLock, bool fCalledFromMediumInit = false);
293 HRESULT i_unregisterMedium(Medium *pMedium);
294 HRESULT i_unregisterMachineMedia(const Guid &id);
295 HRESULT i_unregisterMachine(Machine *pMachine, CleanupMode_T aCleanupMode, const Guid &id);
296 void i_rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir,
297 const Utf8Str &strNewConfigDir);
298 void i_saveMediaRegistry(settings::MediaRegistry &mediaRegistry,
299 const Guid &uuidRegistry,
300 const Utf8Str &strMachineFolder);
301 HRESULT i_saveSettings();
302 void i_markRegistryModified(const Guid &uuid);
303 void i_unmarkRegistryModified(const Guid &uuid);
304 void i_saveModifiedRegistries();
305 static const com::Utf8Str &i_getVersionNormalized();
306 static HRESULT i_ensureFilePathExists(const Utf8Str &strFileName, bool fCreate);
307 const Utf8Str& i_settingsFilePath();
308 AutostartDb* i_getAutostartDb() const;
309 RWLockHandle& i_getMachinesListLockHandle();
310 RWLockHandle& i_getMediaTreeLockHandle();
311 int i_encryptSetting(const Utf8Str &aPlaintext, Utf8Str *aCiphertext);
312 int i_decryptSetting(Utf8Str *aPlaintext, const Utf8Str &aCiphertext);
313 void i_storeSettingsKey(const Utf8Str &aKey);
314 bool i_isMediaUuidInUse(const Guid &aId, DeviceType_T deviceType);
315 HRESULT i_retainCryptoIf(PCVBOXCRYPTOIF *ppCryptoIf);
316 HRESULT i_releaseCryptoIf(PCVBOXCRYPTOIF pCryptoIf);
317 HRESULT i_unloadCryptoIfModule(void);
318
319
320
321private:
322 class ClientWatcher;
323
324 // wrapped IVirtualBox properties
325 HRESULT getVersion(com::Utf8Str &aVersion);
326 HRESULT getVersionNormalized(com::Utf8Str &aVersionNormalized);
327 HRESULT getRevision(ULONG *aRevision);
328 HRESULT getPackageType(com::Utf8Str &aPackageType);
329 HRESULT getAPIVersion(com::Utf8Str &aAPIVersion);
330 HRESULT getAPIRevision(LONG64 *aAPIRevision);
331 HRESULT getHomeFolder(com::Utf8Str &aHomeFolder);
332 HRESULT getSettingsFilePath(com::Utf8Str &aSettingsFilePath);
333 HRESULT getHost(ComPtr<IHost> &aHost);
334 HRESULT getSystemProperties(ComPtr<ISystemProperties> &aSystemProperties);
335 HRESULT getMachines(std::vector<ComPtr<IMachine> > &aMachines);
336 HRESULT getMachineGroups(std::vector<com::Utf8Str> &aMachineGroups);
337 HRESULT getHardDisks(std::vector<ComPtr<IMedium> > &aHardDisks);
338 HRESULT getDVDImages(std::vector<ComPtr<IMedium> > &aDVDImages);
339 HRESULT getFloppyImages(std::vector<ComPtr<IMedium> > &aFloppyImages);
340 HRESULT getProgressOperations(std::vector<ComPtr<IProgress> > &aProgressOperations);
341 HRESULT getGuestOSTypes(std::vector<ComPtr<IGuestOSType> > &aGuestOSTypes);
342 HRESULT getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders);
343 HRESULT getPerformanceCollector(ComPtr<IPerformanceCollector> &aPerformanceCollector);
344 HRESULT getDHCPServers(std::vector<ComPtr<IDHCPServer> > &aDHCPServers);
345 HRESULT getNATNetworks(std::vector<ComPtr<INATNetwork> > &aNATNetworks);
346 HRESULT getEventSource(ComPtr<IEventSource> &aEventSource);
347 HRESULT getExtensionPackManager(ComPtr<IExtPackManager> &aExtensionPackManager);
348 HRESULT getHostOnlyNetworks(std::vector<ComPtr<IHostOnlyNetwork> > &aHostOnlyNetworks);
349 HRESULT getInternalNetworks(std::vector<com::Utf8Str> &aInternalNetworks);
350 HRESULT getGenericNetworkDrivers(std::vector<com::Utf8Str> &aGenericNetworkDrivers);
351 HRESULT getCloudNetworks(std::vector<ComPtr<ICloudNetwork> > &aCloudNetworks);
352 HRESULT getCloudProviderManager(ComPtr<ICloudProviderManager> &aCloudProviderManager);
353
354 // wrapped IVirtualBox methods
355 HRESULT composeMachineFilename(const com::Utf8Str &aName,
356 const com::Utf8Str &aGroup,
357 const com::Utf8Str &aCreateFlags,
358 const com::Utf8Str &aBaseFolder,
359 com::Utf8Str &aFile);
360 HRESULT createMachine(const com::Utf8Str &aSettingsFile,
361 const com::Utf8Str &aName,
362 const std::vector<com::Utf8Str> &aGroups,
363 const com::Utf8Str &aOsTypeId,
364 const com::Utf8Str &aFlags,
365 const com::Utf8Str &aCipher,
366 const com::Utf8Str &aPasswordId,
367 const com::Utf8Str &aPassword,
368 ComPtr<IMachine> &aMachine);
369 HRESULT openMachine(const com::Utf8Str &aSettingsFile,
370 const com::Utf8Str &aPassword,
371 ComPtr<IMachine> &aMachine);
372 HRESULT registerMachine(const ComPtr<IMachine> &aMachine);
373 HRESULT findMachine(const com::Utf8Str &aNameOrId,
374 ComPtr<IMachine> &aMachine);
375 HRESULT getMachinesByGroups(const std::vector<com::Utf8Str> &aGroups,
376 std::vector<ComPtr<IMachine> > &aMachines);
377 HRESULT getMachineStates(const std::vector<ComPtr<IMachine> > &aMachines,
378 std::vector<MachineState_T> &aStates);
379 HRESULT createAppliance(ComPtr<IAppliance> &aAppliance);
380 HRESULT createUnattendedInstaller(ComPtr<IUnattended> &aUnattended);
381 HRESULT createMedium(const com::Utf8Str &aFormat,
382 const com::Utf8Str &aLocation,
383 AccessMode_T aAccessMode,
384 DeviceType_T aDeviceType,
385 ComPtr<IMedium> &aMedium);
386 HRESULT openMedium(const com::Utf8Str &aLocation,
387 DeviceType_T aDeviceType,
388 AccessMode_T aAccessMode,
389 BOOL aForceNewUuid,
390 ComPtr<IMedium> &aMedium);
391 HRESULT getGuestOSType(const com::Utf8Str &aId,
392 ComPtr<IGuestOSType> &aType);
393 HRESULT createSharedFolder(const com::Utf8Str &aName,
394 const com::Utf8Str &aHostPath,
395 BOOL aWritable,
396 BOOL aAutomount,
397 const com::Utf8Str &aAutoMountPoint);
398 HRESULT removeSharedFolder(const com::Utf8Str &aName);
399 HRESULT getExtraDataKeys(std::vector<com::Utf8Str> &aKeys);
400 HRESULT getExtraData(const com::Utf8Str &aKey,
401 com::Utf8Str &aValue);
402 HRESULT setExtraData(const com::Utf8Str &aKey,
403 const com::Utf8Str &aValue);
404 HRESULT setSettingsSecret(const com::Utf8Str &aPassword);
405 HRESULT createDHCPServer(const com::Utf8Str &aName,
406 ComPtr<IDHCPServer> &aServer);
407 HRESULT findDHCPServerByNetworkName(const com::Utf8Str &aName,
408 ComPtr<IDHCPServer> &aServer);
409 HRESULT removeDHCPServer(const ComPtr<IDHCPServer> &aServer);
410 HRESULT createNATNetwork(const com::Utf8Str &aNetworkName,
411 ComPtr<INATNetwork> &aNetwork);
412 HRESULT findNATNetworkByName(const com::Utf8Str &aNetworkName,
413 ComPtr<INATNetwork> &aNetwork);
414 HRESULT removeNATNetwork(const ComPtr<INATNetwork> &aNetwork);
415 HRESULT createHostOnlyNetwork(const com::Utf8Str &aNetworkName,
416 ComPtr<IHostOnlyNetwork> &aNetwork);
417 HRESULT findHostOnlyNetworkByName(const com::Utf8Str &aNetworkName,
418 ComPtr<IHostOnlyNetwork> &aNetwork);
419 HRESULT findHostOnlyNetworkById(const com::Guid &aId,
420 ComPtr<IHostOnlyNetwork> &aNetwork);
421 HRESULT removeHostOnlyNetwork(const ComPtr<IHostOnlyNetwork> &aNetwork);
422 HRESULT createCloudNetwork(const com::Utf8Str &aNetworkName,
423 ComPtr<ICloudNetwork> &aNetwork);
424 HRESULT findCloudNetworkByName(const com::Utf8Str &aNetworkName,
425 ComPtr<ICloudNetwork> &aNetwork);
426 HRESULT removeCloudNetwork(const ComPtr<ICloudNetwork> &aNetwork);
427 HRESULT checkFirmwarePresent(FirmwareType_T aFirmwareType,
428 const com::Utf8Str &aVersion,
429 com::Utf8Str &aUrl,
430 com::Utf8Str &aFile,
431 BOOL *aResult);
432 HRESULT findProgressById(const com::Guid &aId,
433 ComPtr<IProgress> &aProgressObject);
434
435 static HRESULT i_setErrorStaticBoth(HRESULT aResultCode, int vrc, const char *aText, ...)
436 {
437 va_list va;
438 va_start (va, aText);
439 HRESULT hrc = setErrorInternalV(aResultCode, getStaticClassIID(), getStaticComponentName(), aText, va, false, true, vrc);
440 va_end(va);
441 return hrc;
442 }
443
444 HRESULT i_registerMachine(Machine *aMachine);
445 HRESULT i_registerDHCPServer(DHCPServer *aDHCPServer,
446 bool aSaveRegistry = true);
447 HRESULT i_unregisterDHCPServer(DHCPServer *aDHCPServer);
448 HRESULT i_registerNATNetwork(NATNetwork *aNATNetwork,
449 bool aSaveRegistry = true);
450 HRESULT i_unregisterNATNetwork(NATNetwork *aNATNetwork,
451 bool aSaveRegistry = true);
452 HRESULT i_checkMediaForConflicts(const Guid &aId,
453 const Utf8Str &aLocation,
454 Utf8Str &aConflictType,
455 ComObjPtr<Medium> *pDupMedium);
456 int i_decryptSettings();
457 int i_decryptMediumSettings(Medium *pMedium);
458 int i_decryptSettingBytes(uint8_t *aPlaintext,
459 const uint8_t *aCiphertext,
460 size_t aCiphertextSize) const;
461 int i_encryptSettingBytes(const uint8_t *aPlaintext,
462 uint8_t *aCiphertext,
463 size_t aPlaintextSize,
464 size_t aCiphertextSize) const;
465 void i_reportDriverVersions(void);
466
467 struct Data; // opaque data structure, defined in VirtualBoxImpl.cpp
468
469 Data *m;
470
471 /* static variables (defined in VirtualBoxImpl.cpp) */
472 static com::Utf8Str sVersion;
473 static com::Utf8Str sVersionNormalized;
474 static ULONG sRevision;
475 static com::Utf8Str sPackageType;
476 static com::Utf8Str sAPIVersion;
477 static std::map<com::Utf8Str, int> sNatNetworkNameToRefCount;
478 static RWLockHandle* spMtxNatNetworkNameToRefCountLock;
479
480 static DECLCALLBACK(int) AsyncEventHandler(RTTHREAD thread, void *pvUser);
481
482#ifdef RT_OS_WINDOWS
483 friend class StartSVCHelperClientData;
484 static void i_SVCHelperClientThreadTask(StartSVCHelperClientData *pTask);
485#endif
486
487#if defined(RT_OS_WINDOWS) && defined(VBOXSVC_WITH_CLIENT_WATCHER)
488protected:
489 void i_callHook(const char *a_pszFunction) RT_OVERRIDE;
490 bool i_watchClientProcess(RTPROCESS a_pidClient, const char *a_pszFunction);
491public:
492 static void i_logCaller(const char *a_pszFormat, ...);
493private:
494
495#endif
496};
497
498////////////////////////////////////////////////////////////////////////////////
499
500#endif /* !MAIN_INCLUDED_VirtualBoxImpl_h */
501
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette