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