VirtualBox

source: vbox/trunk/src/VBox/Main/include/SessionImpl.h@ 55437

Last change on this file since 55437 was 55401, checked in by vboxsync, 10 years ago

added a couple of missing Id headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1/* $Id: SessionImpl.h 55401 2015-04-23 10:03:17Z vboxsync $ */
2/** @file
3 * VBox Client Session COM Class definition
4 */
5
6/*
7 * Copyright (C) 2006-2014 Oracle Corporation
8 *
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.
16 */
17
18#ifndef ____H_SESSIONIMPL
19#define ____H_SESSIONIMPL
20
21#include "SessionWrap.h"
22#include "ConsoleImpl.h"
23
24#ifdef RT_OS_WINDOWS
25# include "win/resource.h"
26#endif
27
28#ifdef RT_OS_WINDOWS
29[threading(free)]
30#endif
31class ATL_NO_VTABLE Session :
32 public SessionWrap
33#ifdef RT_OS_WINDOWS
34 , public CComCoClass<Session, &CLSID_Session>
35#endif
36{
37public:
38
39 DECLARE_CLASSFACTORY()
40
41 DECLARE_REGISTRY_RESOURCEID(IDR_VIRTUALBOX)
42
43 DECLARE_NOT_AGGREGATABLE(Session)
44
45 DECLARE_EMPTY_CTOR_DTOR(Session)
46
47 HRESULT FinalConstruct();
48 void FinalRelease();
49
50 // public initializers/uninitializers only for internal purposes
51 HRESULT init();
52 void uninit();
53
54private:
55
56 // Wrapped ISession properties
57 HRESULT getState(SessionState_T *aState);
58 HRESULT getType(SessionType_T *aType);
59 HRESULT getMachine(ComPtr<IMachine> &aMachine);
60 HRESULT getConsole(ComPtr<IConsole> &aConsole);
61
62 // Wrapped ISession methods
63 HRESULT unlockMachine();
64
65 // Wrapped IInternalSessionControl properties
66 HRESULT getPID(ULONG *aPid);
67 HRESULT getRemoteConsole(ComPtr<IConsole> &aRemoteConsole);
68 HRESULT getNominalState(MachineState_T *aNominalState);
69
70 // Wrapped IInternalSessionControl methods
71#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
72 HRESULT assignMachine(const ComPtr<IMachine> &aMachine,
73 LockType_T aLockType,
74 const com::Utf8Str &aTokenId);
75#else
76 HRESULT assignMachine(const ComPtr<IMachine> &aMachine,
77 LockType_T aLockType,
78 const ComPtr<IToken> &aToken);
79#endif /* !VBOX_WITH_GENERIC_SESSION_WATCHER */
80 HRESULT assignRemoteMachine(const ComPtr<IMachine> &aMachine,
81 const ComPtr<IConsole> &aConsole);
82 HRESULT updateMachineState(MachineState_T aMachineState);
83 HRESULT uninitialize();
84 HRESULT onNetworkAdapterChange(const ComPtr<INetworkAdapter> &aNetworkAdapter,
85 BOOL aChangeAdapter);
86 HRESULT onSerialPortChange(const ComPtr<ISerialPort> &aSerialPort);
87 HRESULT onParallelPortChange(const ComPtr<IParallelPort> &aParallelPort);
88 HRESULT onStorageControllerChange();
89 HRESULT onMediumChange(const ComPtr<IMediumAttachment> &aMediumAttachment,
90 BOOL aForce);
91 HRESULT onStorageDeviceChange(const ComPtr<IMediumAttachment> &aMediumAttachment,
92 BOOL aRemove,
93 BOOL aSilent);
94 HRESULT onClipboardModeChange(ClipboardMode_T aClipboardMode);
95 HRESULT onDnDModeChange(DnDMode_T aDndMode);
96 HRESULT onCPUChange(ULONG aCpu,
97 BOOL aAdd);
98 HRESULT onCPUExecutionCapChange(ULONG aExecutionCap);
99 HRESULT onVRDEServerChange(BOOL aRestart);
100 HRESULT onVideoCaptureChange();
101 HRESULT onUSBControllerChange();
102 HRESULT onSharedFolderChange(BOOL aGlobal);
103 HRESULT onUSBDeviceAttach(const ComPtr<IUSBDevice> &aDevice,
104 const ComPtr<IVirtualBoxErrorInfo> &aError,
105 ULONG aMaskedInterfaces,
106 const com::Utf8Str &aCaptureFilename);
107 HRESULT onUSBDeviceDetach(const com::Guid &aId,
108 const ComPtr<IVirtualBoxErrorInfo> &aError);
109 HRESULT onShowWindow(BOOL aCheck,
110 BOOL *aCanShow,
111 LONG64 *aWinId);
112 HRESULT onBandwidthGroupChange(const ComPtr<IBandwidthGroup> &aBandwidthGroup);
113 HRESULT accessGuestProperty(const com::Utf8Str &aName,
114 const com::Utf8Str &aValue,
115 const com::Utf8Str &aFlags,
116 ULONG aAccessMode,
117 com::Utf8Str &aRetValue,
118 LONG64 *aRetTimestamp,
119 com::Utf8Str &aRetFlags);
120 HRESULT enumerateGuestProperties(const com::Utf8Str &aPatterns,
121 std::vector<com::Utf8Str> &aKeys,
122 std::vector<com::Utf8Str> &aValues,
123 std::vector<LONG64> &aTimestamps,
124 std::vector<com::Utf8Str> &aFlags);
125 HRESULT onlineMergeMedium(const ComPtr<IMediumAttachment> &aMediumAttachment,
126 ULONG aSourceIdx,
127 ULONG aTargetIdx,
128 const ComPtr<IProgress> &aProgress);
129 HRESULT reconfigureMediumAttachments(const std::vector<ComPtr<IMediumAttachment> > &aAttachments);
130 HRESULT enableVMMStatistics(BOOL aEnable);
131 HRESULT pauseWithReason(Reason_T aReason);
132 HRESULT resumeWithReason(Reason_T aReason);
133 HRESULT saveStateWithReason(Reason_T aReason,
134 const ComPtr<IProgress> &aProgress,
135 const Utf8Str &aStateFilePath,
136 BOOL aPauseVM,
137 BOOL *aLeftPaused);
138 HRESULT cancelSaveStateWithReason();
139
140
141 HRESULT i_unlockMachine(bool aFinalRelease, bool aFromServer);
142
143 SessionState_T mState;
144 SessionType_T mType;
145
146 ComPtr<IInternalMachineControl> mControl;
147
148#ifndef VBOX_COM_INPROC_API_CLIENT
149 ComObjPtr<Console> mConsole;
150#endif
151
152 ComPtr<IMachine> mRemoteMachine;
153 ComPtr<IConsole> mRemoteConsole;
154
155 ComPtr<IVirtualBox> mVirtualBox;
156
157 class ClientTokenHolder;
158
159 ClientTokenHolder *mClientTokenHolder;
160};
161
162#endif // !____H_SESSIONIMPL
163/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

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