- Timestamp:
- Oct 16, 2013 11:57:15 AM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ExtPackManagerImpl.h
r48313 r49130 149 149 HRESULT checkVrde(void); 150 150 HRESULT getVrdpLibraryName(Utf8Str *a_pstrVrdeLibrary); 151 HRESULT getLibraryName(const char *a_pszModuleName, Utf8Str *a_pstrLibrary); 151 152 bool wantsToBeDefaultVrde(void) const; 152 153 HRESULT refresh(bool *pfCanDelete); … … 232 233 HRESULT checkVrdeExtPack(Utf8Str const *a_pstrExtPack); 233 234 int getVrdeLibraryPathForExtPack(Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrVrdeLibrary); 235 HRESULT getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrLibrary); 234 236 HRESULT getDefaultVrdeExtPack(Utf8Str *a_pstrExtPack); 235 237 bool isExtPackUsable(const char *a_pszExtPack); -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r48390 r49130 1112 1112 m->Desc.strVrdeModule.c_str(), m->Desc.strName.c_str()); 1113 1113 } 1114 return hrc; 1115 } 1116 1117 /** 1118 * Resolves the path to the module. 1119 * 1120 * @returns S_OK or COM error status with error information. 1121 * @param a_pszModuleName The library. 1122 * @param a_pstrLibrary Where to return the path on success. 1123 * 1124 * @remarks Caller holds the extension manager lock for reading, no locking 1125 * necessary. 1126 */ 1127 HRESULT ExtPack::getLibraryName(const char *a_pszModuleName, Utf8Str *a_pstrLibrary) 1128 { 1129 HRESULT hrc; 1130 if (findModule(a_pszModuleName, NULL, VBOXEXTPACKMODKIND_R3, 1131 a_pstrLibrary, NULL /*a_pfNative*/, NULL /*a_pObjInfo*/)) 1132 hrc = S_OK; 1133 else 1134 hrc = setError(E_FAIL, tr("Failed to locate the module '%s' in extension pack '%s'"), 1135 a_pszModuleName, m->Desc.strName.c_str()); 1114 1136 return hrc; 1115 1137 } … … 3079 3101 3080 3102 /** 3103 * Gets the full path to the specified library of the specified extension pack. 3104 * 3105 * @returns S_OK if a path is returned, COM error status and message return if 3106 * not. 3107 * @param a_pszModuleName The library. 3108 * @param a_pstrExtPack The extension pack. 3109 * @param a_pstrVrdeLibrary Where to return the path. 3110 */ 3111 HRESULT ExtPackManager::getLibraryPathForExtPack(const char *a_pszModuleName, Utf8Str const *a_pstrExtPack, Utf8Str *a_pstrLibrary) 3112 { 3113 AutoCaller autoCaller(this); 3114 HRESULT hrc = autoCaller.rc(); 3115 if (SUCCEEDED(hrc)) 3116 { 3117 AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS); 3118 3119 ExtPack *pExtPack = findExtPack(a_pstrExtPack->c_str()); 3120 if (pExtPack) 3121 hrc = pExtPack->getLibraryName(a_pszModuleName, a_pstrLibrary); 3122 else 3123 hrc = setError(VBOX_E_OBJECT_NOT_FOUND, tr("No extension pack by the name '%s' was found"), a_pstrExtPack->c_str()); 3124 } 3125 3126 return hrc; 3127 } 3128 3129 /** 3081 3130 * Gets the name of the default VRDE extension pack. 3082 3131 *
Note:
See TracChangeset
for help on using the changeset viewer.