Changeset 73548 in vbox
- Timestamp:
- Aug 7, 2018 3:18:17 PM (6 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
-
include/ExtPackManagerImpl.h (modified) (1 diff)
-
src-all/ExtPackManagerImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ExtPackManagerImpl.h
r68828 r73548 209 209 HRESULT i_doUninstall(const Utf8Str *a_pstrName, bool a_fForcedRemoval, const Utf8Str *a_pstrDisplayInfo); 210 210 void i_callAllVirtualBoxReadyHooks(void); 211 HRESULT i_queryObjects(const com::Utf8Str &aObjUuid, std::vector<ComPtr<IUnknown> > &aObjects); 211 212 #endif 212 213 #ifdef VBOX_COM_INPROC -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r73003 r73548 2894 2894 } 2895 2895 2896 2897 /** 2898 * Queries objects of type @a aObjUuid from all the extension packs. 2899 * 2900 * @returns COM status code. 2901 * @param aObjUuid The UUID of the kind of objects we're querying. 2902 * @param aObjects Where to return the objects. 2903 * 2904 * @remarks The caller must not hold any locks. 2905 */ 2906 HRESULT ExtPackManager::i_queryObjects(const com::Utf8Str &aObjUuid, std::vector<ComPtr<IUnknown> > &aObjects) 2907 { 2908 aObjects.clear(); 2909 2910 AutoCaller autoCaller(this); 2911 HRESULT hrc = autoCaller.rc(); 2912 if (SUCCEEDED(hrc)) 2913 { 2914 AutoWriteLock autoLock(this COMMA_LOCKVAL_SRC_POS); 2915 ComPtr<ExtPackManager> ptrSelfRef = this; 2916 2917 for (ExtPackList::iterator it = m->llInstalledExtPacks.begin(); 2918 it != m->llInstalledExtPacks.end(); 2919 /* advancing below */) 2920 { 2921 ComPtr<IUnknown> ptrIf; 2922 HRESULT hrc2 = (*it)->queryObject(aObjUuid, ptrIf); 2923 if (SUCCEEDED(hrc2)) 2924 aObjects.push_back(ptrIf); 2925 else if (hrc2 != E_NOINTERFACE) 2926 hrc = hrc2; 2927 } 2928 2929 if (aObjects.size() > 0) 2930 hrc = S_OK; 2931 } 2932 return hrc; 2933 } 2934 2896 2935 #endif /* !VBOX_COM_INPROC */ 2897 2936
Note:
See TracChangeset
for help on using the changeset viewer.

