Changeset 66902 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- May 15, 2017 11:21:57 PM (8 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/VirtualBoxClientImpl.h
r66629 r66902 94 94 95 95 ComPtr<IVirtualBox> m_pVirtualBox; 96 ComPtr<IToken> m_pToken; 96 97 const ComObjPtr<EventSource> m_pEventSource; 97 98 -
trunk/src/VBox/Main/include/VirtualBoxSDSImpl.h
r66279 r66902 20 20 21 21 #include "VirtualBoxSDSWrap.h" 22 #include "TokenWrap.h" 22 23 23 24 #ifdef RT_OS_WINDOWS 24 25 # include "win/resource.h" 25 26 #endif 27 28 /** 29 * The MediumLockToken class automates cleanup of a Medium lock. 30 */ 31 class ATL_NO_VTABLE VirtualBoxToken : 32 public TokenWrap 33 { 34 public: 35 36 DECLARE_EMPTY_CTOR_DTOR(VirtualBoxToken) 37 38 HRESULT FinalConstruct(); 39 void FinalRelease(); 40 41 // public initializer/uninitializer for internal purposes only 42 HRESULT init(const std::wstring& wstrUserName); 43 void uninit(); 44 45 /** 46 * Fabrique method to create and initialize COM token object. 47 * 48 * @param aToken Pointer to result Token COM object. 49 * @param wstrUserName User name of client for that we create the token 50 */ 51 static HRESULT CreateToken(ComPtr<IToken>& aToken, const std::wstring& wstrUserName); 52 53 // Trace COM reference counting in debug mode 54 #ifdef RT_STRICT 55 virtual ULONG InternalAddRef(); 56 virtual ULONG InternalRelease(); 57 #endif 58 59 private: 60 61 // wrapped IToken methods 62 HRESULT abandon(AutoCaller &aAutoCaller); 63 HRESULT dummy(); 64 65 // data 66 struct Data 67 { 68 std::wstring wstrUserName; 69 }; 70 71 Data m; 72 }; 26 73 27 74 class ATL_NO_VTABLE VirtualBoxSDS : … … 61 108 * either from cahce or makes new one. 62 109 */ 63 HRESULT getVirtualBox(ComPtr<IVirtualBox> &aVirtualBox); 64 65 /** 66 * Should be called by client to deregister it from VBoxSDS when client beign finished 67 */ 68 HRESULT releaseVirtualBox(); 110 HRESULT getVirtualBox(ComPtr<IVirtualBox> &aVirtualBox, ComPtr<IToken> &aToken); 69 111 70 112 // Wrapped IVirtualBoxSDS methods … … 92 134 class VirtualBoxCache; 93 135 static VirtualBoxCache m_cache; 136 friend VirtualBoxToken; 94 137 }; 95 138
Note:
See TracChangeset
for help on using the changeset viewer.