Changeset 50547 in vbox
- Timestamp:
- Feb 21, 2014 6:45:43 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92400
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/Makefile.kmk
r50528 r50547 1031 1031 include/ConsoleImpl.h 1032 1032 1033 ifdef VBOX_WITH_GUEST_CONTROL1034 1033 VBoxC_VBOX_INTERMEDIATES = $(VBOX_MAIN_APIWRAPPER_GEN_HDRS) 1035 1034 VBoxC_VBOX_HEADERS += $(VBOX_MAIN_APIWRAPPER_INCS) 1036 endif # VBOX_WITH_GUEST_CONTROL1037 1035 1038 1036 VBoxC_VBOX_TRANSLATIONS = \ -
trunk/src/VBox/Main/include/GuestDirectoryImpl.h
r49504 r50547 20 20 #define ____H_GUESTDIRECTORYIMPL 21 21 22 #include "VirtualBoxBase.h"23 22 #include "GuestProcessImpl.h" 23 #include "GuestDirectoryWrap.h" 24 24 25 25 class GuestSession; … … 29 29 */ 30 30 class ATL_NO_VTABLE GuestDirectory : 31 public VirtualBoxBase, 32 public GuestObject, 33 VBOX_SCRIPTABLE_IMPL(IGuestDirectory) 31 public GuestDirectoryWrap, 32 public GuestObject 34 33 { 35 34 public: 36 35 /** @name COM and internal init/term/mapping cruft. 37 36 * @{ */ 38 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestDirectory, IGuestDirectory)39 DECLARE_NOT_AGGREGATABLE(GuestDirectory)40 DECLARE_PROTECT_FINAL_CONSTRUCT()41 BEGIN_COM_MAP(GuestDirectory)42 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestDirectory)43 COM_INTERFACE_ENTRY(IDirectory)44 END_COM_MAP()45 37 DECLARE_EMPTY_CTOR_DTOR(GuestDirectory) 46 38 47 39 int init(Console *pConsole, GuestSession *pSession, ULONG uDirID, const GuestDirectoryOpenInfo &openInfo); 48 40 void uninit(void); 41 49 42 HRESULT FinalConstruct(void); 50 43 void FinalRelease(void); 51 44 /** @} */ 52 45 53 /** @name IDirectory interface.54 * @{ */55 STDMETHOD(COMGETTER(DirectoryName))(BSTR *aName);56 STDMETHOD(COMGETTER(Filter))(BSTR *aFilter);57 STDMETHOD(Close)(void);58 STDMETHOD(Read)(IFsObjInfo **aInfo);59 /** @} */60 46 61 47 public: … … 63 49 * @{ */ 64 50 int callbackDispatcher(PVBOXGUESTCTRLHOSTCBCTX pCbCtx, PVBOXGUESTCTRLHOSTCALLBACK pSvcCb); 65 static Utf8Str guestErrorToString(int guestRc);66 51 int onRemove(void); 67 static HRESULT setErrorExternal(VirtualBoxBase *pInterface, int guestRc); 52 53 static Utf8Str i_guestErrorToString(int guestRc); 54 static HRESULT i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc); 68 55 /** @} */ 69 56 70 57 private: 71 58 72 /** @name Private internal methods.59 /** @name Private Wrapped properties 73 60 * @{ */ 74 61 /** @} */ 62 HRESULT getDirectoryName(com::Utf8Str &aDirectoryName); 63 HRESULT getFilter(com::Utf8Str &aFilter); 64 65 /** @name Wrapped Private internal methods. 66 * @{ */ 67 /** @} */ 68 HRESULT close(); 69 HRESULT read(ComPtr<IFsObjInfo> &aObjInfo); 75 70 76 71 struct Data -
trunk/src/VBox/Main/src-client/GuestDirectoryImpl.cpp
r50213 r50547 143 143 } 144 144 145 // implementation of p ublicgetters/setters for attributes145 // implementation of private wrapped getters/setters for attributes 146 146 ///////////////////////////////////////////////////////////////////////////// 147 147 148 STDMETHODIMP GuestDirectory::COMGETTER(DirectoryName)(BSTR *aName) 149 { 150 LogFlowThisFuncEnter(); 151 152 CheckComArgOutPointerValid(aName); 153 154 AutoCaller autoCaller(this); 155 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 148 HRESULT GuestDirectory::getDirectoryName(com::Utf8Str &aDirectoryName) 149 { 150 LogFlowThisFuncEnter(); 156 151 157 152 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 158 153 159 mData.mOpenInfo.mPath.cloneTo(aName);154 aDirectoryName = mData.mOpenInfo.mPath; 160 155 161 156 return S_OK; 162 157 } 163 158 164 STDMETHODIMP GuestDirectory::COMGETTER(Filter)(BSTR *aFilter) 165 { 166 LogFlowThisFuncEnter(); 167 168 CheckComArgOutPointerValid(aFilter); 169 170 AutoCaller autoCaller(this); 171 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 159 HRESULT GuestDirectory::getFilter(com::Utf8Str &aFilter) 160 { 161 LogFlowThisFuncEnter(); 172 162 173 163 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 174 164 175 mData.mOpenInfo.mFilter.cloneTo(aFilter);165 aFilter = mData.mOpenInfo.mFilter; 176 166 177 167 return S_OK; … … 229 219 230 220 /* static */ 231 Utf8Str GuestDirectory:: guestErrorToString(int guestRc)221 Utf8Str GuestDirectory::i_guestErrorToString(int guestRc) 232 222 { 233 223 Utf8Str strError; … … 263 253 264 254 /* static */ 265 HRESULT GuestDirectory:: setErrorExternal(VirtualBoxBase *pInterface, int guestRc)255 HRESULT GuestDirectory::i_setErrorExternal(VirtualBoxBase *pInterface, int guestRc) 266 256 { 267 257 AssertPtr(pInterface); 268 258 AssertMsg(RT_FAILURE(guestRc), ("Guest rc does not indicate a failure when setting error\n")); 269 259 270 return pInterface->setError(VBOX_E_IPRT_ERROR, GuestDirectory:: guestErrorToString(guestRc).c_str());260 return pInterface->setError(VBOX_E_IPRT_ERROR, GuestDirectory::i_guestErrorToString(guestRc).c_str()); 271 261 } 272 262 273 263 // implementation of public methods 274 264 ///////////////////////////////////////////////////////////////////////////// 275 276 STDMETHODIMP GuestDirectory::Close(void) 265 HRESULT GuestDirectory::close() 277 266 { 278 267 #ifndef VBOX_WITH_GUEST_CONTROL … … 319 308 } 320 309 321 STDMETHODIMP GuestDirectory::Read(IFsObjInfo **aInfo)310 HRESULT GuestDirectory::read(ComPtr<IFsObjInfo> &aObjInfo) 322 311 { 323 312 #ifndef VBOX_WITH_GUEST_CONTROL … … 370 359 { 371 360 /* Return info object to the caller. */ 372 hr2 = pFsObjInfo.queryInterfaceTo(a Info);361 hr2 = pFsObjInfo.queryInterfaceTo(aObjInfo.asOutParam()); 373 362 if (FAILED(hr2)) 374 363 rc = VERR_COM_UNEXPECTED; -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r50544 r50547 2780 2780 2781 2781 case VERR_GSTCTL_GUEST_ERROR: 2782 hr = GuestDirectory:: setErrorExternal(this, guestRc);2782 hr = GuestDirectory::i_setErrorExternal(this, guestRc); 2783 2783 break; 2784 2784 … … 2885 2885 2886 2886 case VERR_GSTCTL_GUEST_ERROR: 2887 hr = GuestDirectory:: setErrorExternal(this, guestRc);2887 hr = GuestDirectory::i_setErrorExternal(this, guestRc); 2888 2888 break; 2889 2889 -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r50528 r50547 69 69 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Guest, IGuest) 70 70 #ifdef VBOX_WITH_GUEST_CONTROL 71 NS_DECL_CLASSINFO(GuestDirectory)72 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestDirectory, IGuestDirectory, IDirectory)73 71 NS_DECL_CLASSINFO(GuestFile) 74 72 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestFile, IGuestFile, IFile)
Note:
See TracChangeset
for help on using the changeset viewer.