Changeset 50914 in vbox for trunk/src/VBox
- Timestamp:
- Mar 27, 2014 7:07:53 PM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ExtPackManagerImpl.h
r49130 r50914 21 21 #include "VirtualBoxBase.h" 22 22 #include <VBox/ExtPack/ExtPack.h> 23 #include "ExtPackWrap.h" 24 #include "ExtPackFileWrap.h" 25 #include "ExtPackManagerWrap.h" 23 26 #include <iprt/fs.h> 24 27 … … 28 31 */ 29 32 class ATL_NO_VTABLE ExtPackFile : 30 public VirtualBoxBase, 31 VBOX_SCRIPTABLE_IMPL(IExtPackFile) 33 public ExtPackFileWrap 32 34 { 33 35 public: 34 36 /** @name COM and internal init/term/mapping cruft. 35 37 * @{ */ 36 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackFile, IExtPackFile)37 DECLARE_NOT_AGGREGATABLE(ExtPackFile)38 DECLARE_PROTECT_FINAL_CONSTRUCT()39 BEGIN_COM_MAP(ExtPackFile)40 VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackFile)41 COM_INTERFACE_ENTRY(IExtPackBase)42 END_COM_MAP()43 38 DECLARE_EMPTY_CTOR_DTOR(ExtPackFile) 44 39 … … 47 42 HRESULT initWithFile(const char *a_pszFile, const char *a_pszDigest, class ExtPackManager *a_pExtPackMgr, VirtualBox *a_pVirtualBox); 48 43 void uninit(); 49 RTMEMEF_NEW_AND_DELETE_OPERATORS();50 /** @} */51 52 /** @name IExtPackBase interfaces53 * @{ */54 STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);55 STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);56 STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);57 STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);58 STDMETHOD(COMGETTER(Edition))(BSTR *a_pbstrEdition);59 STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);60 STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));61 STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);62 STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);63 STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);64 STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);65 STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,66 IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);67 /** @} */68 69 /** @name IExtPackFile interfaces70 * @{ */71 STDMETHOD(COMGETTER(FilePath))(BSTR *a_pbstrPath);72 STDMETHOD(Install)(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);73 44 /** @} */ 74 45 … … 80 51 81 52 private: 53 54 // wrapped IExtPackFile properties 55 HRESULT getName(com::Utf8Str &aName); 56 HRESULT getDescription(com::Utf8Str &aDescription); 57 HRESULT getVersion(com::Utf8Str &aVersion); 58 HRESULT getRevision(ULONG *aRevision); 59 HRESULT getEdition(com::Utf8Str &aEdition); 60 HRESULT getVRDEModule(com::Utf8Str &aVRDEModule); 61 HRESULT getPlugIns(std::vector<ComPtr<IExtPackPlugIn> > &aPlugIns); 62 HRESULT getUsable(BOOL *aUsable); 63 HRESULT getWhyUnusable(com::Utf8Str &aWhyUnusable); 64 HRESULT getShowLicense(BOOL *aShowLicense); 65 HRESULT getLicense(com::Utf8Str &aLicense); 66 HRESULT getFilePath(com::Utf8Str &aFilePath); 67 68 // wrapped IExtPackFile methods 69 HRESULT queryLicense(const com::Utf8Str &aPreferredLocale, 70 const com::Utf8Str &aPreferredLanguage, 71 const com::Utf8Str &aFormat, 72 com::Utf8Str &aLicenseText); 73 HRESULT install(BOOL aReplace, 74 const com::Utf8Str &aDisplayInfo, 75 ComPtr<IProgress> &aProgess); 76 82 77 struct Data; 83 78 /** Pointer to the private instance. */ … … 93 88 */ 94 89 class ATL_NO_VTABLE ExtPack : 95 public VirtualBoxBase, 96 VBOX_SCRIPTABLE_IMPL(IExtPack) 90 public ExtPackWrap 97 91 { 98 92 public: 99 93 /** @name COM and internal init/term/mapping cruft. 100 94 * @{ */ 101 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPack, IExtPack)102 DECLARE_NOT_AGGREGATABLE(ExtPack)103 DECLARE_PROTECT_FINAL_CONSTRUCT()104 BEGIN_COM_MAP(ExtPack)105 VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPack)106 COM_INTERFACE_ENTRY(IExtPackBase)107 END_COM_MAP()108 95 DECLARE_EMPTY_CTOR_DTOR(ExtPack) 109 96 … … 115 102 /** @} */ 116 103 117 /** @name IExtPackBase interfaces118 * @{ */119 STDMETHOD(COMGETTER(Name))(BSTR *a_pbstrName);120 STDMETHOD(COMGETTER(Description))(BSTR *a_pbstrDescription);121 STDMETHOD(COMGETTER(Version))(BSTR *a_pbstrVersion);122 STDMETHOD(COMGETTER(Revision))(ULONG *a_puRevision);123 STDMETHOD(COMGETTER(Edition))(BSTR *a_pbstrEdition);124 STDMETHOD(COMGETTER(VRDEModule))(BSTR *a_pbstrVrdeModule);125 STDMETHOD(COMGETTER(PlugIns))(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns));126 STDMETHOD(COMGETTER(Usable))(BOOL *a_pfUsable);127 STDMETHOD(COMGETTER(WhyUnusable))(BSTR *a_pbstrWhy);128 STDMETHOD(COMGETTER(ShowLicense))(BOOL *a_pfShowIt);129 STDMETHOD(COMGETTER(License))(BSTR *a_pbstrHtmlLicense);130 STDMETHOD(QueryLicense)(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage,131 IN_BSTR a_bstrFormat, BSTR *a_pbstrLicense);132 /** @} */133 134 /** @name IExtPack interfaces135 * @{ */136 STDMETHOD(QueryObject)(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown);137 /** @} */138 139 104 /** @name Internal interfaces used by ExtPackManager. 140 105 * @{ */ 141 bool callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo);142 HRESULT callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval);143 bool callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock);144 bool callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock);145 bool callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock);146 bool callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);147 bool callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc);148 bool callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock);149 HRESULT checkVrde(void);150 HRESULT getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary);151 HRESULT getLibraryName(const char *a_pszModuleName, Utf8Str *a_pstrLibrary);152 bool wantsToBeDefaultVrde(void) const;153 HRESULT refresh(bool *pfCanDelete);106 bool i_callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo); 107 HRESULT i_callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval); 108 bool i_callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock); 109 bool i_callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock); 110 bool i_callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock); 111 bool i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc); 112 bool i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc); 113 bool i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock); 114 HRESULT i_checkVrde(void); 115 HRESULT i_getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary); 116 HRESULT i_getLibraryName(const char *a_pszModuleName, Utf8Str *a_pstrLibrary); 117 bool i_wantsToBeDefaultVrde(void) const; 118 HRESULT i_refresh(bool *pfCanDelete); 154 119 /** @} */ 155 120 … … 157 122 /** @name Internal helper methods. 158 123 * @{ */ 159 void probeAndLoad(void);160 bool findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,161 Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const;162 static bool objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2);124 void i_probeAndLoad(void); 125 bool i_findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind, 126 Utf8Str *a_ppStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const; 127 static bool i_objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2); 163 128 /** @} */ 164 129 165 130 /** @name Extension Pack Helpers 166 131 * @{ */ 167 static DECLCALLBACK(int) hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, 168 VBOXEXTPACKMODKIND enmKind, char *pszFound, size_t cbFound, bool *pfNative); 169 static DECLCALLBACK(int) hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath); 170 static DECLCALLBACK(VBOXEXTPACKCTX) hlpGetContext(PCVBOXEXTPACKHLP pHlp); 171 static DECLCALLBACK(int) hlpLoadHGCMService(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IConsole) *pConsole, const char *pszServiceLibrary, const char *pszServiceName); 172 static DECLCALLBACK(int) hlpReservedN(PCVBOXEXTPACKHLP pHlp); 173 /** @} */ 174 175 private: 132 static DECLCALLBACK(int) i_hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, 133 VBOXEXTPACKMODKIND enmKind, char *pszFound, size_t cbFound, bool *pfNative); 134 static DECLCALLBACK(int) i_hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath); 135 static DECLCALLBACK(VBOXEXTPACKCTX) i_hlpGetContext(PCVBOXEXTPACKHLP pHlp); 136 static DECLCALLBACK(int) i_hlpLoadHGCMService(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IConsole) *pConsole, const char *pszServiceLibrary, const char *pszServiceName); 137 static DECLCALLBACK(int) i_hlpReservedN(PCVBOXEXTPACKHLP pHlp); 138 /** @} */ 139 140 private: 141 142 // wrapped IExtPack properties 143 HRESULT getName(com::Utf8Str &aName); 144 HRESULT getDescription(com::Utf8Str &aDescription); 145 HRESULT getVersion(com::Utf8Str &aVersion); 146 HRESULT getRevision(ULONG *aRevision); 147 HRESULT getEdition(com::Utf8Str &aEdition); 148 HRESULT getVRDEModule(com::Utf8Str &aVRDEModule); 149 HRESULT getPlugIns(std::vector<ComPtr<IExtPackPlugIn> > &aPlugIns); 150 HRESULT getUsable(BOOL *aUsable); 151 HRESULT getWhyUnusable(com::Utf8Str &aWhyUnusable); 152 HRESULT getShowLicense(BOOL *aShowLicense); 153 HRESULT getLicense(com::Utf8Str &aLicense); 154 155 // wrapped IExtPack methods 156 HRESULT queryLicense(const com::Utf8Str &aPreferredLocale, 157 const com::Utf8Str &aPreferredLanguage, 158 const com::Utf8Str &aFormat, 159 com::Utf8Str &aLicenseText); 160 HRESULT queryObject(const com::Utf8Str &aObjUuid, 161 ComPtr<IUnknown> &aReturnInterface); 162 163 176 164 struct Data; 177 165 /** Pointer to the private instance. */ … … 186 174 */ 187 175 class ATL_NO_VTABLE ExtPackManager : 188 public VirtualBoxBase, 189 VBOX_SCRIPTABLE_IMPL(IExtPackManager) 176 public ExtPackManagerWrap 190 177 { 178 public: 191 179 /** @name COM and internal init/term/mapping cruft. 192 180 * @{ */ 193 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(ExtPackManager, IExtPackManager)194 DECLARE_NOT_AGGREGATABLE(ExtPackManager)195 DECLARE_PROTECT_FINAL_CONSTRUCT()196 BEGIN_COM_MAP(ExtPackManager)197 VBOX_DEFAULT_INTERFACE_ENTRIES(IExtPackManager)198 END_COM_MAP()199 181 DECLARE_EMPTY_CTOR_DTOR(ExtPackManager) 200 182 … … 203 185 HRESULT initExtPackManager(VirtualBox *a_pVirtualBox, VBOXEXTPACKCTX a_enmContext); 204 186 void uninit(); 205 RTMEMEF_NEW_AND_DELETE_OPERATORS();206 /** @} */207 208 /** @name IExtPack interfaces209 * @{ */210 STDMETHOD(COMGETTER(InstalledExtPacks))(ComSafeArrayOut(IExtPack *, a_paExtPacks));211 STDMETHOD(Find)(IN_BSTR a_bstrName, IExtPack **a_pExtPack);212 STDMETHOD(OpenExtPackFile)(IN_BSTR a_bstrTarball, IExtPackFile **a_ppExtPackFile);213 STDMETHOD(Uninstall)(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress);214 STDMETHOD(Cleanup)(void);215 STDMETHOD(QueryAllPlugInsForFrontend)(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules));216 STDMETHOD(IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable));217 187 /** @} */ 218 188 … … 220 190 * @{ */ 221 191 #if !defined(VBOX_COM_INPROC) 222 static DECLCALLBACK(int) doInstallThreadProc(RTTHREAD hThread, void *pvJob);223 HRESULT doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo);224 static DECLCALLBACK(int) doUninstallThreadProc(RTTHREAD hThread, void *pvJob);225 HRESULT doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo);192 static DECLCALLBACK(int) i_doInstallThreadProc(RTTHREAD hThread, void *pvJob); 193 HRESULT i_doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo); 194 static DECLCALLBACK(int) i_doUninstallThreadProc(RTTHREAD hThread, void *pvJob); 195 HRESULT i_doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo); 226 196 #endif 227 void callAllVirtualBoxReadyHooks(void); 228 void callAllConsoleReadyHooks(IConsole *a_pConsole); 229 void callAllVmCreatedHooks(IMachine *a_pMachine); 230 int callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM); 231 int callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM); 232 void callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM); 233 HRESULT checkVrdeExtPack(Utf8Str const *a_pstrExtPack); 234 int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary); 235 HRESULT getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrLibrary); 236 HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack); 237 bool isExtPackUsable(const char *a_pszExtPack); 238 void dumpAllToReleaseLog(void); 239 /** @} */ 240 241 private: 242 HRESULT runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...); 243 ExtPack *findExtPack(const char *a_pszName); 244 void removeExtPack(const char *a_pszName); 245 HRESULT refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack); 197 void i_callAllVirtualBoxReadyHooks(void); 198 void i_callAllConsoleReadyHooks(IConsole *a_pConsole); 199 void i_callAllVmCreatedHooks(IMachine *a_pMachine); 200 int i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM); 201 int i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM); 202 void i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM); 203 HRESULT i_checkVrdeExtPack(Utf8Str const *a_pstrExtPack); 204 int i_getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary); 205 HRESULT i_getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrLibrary); 206 HRESULT i_getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack); 207 bool i_isExtPackUsable(const char *a_pszExtPack); 208 void i_dumpAllToReleaseLog(void); 209 /** @} */ 210 211 private: 212 213 // wrapped IExtPackManager properties 214 HRESULT getInstalledExtPacks(std::vector<ComPtr<IExtPack> > &aInstalledExtPacks); 215 216 // wrapped IExtPackManager methods 217 HRESULT find(const com::Utf8Str &aName, 218 ComPtr<IExtPack> &aReturnData); 219 HRESULT openExtPackFile(const com::Utf8Str &aPath, 220 ComPtr<IExtPackFile> &aFile); 221 HRESULT uninstall(const com::Utf8Str &aName, 222 BOOL aForcedRemoval, 223 const com::Utf8Str &aDisplayInfo, 224 ComPtr<IProgress> &aProgess); 225 HRESULT cleanup(); 226 HRESULT queryAllPlugInsForFrontend(const com::Utf8Str &aFrontendName, 227 std::vector<com::Utf8Str> &aPlugInModules); 228 HRESULT isExtPackUsable(const com::Utf8Str &aName, 229 BOOL *aUsable); 230 231 HRESULT i_runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...); 232 ExtPack *i_findExtPack(const char *a_pszName); 233 void i_removeExtPack(const char *a_pszName); 234 HRESULT i_refreshExtPack(const char *a_pszName, bool a_fUnsuableIsError, ExtPack **a_ppExtPack); 246 235 247 236 private: -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r50899 r50914 368 368 } 369 369 370 STDMETHODIMP ExtPackFile::COMGETTER(Name)(BSTR *a_pbstrName) 371 { 372 CheckComArgOutPointerValid(a_pbstrName); 373 374 AutoCaller autoCaller(this); 375 HRESULT hrc = autoCaller.rc(); 376 if (SUCCEEDED(hrc)) 377 { 378 Bstr str(m->Desc.strName); 379 str.cloneTo(a_pbstrName); 380 } 381 return hrc; 382 } 383 384 STDMETHODIMP ExtPackFile::COMGETTER(Description)(BSTR *a_pbstrDescription) 385 { 386 CheckComArgOutPointerValid(a_pbstrDescription); 387 388 AutoCaller autoCaller(this); 389 HRESULT hrc = autoCaller.rc(); 390 if (SUCCEEDED(hrc)) 391 { 392 Bstr str(m->Desc.strDescription); 393 str.cloneTo(a_pbstrDescription); 394 } 395 return hrc; 396 } 397 398 STDMETHODIMP ExtPackFile::COMGETTER(Version)(BSTR *a_pbstrVersion) 399 { 400 CheckComArgOutPointerValid(a_pbstrVersion); 401 402 AutoCaller autoCaller(this); 403 HRESULT hrc = autoCaller.rc(); 404 if (SUCCEEDED(hrc)) 405 { 406 Bstr str(m->Desc.strVersion); 407 str.cloneTo(a_pbstrVersion); 408 } 409 return hrc; 410 } 411 412 STDMETHODIMP ExtPackFile::COMGETTER(Edition)(BSTR *a_pbstrEdition) 413 { 414 CheckComArgOutPointerValid(a_pbstrEdition); 415 416 AutoCaller autoCaller(this); 417 HRESULT hrc = autoCaller.rc(); 418 if (SUCCEEDED(hrc)) 419 { 420 Bstr str(m->Desc.strEdition); 421 str.cloneTo(a_pbstrEdition); 422 } 423 return hrc; 424 } 425 426 STDMETHODIMP ExtPackFile::COMGETTER(Revision)(ULONG *a_puRevision) 427 { 428 CheckComArgOutPointerValid(a_puRevision); 429 430 AutoCaller autoCaller(this); 431 HRESULT hrc = autoCaller.rc(); 432 if (SUCCEEDED(hrc)) 433 *a_puRevision = m->Desc.uRevision; 434 return hrc; 435 } 436 437 STDMETHODIMP ExtPackFile::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule) 438 { 439 CheckComArgOutPointerValid(a_pbstrVrdeModule); 440 441 AutoCaller autoCaller(this); 442 HRESULT hrc = autoCaller.rc(); 443 if (SUCCEEDED(hrc)) 444 { 445 Bstr str(m->Desc.strVrdeModule); 446 str.cloneTo(a_pbstrVrdeModule); 447 } 448 return hrc; 449 } 450 451 STDMETHODIMP ExtPackFile::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns)) 370 HRESULT ExtPackFile::getName(com::Utf8Str &aName) 371 { 372 aName = m->Desc.strName; 373 return S_OK; 374 } 375 376 HRESULT ExtPackFile::getDescription(com::Utf8Str &aDescription) 377 { 378 aDescription = m->Desc.strDescription; 379 return S_OK; 380 } 381 382 HRESULT ExtPackFile::getVersion(com::Utf8Str &aVersion) 383 { 384 aVersion = m->Desc.strVersion; 385 return S_OK; 386 } 387 388 HRESULT ExtPackFile::getEdition(com::Utf8Str &aEdition) 389 { 390 aEdition = m->Desc.strEdition; 391 return S_OK; 392 } 393 394 HRESULT ExtPackFile::getRevision(ULONG *aRevision) 395 { 396 *aRevision = m->Desc.uRevision; 397 return S_OK; 398 } 399 400 HRESULT ExtPackFile::getVRDEModule(com::Utf8Str &aVRDEModule) 401 { 402 aVRDEModule = m->Desc.strVrdeModule; 403 return S_OK; 404 } 405 406 HRESULT ExtPackFile::getPlugIns(std::vector<ComPtr<IExtPackPlugIn> > &aPlugIns) 452 407 { 453 408 /** @todo implement plug-ins. */ 454 409 #ifdef VBOX_WITH_XPCOM 455 NOREF(a_paPlugIns); 456 NOREF(a_paPlugInsSize); 410 NOREF(aPlugIns); 457 411 #endif 412 NOREF(aPlugIns); 458 413 ReturnComNotImplemented(); 459 414 } 460 415 461 STDMETHODIMP ExtPackFile::COMGETTER(Usable)(BOOL *a_pfUsable) 462 { 463 CheckComArgOutPointerValid(a_pfUsable); 464 465 AutoCaller autoCaller(this); 466 HRESULT hrc = autoCaller.rc(); 467 if (SUCCEEDED(hrc)) 468 *a_pfUsable = m->fUsable; 469 return hrc; 470 } 471 472 STDMETHODIMP ExtPackFile::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy) 473 { 474 CheckComArgOutPointerValid(a_pbstrWhy); 475 476 AutoCaller autoCaller(this); 477 HRESULT hrc = autoCaller.rc(); 478 if (SUCCEEDED(hrc)) 479 m->strWhyUnusable.cloneTo(a_pbstrWhy); 480 return hrc; 481 } 482 483 STDMETHODIMP ExtPackFile::COMGETTER(ShowLicense)(BOOL *a_pfShowIt) 484 { 485 CheckComArgOutPointerValid(a_pfShowIt); 486 487 AutoCaller autoCaller(this); 488 HRESULT hrc = autoCaller.rc(); 489 if (SUCCEEDED(hrc)) 490 *a_pfShowIt = m->Desc.fShowLicense; 491 return hrc; 492 } 493 494 STDMETHODIMP ExtPackFile::COMGETTER(License)(BSTR *a_pbstrHtmlLicense) 495 { 496 Bstr bstrHtml("html"); 497 return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense); 416 HRESULT ExtPackFile::getUsable(BOOL *aUsable) 417 { 418 *aUsable = m->fUsable; 419 return S_OK; 420 } 421 422 HRESULT ExtPackFile::getWhyUnusable(com::Utf8Str &aWhyUnusable) 423 { 424 aWhyUnusable = m->strWhyUnusable; 425 return S_OK; 426 } 427 428 HRESULT ExtPackFile::getShowLicense(BOOL *aShowLicense) 429 { 430 *aShowLicense = m->Desc.fShowLicense; 431 return S_OK; 432 } 433 434 HRESULT ExtPackFile::getLicense(com::Utf8Str &aLicense) 435 { 436 Utf8Str strHtml("html"); 437 Utf8Str str(""); 438 return queryLicense(str, str, strHtml, aLicense); 498 439 } 499 440 500 441 /* Same as ExtPack::QueryLicense, should really explore the subject of base classes here... */ 501 STDMETHODIMP ExtPackFile::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat, 502 BSTR *a_pbstrLicense) 503 { 442 HRESULT ExtPackFile::queryLicense(const com::Utf8Str &aPreferredLocale, const com::Utf8Str &aPreferredLanguage, 443 const com::Utf8Str &aFormat, com::Utf8Str &aLicenseText) 444 { 445 HRESULT hrc = S_OK; 446 504 447 /* 505 448 * Validate input. 506 449 */ 507 CheckComArgOutPointerValid(a_pbstrLicense); 508 CheckComArgNotNull(a_bstrPreferredLocale); 509 CheckComArgNotNull(a_bstrPreferredLanguage); 510 CheckComArgNotNull(a_bstrFormat); 511 512 Utf8Str strPreferredLocale(a_bstrPreferredLocale); 513 if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0) 450 451 if (aPreferredLocale.length() != 2 && aPreferredLocale.length() != 0) 514 452 return setError(E_FAIL, tr("The preferred locale is a two character string or empty.")); 515 453 516 Utf8Str strPreferredLanguage(a_bstrPreferredLanguage); 517 if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0) 454 if (aPreferredLanguage.length() != 2 && aPreferredLanguage.length() != 0) 518 455 return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty.")); 519 456 520 Utf8Str strFormat(a_bstrFormat); 521 if ( !strFormat.equals("html") 522 && !strFormat.equals("rtf") 523 && !strFormat.equals("txt")) 457 if ( !aFormat.equals("html") 458 && !aFormat.equals("rtf") 459 && !aFormat.equals("txt")) 524 460 return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'.")); 525 461 … … 528 464 */ 529 465 char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2]; 530 if ( strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())466 if (aPreferredLocale.isNotEmpty() && aPreferredLanguage.isNotEmpty()) 531 467 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s", 532 strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());533 else if ( strPreferredLocale.isNotEmpty())468 aPreferredLocale.c_str(), aPreferredLanguage.c_str(), aFormat.c_str()); 469 else if (aPreferredLocale.isNotEmpty()) 534 470 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", 535 strPreferredLocale.c_str(), strFormat.c_str());536 else if ( strPreferredLanguage.isNotEmpty())471 aPreferredLocale.c_str(), aFormat.c_str()); 472 else if (aPreferredLanguage.isNotEmpty()) 537 473 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", 538 strPreferredLocale.c_str(), strFormat.c_str());474 aPreferredLocale.c_str(), aFormat.c_str()); 539 475 else 540 476 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", 541 strFormat.c_str());477 aFormat.c_str()); 542 478 /* 543 479 * Lock the extension pack. We need a write lock here as there must not be 544 480 * concurrent accesses to the tar file handle. 545 481 */ 546 AutoCaller autoCaller(this); 547 HRESULT hrc = autoCaller.rc(); 548 if (SUCCEEDED(hrc)) 549 { 550 AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); 551 482 AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); 483 484 /* 485 * Do not permit this query on a pack that isn't considered usable (could 486 * be marked so because of bad license files). 487 */ 488 if (!m->fUsable) 489 hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str()); 490 else 491 { 552 492 /* 553 * Do not permit this query on a pack that isn't considered usable (could 554 * be marked so because of bad license files). 493 * Look it up in the manifest before scanning the tarball for it 555 494 */ 556 if (!m->fUsable) 557 hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str()); 558 else 559 { 560 /* 561 * Look it up in the manifest before scanning the tarball for it 562 */ 563 if (RTManifestEntryExists(m->hOurManifest, szName)) 495 if (RTManifestEntryExists(m->hOurManifest, szName)) 496 { 497 RTVFSFSSTREAM hTarFss; 498 char szError[8192]; 499 int vrc = VBoxExtPackOpenTarFss(m->hExtPackFile, szError, sizeof(szError), &hTarFss, NULL); 500 if (RT_SUCCESS(vrc)) 564 501 { 565 RTVFSFSSTREAM hTarFss; 566 char szError[8192]; 567 int vrc = VBoxExtPackOpenTarFss(m->hExtPackFile, szError, sizeof(szError), &hTarFss, NULL); 502 for (;;) 503 { 504 /* Get the first/next. */ 505 char *pszName; 506 RTVFSOBJ hVfsObj; 507 RTVFSOBJTYPE enmType; 508 vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj); 509 if (RT_FAILURE(vrc)) 510 { 511 if (vrc != VERR_EOF) 512 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsFsStrmNext failed: %Rrc"), vrc); 513 else 514 hrc = setError(E_UNEXPECTED, tr("'%s' was found in the manifest but not in the tarball"), szName); 515 break; 516 } 517 518 /* Is this it? */ 519 const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName; 520 if ( !strcmp(pszAdjName, szName) 521 && ( enmType == RTVFSOBJTYPE_IO_STREAM 522 || enmType == RTVFSOBJTYPE_FILE)) 523 { 524 RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj); 525 RTVfsObjRelease(hVfsObj); 526 RTStrFree(pszName); 527 528 /* Load the file into memory. */ 529 RTFSOBJINFO ObjInfo; 530 vrc = RTVfsIoStrmQueryInfo(hVfsIos, &ObjInfo, RTFSOBJATTRADD_NOTHING); 531 if (RT_SUCCESS(vrc)) 532 { 533 size_t cbFile = (size_t)ObjInfo.cbObject; 534 void *pvFile = RTMemAllocZ(cbFile + 1); 535 if (pvFile) 536 { 537 vrc = RTVfsIoStrmRead(hVfsIos, pvFile, cbFile, true /*fBlocking*/, NULL); 538 if (RT_SUCCESS(vrc)) 539 { 540 /* try translate it into a string we can return. */ 541 Bstr bstrLicense((const char *)pvFile, cbFile); 542 if (bstrLicense.isNotEmpty()) 543 { 544 aLicenseText = Utf8Str(bstrLicense); 545 hrc = S_OK; 546 } 547 else 548 hrc = setError(VBOX_E_IPRT_ERROR, 549 tr("The license file '%s' is empty or contains invalid UTF-8 encoding"), 550 szName); 551 } 552 else 553 hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to read '%s': %Rrc"), szName, vrc); 554 RTMemFree(pvFile); 555 } 556 else 557 hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName); 558 } 559 else 560 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsIoStrmQueryInfo on '%s': %Rrc"), szName, vrc); 561 RTVfsIoStrmRelease(hVfsIos); 562 break; 563 } 564 565 /* Release current. */ 566 RTVfsObjRelease(hVfsObj); 567 RTStrFree(pszName); 568 } 569 RTVfsFsStrmRelease(hTarFss); 570 } 571 else 572 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("%s"), szError); 573 } 574 else 575 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in '%s'"), 576 szName, m->strExtPackFile.c_str()); 577 } 578 return hrc; 579 } 580 581 HRESULT ExtPackFile::getFilePath(com::Utf8Str &aFilePath) 582 { 583 584 aFilePath = m->strExtPackFile; 585 return S_OK; 586 } 587 588 HRESULT ExtPackFile::install(BOOL aReplace, const com::Utf8Str &aDisplayInfo, ComPtr<IProgress> &aProgress) 589 { 590 HRESULT hrc = S_OK; 591 592 if (m->fUsable) 593 { 594 PEXTPACKINSTALLJOB pJob = NULL; 595 try 596 { 597 pJob = new EXTPACKINSTALLJOB; 598 pJob->ptrExtPackFile = this; 599 pJob->fReplace = aReplace != FALSE; 600 pJob->strDisplayInfo = aDisplayInfo; 601 pJob->ptrExtPackMgr = m->ptrExtPackMgr; 602 hrc = pJob->ptrProgress.createObject(); 603 if (SUCCEEDED(hrc)) 604 { 605 Bstr bstrDescription = tr("Installing extension pack"); 606 hrc = pJob->ptrProgress->init( 607 #ifndef VBOX_COM_INPROC 608 m->pVirtualBox, 609 #endif 610 static_cast<IExtPackFile *>(this), 611 bstrDescription.raw(), 612 FALSE /*aCancelable*/, 613 NULL /*aId*/); 614 } 615 if (SUCCEEDED(hrc)) 616 { 617 ComPtr<Progress> ptrProgress = pJob->ptrProgress; 618 int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::i_doInstallThreadProc, pJob, 0, 619 RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackInst"); 568 620 if (RT_SUCCESS(vrc)) 569 621 { 570 for (;;) 571 { 572 /* Get the first/next. */ 573 char *pszName; 574 RTVFSOBJ hVfsObj; 575 RTVFSOBJTYPE enmType; 576 vrc = RTVfsFsStrmNext(hTarFss, &pszName, &enmType, &hVfsObj); 577 if (RT_FAILURE(vrc)) 578 { 579 if (vrc != VERR_EOF) 580 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsFsStrmNext failed: %Rrc"), vrc); 581 else 582 hrc = setError(E_UNEXPECTED, tr("'%s' was found in the manifest but not in the tarball"), szName); 583 break; 584 } 585 586 /* Is this it? */ 587 const char *pszAdjName = pszName[0] == '.' && pszName[1] == '/' ? &pszName[2] : pszName; 588 if ( !strcmp(pszAdjName, szName) 589 && ( enmType == RTVFSOBJTYPE_IO_STREAM 590 || enmType == RTVFSOBJTYPE_FILE)) 591 { 592 RTVFSIOSTREAM hVfsIos = RTVfsObjToIoStream(hVfsObj); 593 RTVfsObjRelease(hVfsObj); 594 RTStrFree(pszName); 595 596 /* Load the file into memory. */ 597 RTFSOBJINFO ObjInfo; 598 vrc = RTVfsIoStrmQueryInfo(hVfsIos, &ObjInfo, RTFSOBJATTRADD_NOTHING); 599 if (RT_SUCCESS(vrc)) 600 { 601 size_t cbFile = (size_t)ObjInfo.cbObject; 602 void *pvFile = RTMemAllocZ(cbFile + 1); 603 if (pvFile) 604 { 605 vrc = RTVfsIoStrmRead(hVfsIos, pvFile, cbFile, true /*fBlocking*/, NULL); 606 if (RT_SUCCESS(vrc)) 607 { 608 /* try translate it into a string we can return. */ 609 Bstr bstrLicense((const char *)pvFile, cbFile); 610 if (bstrLicense.isNotEmpty()) 611 { 612 bstrLicense.detachTo(a_pbstrLicense); 613 hrc = S_OK; 614 } 615 else 616 hrc = setError(VBOX_E_IPRT_ERROR, 617 tr("The license file '%s' is empty or contains invalid UTF-8 encoding"), 618 szName); 619 } 620 else 621 hrc = setError(VBOX_E_IPRT_ERROR, tr("Failed to read '%s': %Rrc"), szName, vrc); 622 RTMemFree(pvFile); 623 } 624 else 625 hrc = setError(E_OUTOFMEMORY, tr("Failed to allocate %zu bytes for '%s'"), cbFile, szName); 626 } 627 else 628 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTVfsIoStrmQueryInfo on '%s': %Rrc"), szName, vrc); 629 RTVfsIoStrmRelease(hVfsIos); 630 break; 631 } 632 633 /* Release current. */ 634 RTVfsObjRelease(hVfsObj); 635 RTStrFree(pszName); 636 } 637 RTVfsFsStrmRelease(hTarFss); 622 pJob = NULL; /* the thread deletes it */ 623 ptrProgress.queryInterfaceTo(aProgress.asOutParam()); 638 624 } 639 625 else 640 hrc = setError(VBOX_E_ OBJECT_NOT_FOUND, tr("%s"), szError);626 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc); 641 627 } 642 else 643 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in '%s'"), 644 szName, m->strExtPackFile.c_str()); 645 } 646 } 647 return hrc; 648 } 649 650 STDMETHODIMP ExtPackFile::COMGETTER(FilePath)(BSTR *a_pbstrPath) 651 { 652 CheckComArgOutPointerValid(a_pbstrPath); 653 654 AutoCaller autoCaller(this); 655 HRESULT hrc = autoCaller.rc(); 656 if (SUCCEEDED(hrc)) 657 m->strExtPackFile.cloneTo(a_pbstrPath); 658 return hrc; 659 } 660 661 STDMETHODIMP ExtPackFile::Install(BOOL a_fReplace, IN_BSTR a_bstrDisplayInfo, IProgress **a_ppProgress) 662 { 663 if (a_ppProgress) 664 *a_ppProgress = NULL; 665 666 AutoCaller autoCaller(this); 667 HRESULT hrc = autoCaller.rc(); 668 if (SUCCEEDED(hrc)) 669 { 670 if (m->fUsable) 671 { 672 PEXTPACKINSTALLJOB pJob = NULL; 673 try 674 { 675 pJob = new EXTPACKINSTALLJOB; 676 pJob->ptrExtPackFile = this; 677 pJob->fReplace = a_fReplace != FALSE; 678 pJob->strDisplayInfo = a_bstrDisplayInfo; 679 pJob->ptrExtPackMgr = m->ptrExtPackMgr; 680 hrc = pJob->ptrProgress.createObject(); 681 if (SUCCEEDED(hrc)) 682 { 683 Bstr bstrDescription = tr("Installing extension pack"); 684 hrc = pJob->ptrProgress->init( 685 #ifndef VBOX_COM_INPROC 686 m->pVirtualBox, 687 #endif 688 static_cast<IExtPackFile *>(this), 689 bstrDescription.raw(), 690 FALSE /*aCancelable*/, 691 NULL /*aId*/); 692 } 693 if (SUCCEEDED(hrc)) 694 { 695 ComPtr<Progress> ptrProgress = pJob->ptrProgress; 696 int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doInstallThreadProc, pJob, 0, 697 RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackInst"); 698 if (RT_SUCCESS(vrc)) 699 { 700 pJob = NULL; /* the thread deletes it */ 701 ptrProgress.queryInterfaceTo(a_ppProgress); 702 } 703 else 704 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc); 705 } 706 } 707 catch (std::bad_alloc) 708 { 709 hrc = E_OUTOFMEMORY; 710 } 711 if (pJob) 712 delete pJob; 713 } 714 else 715 hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str()); 716 } 628 } 629 catch (std::bad_alloc) 630 { 631 hrc = E_OUTOFMEMORY; 632 } 633 if (pJob) 634 delete pJob; 635 } 636 else 637 hrc = setError(E_FAIL, "%s", m->strWhyUnusable.c_str()); 717 638 return hrc; 718 639 } … … 760 681 /* u32Padding = */ 0, 761 682 /* pszVBoxVersion = */ "", 762 /* pfnFindModule = */ ExtPack:: hlpFindModule,763 /* pfnGetFilePath = */ ExtPack:: hlpGetFilePath,764 /* pfnGetContext = */ ExtPack:: hlpGetContext,765 /* pfnLoadHGCMService = */ ExtPack:: hlpLoadHGCMService,766 /* pfnReserved1 = */ ExtPack:: hlpReservedN,767 /* pfnReserved2 = */ ExtPack:: hlpReservedN,768 /* pfnReserved3 = */ ExtPack:: hlpReservedN,769 /* pfnReserved4 = */ ExtPack:: hlpReservedN,770 /* pfnReserved5 = */ ExtPack:: hlpReservedN,771 /* pfnReserved6 = */ ExtPack:: hlpReservedN,772 /* pfnReserved7 = */ ExtPack:: hlpReservedN,773 /* pfnReserved8 = */ ExtPack:: hlpReservedN,683 /* pfnFindModule = */ ExtPack::i_hlpFindModule, 684 /* pfnGetFilePath = */ ExtPack::i_hlpGetFilePath, 685 /* pfnGetContext = */ ExtPack::i_hlpGetContext, 686 /* pfnLoadHGCMService = */ ExtPack::i_hlpLoadHGCMService, 687 /* pfnReserved1 = */ ExtPack::i_hlpReservedN, 688 /* pfnReserved2 = */ ExtPack::i_hlpReservedN, 689 /* pfnReserved3 = */ ExtPack::i_hlpReservedN, 690 /* pfnReserved4 = */ ExtPack::i_hlpReservedN, 691 /* pfnReserved5 = */ ExtPack::i_hlpReservedN, 692 /* pfnReserved6 = */ ExtPack::i_hlpReservedN, 693 /* pfnReserved7 = */ ExtPack::i_hlpReservedN, 694 /* pfnReserved8 = */ ExtPack::i_hlpReservedN, 774 695 /* u32EndMarker = */ VBOXEXTPACKHLP_VERSION 775 696 }; … … 800 721 * Probe the extension pack (this code is shared with refresh()). 801 722 */ 802 probeAndLoad();723 i_probeAndLoad(); 803 724 804 725 autoInitSpan.setSucceeded(); … … 850 771 * @param pErrInfo Where to return error information. 851 772 */ 852 bool ExtPack:: callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo)773 bool ExtPack::i_callInstalledHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock, PRTERRINFO pErrInfo) 853 774 { 854 775 if ( m != NULL … … 877 798 * @remarks The caller holds the manager's write lock, not released. 878 799 */ 879 HRESULT ExtPack:: callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval)800 HRESULT ExtPack::i_callUninstallHookAndClose(IVirtualBox *a_pVirtualBox, bool a_fForcedRemoval) 880 801 { 881 802 HRESULT hrc = S_OK; … … 912 833 * @param a_pLock The write lock held by the caller. 913 834 */ 914 bool ExtPack:: callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock)835 bool ExtPack::i_callVirtualBoxReadyHook(IVirtualBox *a_pVirtualBox, AutoWriteLock *a_pLock) 915 836 { 916 837 if ( m != NULL … … 938 859 * @param a_pLock The write lock held by the caller. 939 860 */ 940 bool ExtPack:: callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock)861 bool ExtPack::i_callConsoleReadyHook(IConsole *a_pConsole, AutoWriteLock *a_pLock) 941 862 { 942 863 if ( m != NULL … … 965 886 * @param a_pLock The write lock held by the caller. 966 887 */ 967 bool ExtPack:: callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock)888 bool ExtPack::i_callVmCreatedHook(IVirtualBox *a_pVirtualBox, IMachine *a_pMachine, AutoWriteLock *a_pLock) 968 889 { 969 890 if ( m != NULL … … 993 914 * called on if a failure status is returned. 994 915 */ 995 bool ExtPack:: callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)916 bool ExtPack::i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc) 996 917 { 997 918 *a_pvrc = VINF_SUCCESS; … … 1025 946 * called on if a failure status is returned. 1026 947 */ 1027 bool ExtPack:: callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc)948 bool ExtPack::i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc) 1028 949 { 1029 950 *a_pvrc = VINF_SUCCESS; … … 1054 975 * @param a_pLock The write lock held by the caller. 1055 976 */ 1056 bool ExtPack:: callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock)977 bool ExtPack::i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock) 1057 978 { 1058 979 if ( m != NULL … … 1079 1000 * necessary. 1080 1001 */ 1081 HRESULT ExtPack:: checkVrde(void)1002 HRESULT ExtPack::i_checkVrde(void) 1082 1003 { 1083 1004 HRESULT hrc; … … 1104 1025 * necessary. 1105 1026 */ 1106 HRESULT ExtPack:: getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary)1107 { 1108 HRESULT hrc = checkVrde();1027 HRESULT ExtPack::i_getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary) 1028 { 1029 HRESULT hrc = i_checkVrde(); 1109 1030 if (SUCCEEDED(hrc)) 1110 1031 { 1111 if ( findModule(m->Desc.strVrdeModule.c_str(), NULL, VBOXEXTPACKMODKIND_R3,1112 a_pstrVrdeLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/))1032 if (i_findModule(m->Desc.strVrdeModule.c_str(), NULL, VBOXEXTPACKMODKIND_R3, 1033 a_pstrVrdeLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/)) 1113 1034 hrc = S_OK; 1114 1035 else … … 1129 1050 * necessary. 1130 1051 */ 1131 HRESULT ExtPack:: getLibraryName(const char *a_pszModuleName, Utf8Str *a_pstrLibrary)1052 HRESULT ExtPack::i_getLibraryName(const char *a_pszModuleName, Utf8Str *a_pstrLibrary) 1132 1053 { 1133 1054 HRESULT hrc; 1134 if ( findModule(a_pszModuleName, NULL, VBOXEXTPACKMODKIND_R3,1135 a_pstrLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/))1055 if (i_findModule(a_pszModuleName, NULL, VBOXEXTPACKMODKIND_R3, 1056 a_pstrLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/)) 1136 1057 hrc = S_OK; 1137 1058 else … … 1150 1071 * necessary. 1151 1072 */ 1152 bool ExtPack:: wantsToBeDefaultVrde(void) const1073 bool ExtPack::i_wantsToBeDefaultVrde(void) const 1153 1074 { 1154 1075 return m->fUsable … … 1168 1089 * @remarks Only called in VBoxSVC. 1169 1090 */ 1170 HRESULT ExtPack:: refresh(bool *a_pfCanDelete)1091 HRESULT ExtPack::i_refresh(bool *a_pfCanDelete) 1171 1092 { 1172 1093 if (a_pfCanDelete) … … 1213 1134 { 1214 1135 if (m->hMainMod == NIL_RTLDRMOD) 1215 probeAndLoad();1216 else if ( ! objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)1217 || ! objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)1218 || ! objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )1136 i_probeAndLoad(); 1137 else if ( !i_objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc) 1138 || !i_objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod) 1139 || !i_objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) ) 1219 1140 { 1220 1141 /** @todo not important, so it can wait. */ … … 1225 1146 * reprobe the extension pack. 1226 1147 */ 1227 else if ( ! objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc)1228 || ! objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod)1229 || ! objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) )1230 probeAndLoad();1148 else if ( !i_objinfoIsEqual(&ObjInfoDesc, &m->ObjInfoDesc) 1149 || !i_objinfoIsEqual(&ObjInfoMainMod, &m->ObjInfoMainMod) 1150 || !i_objinfoIsEqual(&ObjInfoExtPack, &m->ObjInfoExtPack) ) 1151 i_probeAndLoad(); 1231 1152 1232 1153 return S_OK; … … 1240 1161 * being the most important ones. 1241 1162 */ 1242 void ExtPack:: probeAndLoad(void)1163 void ExtPack::i_probeAndLoad(void) 1243 1164 { 1244 1165 m->fUsable = false; … … 1307 1228 */ 1308 1229 bool fIsNative; 1309 if (! findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3,1310 &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod))1230 if (!i_findModule(m->Desc.strMainModule.c_str(), NULL /* default extension */, VBOXEXTPACKMODKIND_R3, 1231 &m->strMainModPath, &fIsNative, &m->ObjInfoMainMod)) 1311 1232 { 1312 1233 m->strWhyUnusable.printf(tr("Failed to locate the main module ('%s')"), m->Desc.strMainModule.c_str()); … … 1408 1329 * the module. Optional. 1409 1330 */ 1410 bool ExtPack:: findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind,1411 Utf8Str *a_pStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const1331 bool ExtPack::i_findModule(const char *a_pszName, const char *a_pszExt, VBOXEXTPACKMODKIND a_enmKind, 1332 Utf8Str *a_pStrFound, bool *a_pfNative, PRTFSOBJINFO a_pObjInfo) const 1412 1333 { 1413 1334 /* … … 1500 1421 * @todo IPRT should do this, really. 1501 1422 */ 1502 /* static */ bool ExtPack:: objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2)1423 /* static */ bool ExtPack::i_objinfoIsEqual(PCRTFSOBJINFO pObjInfo1, PCRTFSOBJINFO pObjInfo2) 1503 1424 { 1504 1425 if (!RTTimeSpecIsEqual(&pObjInfo1->ModificationTime, &pObjInfo2->ModificationTime)) … … 1540 1461 */ 1541 1462 /*static*/ DECLCALLBACK(int) 1542 ExtPack:: hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, VBOXEXTPACKMODKIND enmKind,1543 char *pszFound, size_t cbFound, bool *pfNative)1463 ExtPack::i_hlpFindModule(PCVBOXEXTPACKHLP pHlp, const char *pszName, const char *pszExt, VBOXEXTPACKMODKIND enmKind, 1464 char *pszFound, size_t cbFound, bool *pfNative) 1544 1465 { 1545 1466 /* … … 1563 1484 */ 1564 1485 Utf8Str strFound; 1565 if (pThis-> findModule(pszName, pszExt, enmKind, &strFound, pfNative, NULL))1486 if (pThis->i_findModule(pszName, pszExt, enmKind, &strFound, pfNative, NULL)) 1566 1487 return RTStrCopy(pszFound, cbFound, strFound.c_str()); 1567 1488 return VERR_FILE_NOT_FOUND; … … 1569 1490 1570 1491 /*static*/ DECLCALLBACK(int) 1571 ExtPack:: hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath)1492 ExtPack::i_hlpGetFilePath(PCVBOXEXTPACKHLP pHlp, const char *pszFilename, char *pszPath, size_t cbPath) 1572 1493 { 1573 1494 /* … … 1595 1516 1596 1517 /*static*/ DECLCALLBACK(VBOXEXTPACKCTX) 1597 ExtPack:: hlpGetContext(PCVBOXEXTPACKHLP pHlp)1518 ExtPack::i_hlpGetContext(PCVBOXEXTPACKHLP pHlp) 1598 1519 { 1599 1520 /* … … 1611 1532 1612 1533 /*static*/ DECLCALLBACK(int) 1613 ExtPack:: hlpLoadHGCMService(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IConsole) *pConsole,1614 const char *pszServiceLibrary, const char *pszServiceName)1534 ExtPack::i_hlpLoadHGCMService(PCVBOXEXTPACKHLP pHlp, VBOXEXTPACK_IF_CS(IConsole) *pConsole, 1535 const char *pszServiceLibrary, const char *pszServiceName) 1615 1536 { 1616 1537 #ifdef VBOX_COM_INPROC … … 1638 1559 1639 1560 /*static*/ DECLCALLBACK(int) 1640 ExtPack:: hlpReservedN(PCVBOXEXTPACKHLP pHlp)1561 ExtPack::i_hlpReservedN(PCVBOXEXTPACKHLP pHlp) 1641 1562 { 1642 1563 /* … … 1656 1577 1657 1578 1658 1659 STDMETHODIMP ExtPack::COMGETTER(Name)(BSTR *a_pbstrName) 1660 { 1661 CheckComArgOutPointerValid(a_pbstrName); 1662 1663 AutoCaller autoCaller(this); 1664 HRESULT hrc = autoCaller.rc(); 1665 if (SUCCEEDED(hrc)) 1666 { 1667 Bstr str(m->Desc.strName); 1668 str.cloneTo(a_pbstrName); 1669 } 1670 return hrc; 1671 } 1672 1673 STDMETHODIMP ExtPack::COMGETTER(Description)(BSTR *a_pbstrDescription) 1674 { 1675 CheckComArgOutPointerValid(a_pbstrDescription); 1676 1677 AutoCaller autoCaller(this); 1678 HRESULT hrc = autoCaller.rc(); 1679 if (SUCCEEDED(hrc)) 1680 { 1681 Bstr str(m->Desc.strDescription); 1682 str.cloneTo(a_pbstrDescription); 1683 } 1684 return hrc; 1685 } 1686 1687 STDMETHODIMP ExtPack::COMGETTER(Version)(BSTR *a_pbstrVersion) 1688 { 1689 CheckComArgOutPointerValid(a_pbstrVersion); 1690 1691 AutoCaller autoCaller(this); 1692 HRESULT hrc = autoCaller.rc(); 1693 if (SUCCEEDED(hrc)) 1694 { 1695 Bstr str(m->Desc.strVersion); 1696 str.cloneTo(a_pbstrVersion); 1697 } 1698 return hrc; 1699 } 1700 1701 STDMETHODIMP ExtPack::COMGETTER(Revision)(ULONG *a_puRevision) 1702 { 1703 CheckComArgOutPointerValid(a_puRevision); 1704 1705 AutoCaller autoCaller(this); 1706 HRESULT hrc = autoCaller.rc(); 1707 if (SUCCEEDED(hrc)) 1708 *a_puRevision = m->Desc.uRevision; 1709 return hrc; 1710 } 1711 1712 STDMETHODIMP ExtPack::COMGETTER(Edition)(BSTR *a_pbstrEdition) 1713 { 1714 CheckComArgOutPointerValid(a_pbstrEdition); 1715 1716 AutoCaller autoCaller(this); 1717 HRESULT hrc = autoCaller.rc(); 1718 if (SUCCEEDED(hrc)) 1719 { 1720 Bstr str(m->Desc.strEdition); 1721 str.cloneTo(a_pbstrEdition); 1722 } 1723 return hrc; 1724 } 1725 1726 STDMETHODIMP ExtPack::COMGETTER(VRDEModule)(BSTR *a_pbstrVrdeModule) 1727 { 1728 CheckComArgOutPointerValid(a_pbstrVrdeModule); 1729 1730 AutoCaller autoCaller(this); 1731 HRESULT hrc = autoCaller.rc(); 1732 if (SUCCEEDED(hrc)) 1733 { 1734 Bstr str(m->Desc.strVrdeModule); 1735 str.cloneTo(a_pbstrVrdeModule); 1736 } 1737 return hrc; 1738 } 1739 1740 STDMETHODIMP ExtPack::COMGETTER(PlugIns)(ComSafeArrayOut(IExtPackPlugIn *, a_paPlugIns)) 1579 HRESULT ExtPack::getName(com::Utf8Str &aName) 1580 { 1581 aName = m->Desc.strName; 1582 return S_OK; 1583 } 1584 1585 HRESULT ExtPack::getDescription(com::Utf8Str &aDescription) 1586 { 1587 aDescription = m->Desc.strDescription; 1588 return S_OK; 1589 } 1590 1591 HRESULT ExtPack::getVersion(com::Utf8Str &aVersion) 1592 { 1593 aVersion = m->Desc.strVersion; 1594 return S_OK; 1595 } 1596 1597 HRESULT ExtPack::getRevision(ULONG *aRevision) 1598 { 1599 *aRevision = m->Desc.uRevision; 1600 return S_OK; 1601 } 1602 1603 HRESULT ExtPack::getEdition(com::Utf8Str &aEdition) 1604 { 1605 aEdition = m->Desc.strEdition; 1606 return S_OK; 1607 } 1608 1609 HRESULT ExtPack::getVRDEModule(com::Utf8Str &aVRDEModule) 1610 { 1611 aVRDEModule = m->Desc.strVrdeModule; 1612 return S_OK; 1613 } 1614 1615 HRESULT ExtPack::getPlugIns(std::vector<ComPtr<IExtPackPlugIn> > &aPlugIns) 1741 1616 { 1742 1617 /** @todo implement plug-ins. */ 1743 1618 #ifdef VBOX_WITH_XPCOM 1744 NOREF(a_paPlugIns); 1745 NOREF(a_paPlugInsSize); 1619 NOREF(aPlugIns); 1746 1620 #endif 1621 NOREF(aPlugIns); 1747 1622 ReturnComNotImplemented(); 1748 1623 } 1749 1624 1750 STDMETHODIMP ExtPack::COMGETTER(Usable)(BOOL *a_pfUsable) 1751 { 1752 CheckComArgOutPointerValid(a_pfUsable); 1753 1754 AutoCaller autoCaller(this); 1755 HRESULT hrc = autoCaller.rc(); 1756 if (SUCCEEDED(hrc)) 1757 *a_pfUsable = m->fUsable; 1758 return hrc; 1759 } 1760 1761 STDMETHODIMP ExtPack::COMGETTER(WhyUnusable)(BSTR *a_pbstrWhy) 1762 { 1763 CheckComArgOutPointerValid(a_pbstrWhy); 1764 1765 AutoCaller autoCaller(this); 1766 HRESULT hrc = autoCaller.rc(); 1767 if (SUCCEEDED(hrc)) 1768 m->strWhyUnusable.cloneTo(a_pbstrWhy); 1769 return hrc; 1770 } 1771 1772 STDMETHODIMP ExtPack::COMGETTER(ShowLicense)(BOOL *a_pfShowIt) 1773 { 1774 CheckComArgOutPointerValid(a_pfShowIt); 1775 1776 AutoCaller autoCaller(this); 1777 HRESULT hrc = autoCaller.rc(); 1778 if (SUCCEEDED(hrc)) 1779 *a_pfShowIt = m->Desc.fShowLicense; 1780 return hrc; 1781 } 1782 1783 STDMETHODIMP ExtPack::COMGETTER(License)(BSTR *a_pbstrHtmlLicense) 1784 { 1785 Bstr bstrHtml("html"); 1786 return QueryLicense(Bstr::Empty.raw(), Bstr::Empty.raw(), bstrHtml.raw(), a_pbstrHtmlLicense); 1787 } 1788 1789 STDMETHODIMP ExtPack::QueryLicense(IN_BSTR a_bstrPreferredLocale, IN_BSTR a_bstrPreferredLanguage, IN_BSTR a_bstrFormat, 1790 BSTR *a_pbstrLicense) 1791 { 1625 HRESULT ExtPack::getUsable(BOOL *aUsable) 1626 { 1627 *aUsable = m->fUsable; 1628 return S_OK; 1629 } 1630 1631 HRESULT ExtPack::getWhyUnusable(com::Utf8Str &aWhyUnusable) 1632 { 1633 aWhyUnusable = m->strWhyUnusable; 1634 return S_OK; 1635 } 1636 1637 HRESULT ExtPack::getShowLicense(BOOL *aShowLicense) 1638 { 1639 *aShowLicense = m->Desc.fShowLicense; 1640 return S_OK; 1641 } 1642 1643 HRESULT ExtPack::getLicense(com::Utf8Str &aLicense) 1644 { 1645 Utf8Str strHtml("html"); 1646 Utf8Str str(""); 1647 return queryLicense(str, str, strHtml, aLicense); 1648 } 1649 1650 HRESULT ExtPack::queryLicense(const com::Utf8Str &aPreferredLocale, const com::Utf8Str &aPreferredLanguage, 1651 const com::Utf8Str &aFormat, com::Utf8Str &aLicenseText) 1652 { 1653 HRESULT hrc = S_OK; 1654 1792 1655 /* 1793 1656 * Validate input. 1794 1657 */ 1795 CheckComArgOutPointerValid(a_pbstrLicense); 1796 CheckComArgNotNull(a_bstrPreferredLocale); 1797 CheckComArgNotNull(a_bstrPreferredLanguage); 1798 CheckComArgNotNull(a_bstrFormat); 1799 1800 Utf8Str strPreferredLocale(a_bstrPreferredLocale); 1801 if (strPreferredLocale.length() != 2 && strPreferredLocale.length() != 0) 1658 if (aPreferredLocale.length() != 2 && aPreferredLocale.length() != 0) 1802 1659 return setError(E_FAIL, tr("The preferred locale is a two character string or empty.")); 1803 1660 1804 Utf8Str strPreferredLanguage(a_bstrPreferredLanguage); 1805 if (strPreferredLanguage.length() != 2 && strPreferredLanguage.length() != 0) 1661 if (aPreferredLanguage.length() != 2 && aPreferredLanguage.length() != 0) 1806 1662 return setError(E_FAIL, tr("The preferred lanuage is a two character string or empty.")); 1807 1663 1808 Utf8Str strFormat(a_bstrFormat); 1809 if ( !strFormat.equals("html") 1810 && !strFormat.equals("rtf") 1811 && !strFormat.equals("txt")) 1664 if ( !aFormat.equals("html") 1665 && !aFormat.equals("rtf") 1666 && !aFormat.equals("txt")) 1812 1667 return setError(E_FAIL, tr("The license format can only have the values 'html', 'rtf' and 'txt'.")); 1813 1668 … … 1816 1671 */ 1817 1672 char szName[sizeof(VBOX_EXTPACK_LICENSE_NAME_PREFIX "-de_DE.html") + 2]; 1818 if ( strPreferredLocale.isNotEmpty() && strPreferredLanguage.isNotEmpty())1673 if (aPreferredLocale.isNotEmpty() && aPreferredLanguage.isNotEmpty()) 1819 1674 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s_%s.%s", 1820 strPreferredLocale.c_str(), strPreferredLanguage.c_str(), strFormat.c_str());1821 else if ( strPreferredLocale.isNotEmpty())1675 aPreferredLocale.c_str(), aPreferredLanguage.c_str(), aFormat.c_str()); 1676 else if (aPreferredLocale.isNotEmpty()) 1822 1677 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-%s.%s", 1823 strPreferredLocale.c_str(), strFormat.c_str());1824 else if ( strPreferredLanguage.isNotEmpty())1678 aPreferredLocale.c_str(), aFormat.c_str()); 1679 else if (aPreferredLanguage.isNotEmpty()) 1825 1680 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX "-_%s.%s", 1826 strPreferredLocale.c_str(), strFormat.c_str());1681 aPreferredLocale.c_str(), aFormat.c_str()); 1827 1682 else 1828 1683 RTStrPrintf(szName, sizeof(szName), VBOX_EXTPACK_LICENSE_NAME_PREFIX ".%s", 1829 strFormat.c_str());1684 aFormat.c_str()); 1830 1685 1831 1686 /* 1832 1687 * Effectuate the query. 1833 1688 */ 1834 AutoCaller autoCaller(this); 1835 HRESULT hrc = autoCaller.rc(); 1836 if (SUCCEEDED(hrc)) 1837 { 1838 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* paranoia */ 1839 1840 if (!m->fUsable) 1841 hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str()); 1842 else 1843 { 1844 char szPath[RTPATH_MAX]; 1845 int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szName); 1689 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); /* paranoia */ 1690 1691 if (!m->fUsable) 1692 hrc = setError(E_FAIL, tr("%s"), m->strWhyUnusable.c_str()); 1693 else 1694 { 1695 char szPath[RTPATH_MAX]; 1696 int vrc = RTPathJoin(szPath, sizeof(szPath), m->strExtPackPath.c_str(), szName); 1697 if (RT_SUCCESS(vrc)) 1698 { 1699 void *pvFile; 1700 size_t cbFile; 1701 vrc = RTFileReadAllEx(szPath, 0, RTFOFF_MAX, RTFILE_RDALL_O_DENY_READ, &pvFile, &cbFile); 1846 1702 if (RT_SUCCESS(vrc)) 1847 1703 { 1848 void *pvFile; 1849 size_t cbFile; 1850 vrc = RTFileReadAllEx(szPath, 0, RTFOFF_MAX, RTFILE_RDALL_O_DENY_READ, &pvFile, &cbFile); 1851 if (RT_SUCCESS(vrc)) 1704 Bstr bstrLicense((const char *)pvFile, cbFile); 1705 if (bstrLicense.isNotEmpty()) 1852 1706 { 1853 Bstr bstrLicense((const char *)pvFile, cbFile); 1854 if (bstrLicense.isNotEmpty()) 1855 { 1856 bstrLicense.detachTo(a_pbstrLicense); 1857 hrc = S_OK; 1858 } 1859 else 1860 hrc = setError(VBOX_E_IPRT_ERROR, tr("The license file '%s' is empty or contains invalid UTF-8 encoding"), 1861 szPath); 1862 RTFileReadAllFree(pvFile, cbFile); 1707 aLicenseText = Utf8Str(bstrLicense); 1708 hrc = S_OK; 1863 1709 } 1864 else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND)1865 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in extension pack '%s'"),1866 szName, m->Desc.strName.c_str());1867 1710 else 1868 hrc = setError(VBOX_E_FILE_ERROR, tr("Failed to open the license file '%s': %Rrc"), szPath, vrc); 1711 hrc = setError(VBOX_E_IPRT_ERROR, tr("The license file '%s' is empty or contains invalid UTF-8 encoding"), 1712 szPath); 1713 RTFileReadAllFree(pvFile, cbFile); 1869 1714 } 1715 else if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND) 1716 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("The license file '%s' was not found in extension pack '%s'"), 1717 szName, m->Desc.strName.c_str()); 1870 1718 else 1871 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTPathJoin failed: %Rrc"), vrc); 1872 } 1719 hrc = setError(VBOX_E_FILE_ERROR, tr("Failed to open the license file '%s': %Rrc"), szPath, vrc); 1720 } 1721 else 1722 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTPathJoin failed: %Rrc"), vrc); 1873 1723 } 1874 1724 return hrc; 1875 1725 } 1876 1726 1877 1878 STDMETHODIMP ExtPack::QueryObject(IN_BSTR a_bstrObjectId, IUnknown **a_ppUnknown) 1727 HRESULT ExtPack::queryObject(const com::Utf8Str &aObjUuid, ComPtr<IUnknown> &aReturnInterface) 1879 1728 { 1880 1729 com::Guid ObjectId; 1881 CheckComArgGuid(a_bstrObjectId, ObjectId); 1882 CheckComArgOutPointerValid(a_ppUnknown); 1883 1884 AutoCaller autoCaller(this); 1885 HRESULT hrc = autoCaller.rc(); 1886 if (SUCCEEDED(hrc)) 1887 { 1888 if ( m->pReg 1889 && m->pReg->pfnQueryObject) 1890 { 1891 void *pvUnknown = m->pReg->pfnQueryObject(m->pReg, ObjectId.raw()); 1892 if (pvUnknown) 1893 *a_ppUnknown = (IUnknown *)pvUnknown; 1894 else 1895 hrc = E_NOINTERFACE; 1896 } 1730 CheckComArgGuid(aObjUuid, ObjectId); 1731 1732 HRESULT hrc S_OK; 1733 1734 if ( m->pReg 1735 && m->pReg->pfnQueryObject) 1736 { 1737 void *pvUnknown = m->pReg->pfnQueryObject(m->pReg, ObjectId.raw()); 1738 if (pvUnknown) 1739 aReturnInterface = (IUnknown *)pvUnknown; 1897 1740 else 1898 1741 hrc = E_NOINTERFACE; 1899 1742 } 1743 else 1744 hrc = E_NOINTERFACE; 1900 1745 return hrc; 1901 1746 } 1902 1903 1904 1905 1747 1906 1748 DEFINE_EMPTY_CTOR_DTOR(ExtPackManager) … … 2057 1899 } 2058 1900 2059 2060 STDMETHODIMP ExtPackManager::COMGETTER(InstalledExtPacks)(ComSafeArrayOut(IExtPack *, a_paExtPacks)) 2061 { 2062 CheckComArgOutSafeArrayPointerValid(a_paExtPacks); 1901 HRESULT ExtPackManager::getInstalledExtPacks(std::vector<ComPtr<IExtPack> > &aInstalledExtPacks) 1902 { 2063 1903 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); 2064 1904 2065 AutoCaller autoCaller(this); 2066 HRESULT hrc = autoCaller.rc(); 2067 if (SUCCEEDED(hrc)) 2068 { 2069 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 2070 2071 SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks); 2072 SaExtPacks.detachTo(ComSafeArrayOutArg(a_paExtPacks)); 2073 } 1905 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 1906 1907 1908 SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks); 1909 aInstalledExtPacks.resize(SaExtPacks.size()); 1910 for(size_t i = 0; i < SaExtPacks.size(); ++i) 1911 aInstalledExtPacks[i] = SaExtPacks[i]; 1912 1913 return S_OK; 1914 } 1915 1916 HRESULT ExtPackManager::find(const com::Utf8Str &aName, ComPtr<IExtPack> &aReturnData) 1917 { 1918 HRESULT hrc = S_OK; 1919 1920 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); 1921 1922 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 1923 1924 ComPtr<ExtPack> ptrExtPack = i_findExtPack(aName.c_str()); 1925 if (!ptrExtPack.isNull()) 1926 ptrExtPack.queryInterfaceTo(aReturnData.asOutParam()); 1927 else 1928 hrc = VBOX_E_OBJECT_NOT_FOUND; 2074 1929 2075 1930 return hrc; 2076 1931 } 2077 1932 2078 STDMETHODIMP ExtPackManager::Find(IN_BSTR a_bstrName, IExtPack **a_pExtPack) 2079 { 2080 CheckComArgNotNull(a_bstrName); 2081 CheckComArgOutPointerValid(a_pExtPack); 2082 Utf8Str strName(a_bstrName); 2083 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); 2084 2085 AutoCaller autoCaller(this); 2086 HRESULT hrc = autoCaller.rc(); 2087 if (SUCCEEDED(hrc)) 2088 { 2089 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 2090 2091 ComPtr<ExtPack> ptrExtPack = findExtPack(strName.c_str()); 2092 if (!ptrExtPack.isNull()) 2093 ptrExtPack.queryInterfaceTo(a_pExtPack); 2094 else 2095 hrc = VBOX_E_OBJECT_NOT_FOUND; 2096 } 2097 2098 return hrc; 2099 } 2100 2101 STDMETHODIMP ExtPackManager::OpenExtPackFile(IN_BSTR a_bstrTarballAndDigest, IExtPackFile **a_ppExtPackFile) 2102 { 2103 CheckComArgNotNull(a_bstrTarballAndDigest); 2104 CheckComArgOutPointerValid(a_ppExtPackFile); 1933 HRESULT ExtPackManager::openExtPackFile(const com::Utf8Str &aPath, ComPtr<IExtPackFile> &aFile) 1934 { 2105 1935 AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED); 2106 1936 … … 2111 1941 Utf8Str strTarball; 2112 1942 Utf8Str strDigest; 2113 Utf8Str strTarballAndDigest(a_bstrTarballAndDigest); 2114 size_t offSha256 = strTarballAndDigest.find("::SHA-256="); 1943 size_t offSha256 = aPath.find("::SHA-256="); 2115 1944 if (offSha256 == Utf8Str::npos) 2116 strTarball = strTarballAndDigest;1945 strTarball = aPath; 2117 1946 else 2118 1947 { 2119 strTarball = strTarballAndDigest.substr(0, offSha256);2120 strDigest = strTarballAndDigest.substr(offSha256 + sizeof("::SHA-256=") - 1);1948 strTarball = aPath.substr(0, offSha256); 1949 strDigest = aPath.substr(offSha256 + sizeof("::SHA-256=") - 1); 2121 1950 } 2122 1951 … … 2126 1955 hrc = NewExtPackFile->initWithFile(strTarball.c_str(), strDigest.c_str(), this, m->pVirtualBox); 2127 1956 if (SUCCEEDED(hrc)) 2128 NewExtPackFile.queryInterfaceTo(a _ppExtPackFile);1957 NewExtPackFile.queryInterfaceTo(aFile.asOutParam()); 2129 1958 2130 1959 return hrc; … … 2134 1963 } 2135 1964 2136 STDMETHODIMP ExtPackManager::Uninstall(IN_BSTR a_bstrName, BOOL a_fForcedRemoval, IN_BSTR a_bstrDisplayInfo, 2137 IProgress **a_ppProgress) 2138 { 2139 CheckComArgNotNull(a_bstrName); 2140 if (a_ppProgress) 2141 *a_ppProgress = NULL; 1965 HRESULT ExtPackManager::uninstall(const com::Utf8Str &aName, BOOL aForcedRemoval, 1966 const com::Utf8Str &aDisplayInfo, ComPtr<IProgress> &aProgress) 1967 { 1968 HRESULT hrc = S_OK; 1969 2142 1970 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); 2143 1971 2144 1972 #if !defined(VBOX_COM_INPROC) 2145 AutoCaller autoCaller(this); 2146 HRESULT hrc = autoCaller.rc(); 2147 if (SUCCEEDED(hrc)) 2148 { 2149 PEXTPACKUNINSTALLJOB pJob = NULL; 2150 try 2151 { 2152 pJob = new EXTPACKUNINSTALLJOB; 2153 pJob->ptrExtPackMgr = this; 2154 pJob->strName = a_bstrName; 2155 pJob->fForcedRemoval = a_fForcedRemoval != FALSE; 2156 pJob->strDisplayInfo = a_bstrDisplayInfo; 2157 hrc = pJob->ptrProgress.createObject(); 2158 if (SUCCEEDED(hrc)) 1973 PEXTPACKUNINSTALLJOB pJob = NULL; 1974 try 1975 { 1976 pJob = new EXTPACKUNINSTALLJOB; 1977 pJob->ptrExtPackMgr = this; 1978 pJob->strName = aName; 1979 pJob->fForcedRemoval = aForcedRemoval != FALSE; 1980 pJob->strDisplayInfo = aDisplayInfo; 1981 hrc = pJob->ptrProgress.createObject(); 1982 if (SUCCEEDED(hrc)) 1983 { 1984 Bstr bstrDescription = tr("Uninstalling extension pack"); 1985 hrc = pJob->ptrProgress->init( 1986 #ifndef VBOX_COM_INPROC 1987 m->pVirtualBox, 1988 #endif 1989 static_cast<IExtPackManager *>(this), 1990 bstrDescription.raw(), 1991 FALSE /*aCancelable*/, 1992 NULL /*aId*/); 1993 } 1994 if (SUCCEEDED(hrc)) 1995 { 1996 ComPtr<Progress> ptrProgress = pJob->ptrProgress; 1997 int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::i_doUninstallThreadProc, pJob, 0, 1998 RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackUninst"); 1999 if (RT_SUCCESS(vrc)) 2159 2000 { 2160 Bstr bstrDescription = tr("Uninstalling extension pack"); 2161 hrc = pJob->ptrProgress->init( 2162 #ifndef VBOX_COM_INPROC 2163 m->pVirtualBox, 2164 #endif 2165 static_cast<IExtPackManager *>(this), 2166 bstrDescription.raw(), 2167 FALSE /*aCancelable*/, 2168 NULL /*aId*/); 2001 pJob = NULL; /* the thread deletes it */ 2002 ptrProgress.queryInterfaceTo(aProgress.asOutParam()); 2169 2003 } 2170 if (SUCCEEDED(hrc)) 2171 { 2172 ComPtr<Progress> ptrProgress = pJob->ptrProgress; 2173 int vrc = RTThreadCreate(NULL /*phThread*/, ExtPackManager::doUninstallThreadProc, pJob, 0, 2174 RTTHREADTYPE_DEFAULT, 0 /*fFlags*/, "ExtPackUninst"); 2175 if (RT_SUCCESS(vrc)) 2176 { 2177 pJob = NULL; /* the thread deletes it */ 2178 ptrProgress.queryInterfaceTo(a_ppProgress); 2179 } 2180 else 2181 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc); 2182 } 2183 } 2184 catch (std::bad_alloc) 2185 { 2186 hrc = E_OUTOFMEMORY; 2187 } 2188 if (pJob) 2189 delete pJob; 2190 } 2004 else 2005 hrc = setError(VBOX_E_IPRT_ERROR, tr("RTThreadCreate failed with %Rrc"), vrc); 2006 } 2007 } 2008 catch (std::bad_alloc) 2009 { 2010 hrc = E_OUTOFMEMORY; 2011 } 2012 if (pJob) 2013 delete pJob; 2191 2014 2192 2015 return hrc; … … 2196 2019 } 2197 2020 2198 STDMETHODIMP ExtPackManager::Cleanup(void)2021 HRESULT ExtPackManager::cleanup(void) 2199 2022 { 2200 2023 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); … … 2211 2034 */ 2212 2035 AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); 2213 hrc = runSetUidToRootHelper(NULL,2214 "cleanup",2215 "--base-dir", m->strBaseDir.c_str(),2216 (const char *)NULL);2036 hrc = i_runSetUidToRootHelper(NULL, 2037 "cleanup", 2038 "--base-dir", m->strBaseDir.c_str(), 2039 (const char *)NULL); 2217 2040 } 2218 2041 … … 2220 2043 } 2221 2044 2222 STDMETHODIMP ExtPackManager::QueryAllPlugInsForFrontend(IN_BSTR a_bstrFrontend, ComSafeArrayOut(BSTR, a_pabstrPlugInModules)) 2223 { 2224 CheckComArgNotNull(a_bstrFrontend); 2225 Utf8Str strName(a_bstrFrontend); 2226 CheckComArgOutSafeArrayPointerValid(a_pabstrPlugInModules); 2227 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); 2228 2229 AutoCaller autoCaller(this); 2230 HRESULT hrc = autoCaller.rc(); 2231 if (SUCCEEDED(hrc)) 2232 { 2233 com::SafeArray<BSTR> saPaths((size_t)0); 2234 /** @todo implement plug-ins */ 2235 saPaths.detachTo(ComSafeArrayOutArg(a_pabstrPlugInModules)); 2236 } 2237 return hrc; 2238 } 2239 2240 STDMETHODIMP ExtPackManager::IsExtPackUsable(IN_BSTR a_bstrExtPack, BOOL *aUsable) 2241 { 2242 CheckComArgNotNull(a_bstrExtPack); 2243 Utf8Str strExtPack(a_bstrExtPack); 2244 *aUsable = isExtPackUsable(strExtPack.c_str()); 2045 HRESULT ExtPackManager::queryAllPlugInsForFrontend(const com::Utf8Str &aFrontendName, std::vector<com::Utf8Str> &aPlugInModules) 2046 { 2047 aPlugInModules.resize(0); 2048 return S_OK; 2049 } 2050 2051 HRESULT ExtPackManager::isExtPackUsable(const com::Utf8Str &aName, BOOL *aUsable) 2052 { 2053 *aUsable = i_isExtPackUsable(aName.c_str()); 2245 2054 return S_OK; 2246 2055 } … … 2275 2084 * NULL. 2276 2085 */ 2277 HRESULT ExtPackManager:: runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...)2086 HRESULT ExtPackManager::i_runSetUidToRootHelper(Utf8Str const *a_pstrDisplayInfo, const char *a_pszCommand, ...) 2278 2087 { 2279 2088 /* … … 2483 2292 * @param a_pszName The name of the extension pack. 2484 2293 */ 2485 ExtPack *ExtPackManager:: findExtPack(const char *a_pszName)2294 ExtPack *ExtPackManager::i_findExtPack(const char *a_pszName) 2486 2295 { 2487 2296 size_t cchName = strlen(a_pszName); … … 2507 2316 * @param a_pszName The name of the extension pack. 2508 2317 */ 2509 void ExtPackManager:: removeExtPack(const char *a_pszName)2318 void ExtPackManager::i_removeExtPack(const char *a_pszName) 2510 2319 { 2511 2320 size_t cchName = strlen(a_pszName); … … 2547 2356 * @remarks Only called in VBoxSVC. 2548 2357 */ 2549 HRESULT ExtPackManager:: refreshExtPack(const char *a_pszName, bool a_fUnusableIsError, ExtPack **a_ppExtPack)2358 HRESULT ExtPackManager::i_refreshExtPack(const char *a_pszName, bool a_fUnusableIsError, ExtPack **a_ppExtPack) 2550 2359 { 2551 2360 Assert(m->pVirtualBox != NULL); /* Only called from VBoxSVC. */ 2552 2361 2553 2362 HRESULT hrc; 2554 ExtPack *pExtPack = findExtPack(a_pszName);2363 ExtPack *pExtPack = i_findExtPack(a_pszName); 2555 2364 if (pExtPack) 2556 2365 { … … 2559 2368 */ 2560 2369 bool fCanDelete; 2561 hrc = pExtPack-> refresh(&fCanDelete);2370 hrc = pExtPack->i_refresh(&fCanDelete); 2562 2371 if (SUCCEEDED(hrc)) 2563 2372 { 2564 2373 if (fCanDelete) 2565 2374 { 2566 removeExtPack(a_pszName);2375 i_removeExtPack(a_pszName); 2567 2376 pExtPack = NULL; 2568 2377 } … … 2668 2477 * @param pvJob The job structure. 2669 2478 */ 2670 /*static*/ DECLCALLBACK(int) ExtPackManager:: doInstallThreadProc(RTTHREAD hThread, void *pvJob)2479 /*static*/ DECLCALLBACK(int) ExtPackManager::i_doInstallThreadProc(RTTHREAD hThread, void *pvJob) 2671 2480 { 2672 2481 PEXTPACKINSTALLJOB pJob = (PEXTPACKINSTALLJOB)pvJob; 2673 HRESULT hrc = pJob->ptrExtPackMgr-> doInstall(pJob->ptrExtPackFile, pJob->fReplace, &pJob->strDisplayInfo);2482 HRESULT hrc = pJob->ptrExtPackMgr->i_doInstall(pJob->ptrExtPackFile, pJob->fReplace, &pJob->strDisplayInfo); 2674 2483 pJob->ptrProgress->i_notifyComplete(hrc); 2675 2484 delete pJob; … … 2693 2502 * be NULL. 2694 2503 */ 2695 HRESULT ExtPackManager:: doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo)2504 HRESULT ExtPackManager::i_doInstall(ExtPackFile *a_pExtPackFile, bool a_fReplace, Utf8Str const *a_pstrDisplayInfo) 2696 2505 { 2697 2506 AssertReturn(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON, E_UNEXPECTED); … … 2711 2520 */ 2712 2521 ExtPack *pExtPack; 2713 hrc = refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);2522 hrc = i_refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack); 2714 2523 if (SUCCEEDED(hrc)) 2715 2524 { 2716 2525 if (pExtPack && a_fReplace) 2717 hrc = pExtPack-> callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/);2526 hrc = pExtPack->i_callUninstallHookAndClose(m->pVirtualBox, false /*a_ForcedRemoval*/); 2718 2527 else if (pExtPack) 2719 2528 hrc = setError(E_FAIL, … … 2729 2538 * even on failure, to be on the safe side). 2730 2539 */ 2731 hrc = runSetUidToRootHelper(a_pstrDisplayInfo,2732 "install",2733 "--base-dir", m->strBaseDir.c_str(),2734 "--cert-dir", m->strCertificatDirPath.c_str(),2735 "--name", pStrName->c_str(),2736 "--tarball", pStrTarball->c_str(),2737 "--sha-256", pStrTarballDigest->c_str(),2738 pExtPack ? "--replace" : (const char *)NULL,2739 (const char *)NULL);2540 hrc = i_runSetUidToRootHelper(a_pstrDisplayInfo, 2541 "install", 2542 "--base-dir", m->strBaseDir.c_str(), 2543 "--cert-dir", m->strCertificatDirPath.c_str(), 2544 "--name", pStrName->c_str(), 2545 "--tarball", pStrTarball->c_str(), 2546 "--sha-256", pStrTarballDigest->c_str(), 2547 pExtPack ? "--replace" : (const char *)NULL, 2548 (const char *)NULL); 2740 2549 if (SUCCEEDED(hrc)) 2741 2550 { 2742 hrc = refreshExtPack(pStrName->c_str(), true /*a_fUnusableIsError*/, &pExtPack);2551 hrc = i_refreshExtPack(pStrName->c_str(), true /*a_fUnusableIsError*/, &pExtPack); 2743 2552 if (SUCCEEDED(hrc) && pExtPack) 2744 2553 { 2745 2554 RTERRINFOSTATIC ErrInfo; 2746 2555 RTErrInfoInitStatic(&ErrInfo); 2747 pExtPack-> callInstalledHook(m->pVirtualBox, &autoLock, &ErrInfo.Core);2556 pExtPack->i_callInstalledHook(m->pVirtualBox, &autoLock, &ErrInfo.Core); 2748 2557 if (RT_SUCCESS(ErrInfo.Core.rc)) 2749 2558 LogRel(("ExtPackManager: Successfully installed extension pack '%s'.\n", pStrName->c_str())); … … 2757 2566 */ 2758 2567 if (ErrInfo.Core.rc == VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL) 2759 runSetUidToRootHelper(a_pstrDisplayInfo,2760 "uninstall",2761 "--base-dir", m->strBaseDir.c_str(),2762 "--name", pStrName->c_str(),2763 "--forced",2764 (const char *)NULL);2568 i_runSetUidToRootHelper(a_pstrDisplayInfo, 2569 "uninstall", 2570 "--base-dir", m->strBaseDir.c_str(), 2571 "--name", pStrName->c_str(), 2572 "--forced", 2573 (const char *)NULL); 2765 2574 hrc = setError(E_FAIL, tr("The installation hook failed: %Rrc - %s"), 2766 2575 ErrInfo.Core.rc, ErrInfo.Core.pszMsg); … … 2774 2583 { 2775 2584 ErrorInfoKeeper Eik; 2776 refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, NULL);2585 i_refreshExtPack(pStrName->c_str(), false /*a_fUnusableIsError*/, NULL); 2777 2586 } 2778 2587 } … … 2785 2594 { 2786 2595 autoLock.release(); 2787 callAllVirtualBoxReadyHooks();2596 i_callAllVirtualBoxReadyHooks(); 2788 2597 } 2789 2598 } … … 2799 2608 * @param pvJob The job structure. 2800 2609 */ 2801 /*static*/ DECLCALLBACK(int) ExtPackManager:: doUninstallThreadProc(RTTHREAD hThread, void *pvJob)2610 /*static*/ DECLCALLBACK(int) ExtPackManager::i_doUninstallThreadProc(RTTHREAD hThread, void *pvJob) 2802 2611 { 2803 2612 PEXTPACKUNINSTALLJOB pJob = (PEXTPACKUNINSTALLJOB)pvJob; 2804 HRESULT hrc = pJob->ptrExtPackMgr-> doUninstall(&pJob->strName, pJob->fForcedRemoval, &pJob->strDisplayInfo);2613 HRESULT hrc = pJob->ptrExtPackMgr->i_doUninstall(&pJob->strName, pJob->fForcedRemoval, &pJob->strDisplayInfo); 2805 2614 pJob->ptrProgress->i_notifyComplete(hrc); 2806 2615 delete pJob; … … 2822 2631 * @param a_pstrDisplayInfo Host specific display information hacks. 2823 2632 */ 2824 HRESULT ExtPackManager:: doUninstall(Utf8Str const *a_pstrName, bool a_fForcedRemoval, Utf8Str const *a_pstrDisplayInfo)2633 HRESULT ExtPackManager::i_doUninstall(Utf8Str const *a_pstrName, bool a_fForcedRemoval, Utf8Str const *a_pstrDisplayInfo) 2825 2634 { 2826 2635 Assert(m->enmContext == VBOXEXTPACKCTX_PER_USER_DAEMON); … … 2837 2646 */ 2838 2647 ExtPack *pExtPack; 2839 hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);2648 hrc = i_refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack); 2840 2649 if (SUCCEEDED(hrc)) 2841 2650 { … … 2850 2659 * Call the uninstall hook and unload the main dll. 2851 2660 */ 2852 hrc = pExtPack-> callUninstallHookAndClose(m->pVirtualBox, a_fForcedRemoval);2661 hrc = pExtPack->i_callUninstallHookAndClose(m->pVirtualBox, a_fForcedRemoval); 2853 2662 if (SUCCEEDED(hrc)) 2854 2663 { … … 2861 2670 */ 2862 2671 const char *pszForcedOpt = a_fForcedRemoval ? "--forced" : NULL; 2863 hrc = runSetUidToRootHelper(a_pstrDisplayInfo,2864 "uninstall",2865 "--base-dir", m->strBaseDir.c_str(),2866 "--name", a_pstrName->c_str(),2867 pszForcedOpt, /* Last as it may be NULL. */2868 (const char *)NULL);2672 hrc = i_runSetUidToRootHelper(a_pstrDisplayInfo, 2673 "uninstall", 2674 "--base-dir", m->strBaseDir.c_str(), 2675 "--name", a_pstrName->c_str(), 2676 pszForcedOpt, /* Last as it may be NULL. */ 2677 (const char *)NULL); 2869 2678 if (SUCCEEDED(hrc)) 2870 2679 { 2871 hrc = refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack);2680 hrc = i_refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, &pExtPack); 2872 2681 if (SUCCEEDED(hrc)) 2873 2682 { … … 2883 2692 { 2884 2693 ErrorInfoKeeper Eik; 2885 refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, NULL);2694 i_refreshExtPack(a_pstrName->c_str(), false /*a_fUnusableIsError*/, NULL); 2886 2695 } 2887 2696 } … … 2896 2705 { 2897 2706 autoLock.release(); 2898 callAllVirtualBoxReadyHooks();2707 i_callAllVirtualBoxReadyHooks(); 2899 2708 } 2900 2709 } … … 2909 2718 * @remarks The caller must not hold any locks. 2910 2719 */ 2911 void ExtPackManager:: callAllVirtualBoxReadyHooks(void)2720 void ExtPackManager::i_callAllVirtualBoxReadyHooks(void) 2912 2721 { 2913 2722 AutoCaller autoCaller(this); … … 2922 2731 /* advancing below */) 2923 2732 { 2924 if ((*it)-> callVirtualBoxReadyHook(m->pVirtualBox, &autoLock))2733 if ((*it)->i_callVirtualBoxReadyHook(m->pVirtualBox, &autoLock)) 2925 2734 it = m->llInstalledExtPacks.begin(); 2926 2735 else … … 2936 2745 * @remarks The caller must not hold any locks. 2937 2746 */ 2938 void ExtPackManager:: callAllConsoleReadyHooks(IConsole *a_pConsole)2747 void ExtPackManager::i_callAllConsoleReadyHooks(IConsole *a_pConsole) 2939 2748 { 2940 2749 AutoCaller autoCaller(this); … … 2949 2758 /* advancing below */) 2950 2759 { 2951 if ((*it)-> callConsoleReadyHook(a_pConsole, &autoLock))2760 if ((*it)->i_callConsoleReadyHook(a_pConsole, &autoLock)) 2952 2761 it = m->llInstalledExtPacks.begin(); 2953 2762 else … … 2962 2771 * @param a_pMachine The machine interface of the new VM. 2963 2772 */ 2964 void ExtPackManager:: callAllVmCreatedHooks(IMachine *a_pMachine)2773 void ExtPackManager::i_callAllVmCreatedHooks(IMachine *a_pMachine) 2965 2774 { 2966 2775 AutoCaller autoCaller(this); … … 2973 2782 2974 2783 for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++) 2975 (*it)-> callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock);2784 (*it)->i_callVmCreatedHook(m->pVirtualBox, a_pMachine, &autoLock); 2976 2785 } 2977 2786 #endif … … 2985 2794 * @param a_pVM The VM handle. 2986 2795 */ 2987 int ExtPackManager:: callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM)2796 int ExtPackManager::i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM) 2988 2797 { 2989 2798 AutoCaller autoCaller(this); … … 2998 2807 { 2999 2808 int vrc; 3000 (*it)-> callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc);2809 (*it)->i_callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc); 3001 2810 if (RT_FAILURE(vrc)) 3002 2811 return vrc; … … 3014 2823 * @param a_pVM The VM handle. 3015 2824 */ 3016 int ExtPackManager:: callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM)2825 int ExtPackManager::i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM) 3017 2826 { 3018 2827 AutoCaller autoCaller(this); … … 3027 2836 { 3028 2837 int vrc; 3029 (*it)-> callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc);2838 (*it)->i_callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc); 3030 2839 if (RT_FAILURE(vrc)) 3031 2840 return vrc; … … 3041 2850 * @param a_pVM The VM handle. Can be NULL. 3042 2851 */ 3043 void ExtPackManager:: callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM)2852 void ExtPackManager::i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM) 3044 2853 { 3045 2854 AutoCaller autoCaller(this); … … 3052 2861 3053 2862 for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); it++) 3054 (*it)-> callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);2863 (*it)->i_callVmPowerOffHook(a_pConsole, a_pVM, &autoLock); 3055 2864 } 3056 2865 … … 3063 2872 * @param a_pstrExtPack The name of the extension pack. 3064 2873 */ 3065 HRESULT ExtPackManager:: checkVrdeExtPack(Utf8Str const *a_pstrExtPack)2874 HRESULT ExtPackManager::i_checkVrdeExtPack(Utf8Str const *a_pstrExtPack) 3066 2875 { 3067 2876 AutoCaller autoCaller(this); … … 3071 2880 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 3072 2881 3073 ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());2882 ExtPack *pExtPack = i_findExtPack(a_pstrExtPack->c_str()); 3074 2883 if (pExtPack) 3075 hrc = pExtPack-> checkVrde();2884 hrc = pExtPack->i_checkVrde(); 3076 2885 else 3077 2886 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str()); … … 3092 2901 * @param a_pstrVrdeLibrary Where to return the path. 3093 2902 */ 3094 int ExtPackManager:: getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary)2903 int ExtPackManager::i_getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary) 3095 2904 { 3096 2905 AutoCaller autoCaller(this); … … 3100 2909 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 3101 2910 3102 ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());2911 ExtPack *pExtPack = i_findExtPack(a_pstrExtPack->c_str()); 3103 2912 if (pExtPack) 3104 hrc = pExtPack-> getVrdpLibraryName(a_pstrVrdeLibrary);2913 hrc = pExtPack->i_getVrdpLibraryName(a_pstrVrdeLibrary); 3105 2914 else 3106 2915 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), … … 3120 2929 * @param a_pstrVrdeLibrary Where to return the path. 3121 2930 */ 3122 HRESULT ExtPackManager:: getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack,3123 Utf8Str *a_pstrLibrary)2931 HRESULT ExtPackManager::i_getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack, 2932 Utf8Str *a_pstrLibrary) 3124 2933 { 3125 2934 AutoCaller autoCaller(this); … … 3129 2938 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 3130 2939 3131 ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str());2940 ExtPack *pExtPack = i_findExtPack(a_pstrExtPack->c_str()); 3132 2941 if (pExtPack) 3133 hrc = pExtPack-> getLibraryName(a_pszModuleName, a_pstrLibrary);2942 hrc = pExtPack->i_getLibraryName(a_pszModuleName, a_pstrLibrary); 3134 2943 else 3135 2944 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str()); … … 3147 2956 * VRDP provider. 3148 2957 */ 3149 HRESULT ExtPackManager:: getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack)2958 HRESULT ExtPackManager::i_getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack) 3150 2959 { 3151 2960 a_pstrExtPack->setNull(); … … 3161 2970 it++) 3162 2971 { 3163 if ((*it)-> wantsToBeDefaultVrde())2972 if ((*it)->i_wantsToBeDefaultVrde()) 3164 2973 { 3165 2974 *a_pstrExtPack = (*it)->m->Desc.strName; … … 3177 2986 * @param a_pszExtPack The name of the extension pack. 3178 2987 */ 3179 bool ExtPackManager::i sExtPackUsable(const char *a_pszExtPack)2988 bool ExtPackManager::i_isExtPackUsable(const char *a_pszExtPack) 3180 2989 { 3181 2990 AutoCaller autoCaller(this); … … 3185 2994 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 3186 2995 3187 ExtPack *pExtPack = findExtPack(a_pszExtPack);2996 ExtPack *pExtPack = i_findExtPack(a_pszExtPack); 3188 2997 return pExtPack != NULL 3189 2998 && pExtPack->m->fUsable; … … 3193 3002 * Dumps all extension packs to the release log. 3194 3003 */ 3195 void ExtPackManager:: dumpAllToReleaseLog(void)3004 void ExtPackManager::i_dumpAllToReleaseLog(void) 3196 3005 { 3197 3006 AutoCaller autoCaller(this); -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r50874 r50914 618 618 /* Let the extension packs have a go at things (hold no locks). */ 619 619 if (SUCCEEDED(rc)) 620 mptrExtPackManager-> callAllConsoleReadyHooks(this);620 mptrExtPackManager->i_callAllConsoleReadyHooks(this); 621 621 #endif 622 622 … … 5820 5820 { 5821 5821 #ifdef VBOX_WITH_EXTPACK 5822 vrc = mptrExtPackManager-> callAllVmPowerOnHooks(this, VMR3GetVM(ptrVM.rawUVM()));5822 vrc = mptrExtPackManager->i_callAllVmPowerOnHooks(this, VMR3GetVM(ptrVM.rawUVM())); 5823 5823 #else 5824 5824 vrc = VINF_SUCCESS; … … 6693 6693 6694 6694 #ifdef VBOX_WITH_EXTPACK 6695 mptrExtPackManager-> dumpAllToReleaseLog();6695 mptrExtPackManager->i_dumpAllToReleaseLog(); 6696 6696 #endif 6697 6697 … … 7092 7092 vrc = VMR3PowerOff(pUVM); 7093 7093 #ifdef VBOX_WITH_EXTPACK 7094 mptrExtPackManager-> callAllVmPowerOffHooks(this, VMR3GetVM(pUVM));7094 mptrExtPackManager->i_callAllVmPowerOffHooks(this, VMR3GetVM(pUVM)); 7095 7095 #endif 7096 7096 alock.acquire(); … … 9126 9126 /* Start/Resume the VM execution */ 9127 9127 #ifdef VBOX_WITH_EXTPACK 9128 vrc = pConsole->mptrExtPackManager-> callAllVmPowerOnHooks(pConsole, pVM);9128 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM); 9129 9129 #endif 9130 9130 if (RT_SUCCESS(vrc)) … … 9139 9139 int vrc2 = VMR3PowerOff(pConsole->mpUVM); AssertLogRelRC(vrc2); 9140 9140 #ifdef VBOX_WITH_EXTPACK 9141 pConsole->mptrExtPackManager-> callAllVmPowerOffHooks(pConsole, pVM);9141 pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM); 9142 9142 #endif 9143 9143 } … … 9154 9154 int vrc2 = VMR3PowerOff(pConsole->mpUVM); AssertLogRelRC(vrc2); 9155 9155 #ifdef VBOX_WITH_EXTPACK 9156 pConsole->mptrExtPackManager-> callAllVmPowerOffHooks(pConsole, pVM);9156 pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM); 9157 9157 #endif 9158 9158 } … … 9187 9187 /* Power on the FT enabled VM. */ 9188 9188 #ifdef VBOX_WITH_EXTPACK 9189 vrc = pConsole->mptrExtPackManager-> callAllVmPowerOnHooks(pConsole, pVM);9189 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM); 9190 9190 #endif 9191 9191 if (RT_SUCCESS(vrc)) … … 9210 9210 /* Power on the VM (i.e. start executing) */ 9211 9211 #ifdef VBOX_WITH_EXTPACK 9212 vrc = pConsole->mptrExtPackManager-> callAllVmPowerOnHooks(pConsole, pVM);9212 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM); 9213 9213 #endif 9214 9214 if (RT_SUCCESS(vrc)) -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r50723 r50914 628 628 # ifdef VBOX_WITH_EXTPACK 629 629 static const char *s_pszPCIRawExtPackName = "Oracle VM VirtualBox Extension Pack"; 630 if (!mptrExtPackManager->i sExtPackUsable(s_pszPCIRawExtPackName))630 if (!mptrExtPackManager->i_isExtPackUsable(s_pszPCIRawExtPackName)) 631 631 /* Always fatal! */ 632 632 return VMR3SetError(pUVM, VERR_NOT_FOUND, RT_SRC_POS, … … 1752 1752 static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack"; 1753 1753 # ifdef VBOX_WITH_EXTPACK 1754 if (mptrExtPackManager->i sExtPackUsable(s_pszUsbExtPackName))1754 if (mptrExtPackManager->i_isExtPackUsable(s_pszUsbExtPackName)) 1755 1755 # endif 1756 1756 { … … 1798 1798 static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack"; 1799 1799 # ifdef VBOX_WITH_EXTPACK 1800 if (mptrExtPackManager->i sExtPackUsable(s_pszUsbExtPackName))1800 if (mptrExtPackManager->i_isExtPackUsable(s_pszUsbExtPackName)) 1801 1801 # endif 1802 1802 { … … 3037 3037 { 3038 3038 pAlock->release(); 3039 rc = mptrExtPackManager-> callAllVmConfigureVmmHooks(this, pVM);3039 rc = mptrExtPackManager->i_callAllVmConfigureVmmHooks(this, pVM); 3040 3040 pAlock->acquire(); 3041 3041 } -
trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
r50848 r50914 1516 1516 #ifdef VBOX_WITH_EXTPACK 1517 1517 ExtPackManager *pExtPackMgr = mConsole->getExtPackManager(); 1518 vrc = pExtPackMgr-> getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary);1518 vrc = pExtPackMgr->i_getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary); 1519 1519 #else 1520 1520 vrc = VERR_FILE_NOT_FOUND; -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r50874 r50914 84 84 // NS_DECL_CLASSINFO(ExtPackFile) 85 85 // NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ExtPackFile, IExtPackFile, IExtPackBase) 86 NS_DECL_CLASSINFO(ExtPack)87 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(ExtPack, IExtPack, IExtPackBase)88 NS_DECL_CLASSINFO(ExtPackManager)89 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ExtPackManager, IExtPackManager)90 86 #endif 91 87 -
trunk/src/VBox/Main/src-server/HostVideoInputDeviceImpl.cpp
r50355 r50914 183 183 #ifdef VBOX_WITH_EXTPACK 184 184 ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager(); 185 hr = pExtPackMgr-> getLibraryPathForExtPack("VBoxHostWebcam", &strExtPackPuel, &strLibrary);185 hr = pExtPackMgr->i_getLibraryPathForExtPack("VBoxHostWebcam", &strExtPackPuel, &strLibrary); 186 186 #else 187 187 hr = E_NOTIMPL; -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r50721 r50914 778 778 else 779 779 #ifdef VBOX_WITH_EXTPACK 780 hrc = mParent->i_getExtPackManager()-> checkVrdeExtPack(&strExtPack);780 hrc = mParent->i_getExtPackManager()->i_checkVrdeExtPack(&strExtPack); 781 781 #else 782 782 hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), strExtPack.c_str()); … … 786 786 { 787 787 #ifdef VBOX_WITH_EXTPACK 788 hrc = mParent->i_getExtPackManager()-> getDefaultVrdeExtPack(&strExtPack);788 hrc = mParent->i_getExtPackManager()->i_getDefaultVrdeExtPack(&strExtPack); 789 789 #endif 790 790 if (strExtPack.isEmpty()) … … 824 824 else 825 825 #ifdef VBOX_WITH_EXTPACK 826 hrc = mParent->i_getExtPackManager()-> checkVrdeExtPack(&aExtPack);826 hrc = mParent->i_getExtPackManager()->i_checkVrdeExtPack(&aExtPack); 827 827 #else 828 828 hrc = setError(E_FAIL, tr("The extension pack '%s' does not exist"), aExtPack.c_str()); -
trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
r50355 r50914 538 538 VirtualBox *pVirtualBox = mParent->getVirtualBox(); 539 539 ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager(); 540 vrc = pExtPackMgr-> getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary);540 vrc = pExtPackMgr->i_getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary); 541 541 #else 542 542 vrc = VERR_FILE_NOT_FOUND; … … 807 807 #ifdef VBOX_WITH_EXTPACK 808 808 ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->i_getExtPackManager(); 809 hrc = pExtPackMgr-> checkVrdeExtPack(&strExtPack);809 hrc = pExtPackMgr->i_checkVrdeExtPack(&strExtPack); 810 810 #else 811 811 hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), strExtPack.c_str()); … … 852 852 #ifdef VBOX_WITH_EXTPACK 853 853 ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->i_getExtPackManager(); 854 hrc = pExtPackMgr-> checkVrdeExtPack(&aExtPack);854 hrc = pExtPackMgr->i_checkVrdeExtPack(&aExtPack); 855 855 #else 856 856 hrc = setError(E_FAIL, tr("Extension pack '%s' does not exist"), aExtPack.c_str()); -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r50874 r50914 579 579 { 580 580 lock.release(); 581 m->ptrExtPackManager-> callAllVirtualBoxReadyHooks();581 m->ptrExtPackManager->i_callAllVirtualBoxReadyHooks(); 582 582 } 583 583 #endif … … 1555 1555 #ifdef VBOX_WITH_EXTPACK 1556 1556 /* call the extension pack hooks */ 1557 m->ptrExtPackManager-> callAllVmCreatedHooks(machine);1557 m->ptrExtPackManager->i_callAllVmCreatedHooks(machine); 1558 1558 #endif 1559 1559 } -
trunk/src/VBox/Main/src-server/xpcom/server.cpp
r50874 r50914 131 131 #endif /* VBOX_WITH_RESOURCE_USAGE_API */ 132 132 133 #ifdef VBOX_WITH_EXTPACK134 NS_DECL_CLASSINFO(ExtPackFile)135 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ExtPackFile, IExtPackFile)136 137 NS_DECL_CLASSINFO(ExtPack)138 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ExtPack, IExtPack)139 140 NS_DECL_CLASSINFO(ExtPackManager)141 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(ExtPackManager, IExtPackManager)142 #endif143 144 145 133 //////////////////////////////////////////////////////////////////////////////// 146 134 -
trunk/src/VBox/Runtime/common/log/log.cpp
r50404 r50914 1501 1501 } /* strincmp */ 1502 1502 } /* for each flags */ 1503 AssertMsg(fFound, ("%.15s...", psz));1503 // AssertMsg(fFound, ("%.15s...", psz)); 1504 1504 } 1505 1505
Note:
See TracChangeset
for help on using the changeset viewer.