Changeset 50502 in vbox
- Timestamp:
- Feb 18, 2014 9:50:11 PM (11 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/GuestFileImpl.h
r50500 r50502 6 6 7 7 /* 8 * Copyright (C) 2012-201 4Oracle Corporation8 * Copyright (C) 2012-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 23 23 #include "EventImpl.h" 24 24 25 #include "GuestFsObjInfoImpl.h" 25 26 #include "GuestCtrlImplPrivate.h" 26 27 -
trunk/src/VBox/Main/include/GuestFsObjInfoImpl.h
r50500 r50502 6 6 7 7 /* 8 * Copyright (C) 2012 -2014Oracle Corporation8 * Copyright (C) 2012 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #define ____H_GUESTFSOBJINFOIMPL 21 21 22 #include " GuestFsObjInfoWrap.h"22 #include "VirtualBoxBase.h" 23 23 #include "GuestCtrlImplPrivate.h" 24 24 … … 27 27 */ 28 28 class ATL_NO_VTABLE GuestFsObjInfo : 29 public GuestFsObjInfoWrap 29 public VirtualBoxBase, 30 VBOX_SCRIPTABLE_IMPL(IGuestFsObjInfo) 30 31 { 31 32 public: 32 33 /** @name COM and internal init/term/mapping cruft. 33 34 * @{ */ 35 VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(GuestFsObjInfo, IGuestFsObjInfo) 36 DECLARE_NOT_AGGREGATABLE(GuestFsObjInfo) 37 DECLARE_PROTECT_FINAL_CONSTRUCT() 38 BEGIN_COM_MAP(GuestFsObjInfo) 39 VBOX_DEFAULT_INTERFACE_ENTRIES(IGuestFsObjInfo) 40 COM_INTERFACE_ENTRY(IFsObjInfo) 41 END_COM_MAP() 34 42 DECLARE_EMPTY_CTOR_DTOR(GuestFsObjInfo) 35 43 36 44 int init(const GuestFsObjData &objData); 37 45 void uninit(void); 38 39 46 HRESULT FinalConstruct(void); 40 47 void FinalRelease(void); 48 /** @} */ 49 50 /** @name IFsObjInfo interface. 51 * @{ */ 52 STDMETHOD(COMGETTER(AccessTime))(LONG64 *aAccessTime); 53 STDMETHOD(COMGETTER(AllocatedSize))(LONG64 *aAllocatedSize); 54 STDMETHOD(COMGETTER(BirthTime))(LONG64 *aBirthTime); 55 STDMETHOD(COMGETTER(ChangeTime))(LONG64 *aChangeTime); 56 STDMETHOD(COMGETTER(DeviceNumber))(ULONG *aDeviceNumber); 57 STDMETHOD(COMGETTER(FileAttributes))(BSTR *aFileAttrs); 58 STDMETHOD(COMGETTER(GenerationId))(ULONG *aGenerationId); 59 STDMETHOD(COMGETTER(GID))(ULONG *aGID); 60 STDMETHOD(COMGETTER(GroupName))(BSTR *aGroupName); 61 STDMETHOD(COMGETTER(HardLinks))(ULONG *aHardLinks); 62 STDMETHOD(COMGETTER(ModificationTime))(LONG64 *aModificationTime); 63 STDMETHOD(COMGETTER(Name))(BSTR *aName); 64 STDMETHOD(COMGETTER(NodeId))(LONG64 *aNodeId); 65 STDMETHOD(COMGETTER(NodeIdDevice))(ULONG *aNodeIdDevice); 66 STDMETHOD(COMGETTER(ObjectSize))(LONG64 *aObjectSize); 67 STDMETHOD(COMGETTER(Type))(FsObjType_T *aType); 68 STDMETHOD(COMGETTER(UID))(ULONG *aUID); 69 STDMETHOD(COMGETTER(UserFlags))(ULONG *aUserFlags); 70 STDMETHOD(COMGETTER(UserName))(BSTR *aUserName); 71 STDMETHOD(COMGETTER(ACL))(BSTR *aACL); 72 /** @} */ 73 74 public: 75 /** @name Public internal methods. 76 * @{ */ 77 /** @} */ 41 78 42 79 private: 43 44 // Wrapped GuestFsObjInfo properties.45 HRESULT getAccessTime(LONG64 *aAccessTime);46 HRESULT getAllocatedSize(LONG64 *aAllocatedSize);47 HRESULT getBirthTime(LONG64 *aBirthTime);48 HRESULT getChangeTime(LONG64 *aChangeTime);49 HRESULT getDeviceNumber(ULONG *aDeviceNumber);50 HRESULT getFileAttributes(com::Utf8Str &aFileAttributes);51 HRESULT getGenerationId(ULONG *aGenerationId);52 HRESULT getGID(ULONG *aGID);53 HRESULT getGroupName(com::Utf8Str &aGroupName);54 HRESULT getHardLinks(ULONG *aHardLinks);55 HRESULT getModificationTime(LONG64 *aModificationTime);56 HRESULT getName(com::Utf8Str &aName);57 HRESULT getNodeId(LONG64 *aNodeId);58 HRESULT getNodeIdDevice(ULONG *aNodeIdDevice);59 HRESULT getObjectSize(LONG64 *aObjectSize);60 HRESULT getType(FsObjType_T *aType);61 HRESULT getUID(ULONG *aUID);62 HRESULT getUserFlags(ULONG *aUserFlags);63 HRESULT getUserName(com::Utf8Str &aUserName);64 80 65 81 GuestFsObjData mData; -
trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
r50500 r50502 5 5 6 6 /* 7 * Copyright (C) 2012 -2014Oracle Corporation7 * Copyright (C) 2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 87 87 } 88 88 89 // implementation of wrapped privategetters/setters for attributes89 // implementation of public getters/setters for attributes 90 90 ///////////////////////////////////////////////////////////////////////////// 91 91 92 HRESULT GuestFsObjInfo::getAccessTime(LONG64 *aAccessTime) 93 { 94 #ifndef VBOX_WITH_GUEST_CONTROL 95 ReturnComNotImplemented(); 96 #else 92 STDMETHODIMP GuestFsObjInfo::COMGETTER(AccessTime)(LONG64 *aAccessTime) 93 { 94 #ifndef VBOX_WITH_GUEST_CONTROL 95 ReturnComNotImplemented(); 96 #else 97 AutoCaller autoCaller(this); 98 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 99 100 CheckComArgOutPointerValid(aAccessTime); 97 101 98 102 *aAccessTime = mData.mAccessTime; … … 102 106 } 103 107 104 HRESULT GuestFsObjInfo::getAllocatedSize(LONG64 *aAllocatedSize) 105 { 106 #ifndef VBOX_WITH_GUEST_CONTROL 107 ReturnComNotImplemented(); 108 #else 108 STDMETHODIMP GuestFsObjInfo::COMGETTER(AllocatedSize)(LONG64 *aAllocatedSize) 109 { 110 #ifndef VBOX_WITH_GUEST_CONTROL 111 ReturnComNotImplemented(); 112 #else 113 AutoCaller autoCaller(this); 114 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 115 116 CheckComArgOutPointerValid(aAllocatedSize); 109 117 110 118 *aAllocatedSize = mData.mAllocatedSize; … … 114 122 } 115 123 116 HRESULT GuestFsObjInfo::getBirthTime(LONG64 *aBirthTime) 117 { 118 #ifndef VBOX_WITH_GUEST_CONTROL 119 ReturnComNotImplemented(); 120 #else 124 STDMETHODIMP GuestFsObjInfo::COMGETTER(BirthTime)(LONG64 *aBirthTime) 125 { 126 #ifndef VBOX_WITH_GUEST_CONTROL 127 ReturnComNotImplemented(); 128 #else 129 AutoCaller autoCaller(this); 130 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 131 132 CheckComArgOutPointerValid(aBirthTime); 121 133 122 134 *aBirthTime = mData.mBirthTime; … … 126 138 } 127 139 128 HRESULT GuestFsObjInfo::getChangeTime(LONG64 *aChangeTime) 129 { 130 #ifndef VBOX_WITH_GUEST_CONTROL 131 ReturnComNotImplemented(); 132 #else 140 STDMETHODIMP GuestFsObjInfo::COMGETTER(ChangeTime)(LONG64 *aChangeTime) 141 { 142 #ifndef VBOX_WITH_GUEST_CONTROL 143 ReturnComNotImplemented(); 144 #else 145 AutoCaller autoCaller(this); 146 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 147 148 CheckComArgOutPointerValid(aChangeTime); 133 149 134 150 *aChangeTime = mData.mChangeTime; … … 138 154 } 139 155 140 141 142 HRESULT GuestFsObjInfo::getDeviceNumber(ULONG *aDeviceNumber) 143 { 144 #ifndef VBOX_WITH_GUEST_CONTROL 145 ReturnComNotImplemented(); 146 #else 156 STDMETHODIMP GuestFsObjInfo::COMGETTER(DeviceNumber)(ULONG *aDeviceNumber) 157 { 158 #ifndef VBOX_WITH_GUEST_CONTROL 159 ReturnComNotImplemented(); 160 #else 161 AutoCaller autoCaller(this); 162 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 163 164 CheckComArgOutPointerValid(aDeviceNumber); 147 165 148 166 *aDeviceNumber = mData.mDeviceNumber; … … 152 170 } 153 171 154 HRESULT GuestFsObjInfo::getFileAttributes(com::Utf8Str &aFileAttributes) 155 { 156 #ifndef VBOX_WITH_GUEST_CONTROL 157 ReturnComNotImplemented(); 158 #else 159 160 aFileAttributes = mData.mFileAttrs; 161 162 return S_OK; 163 #endif /* VBOX_WITH_GUEST_CONTROL */ 164 } 165 166 HRESULT GuestFsObjInfo::getGenerationId(ULONG *aGenerationId) 167 { 168 #ifndef VBOX_WITH_GUEST_CONTROL 169 ReturnComNotImplemented(); 170 #else 172 STDMETHODIMP GuestFsObjInfo::COMGETTER(FileAttributes)(BSTR *aAttributes) 173 { 174 #ifndef VBOX_WITH_GUEST_CONTROL 175 ReturnComNotImplemented(); 176 #else 177 AutoCaller autoCaller(this); 178 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 179 180 CheckComArgOutPointerValid(aAttributes); 181 182 mData.mFileAttrs.cloneTo(aAttributes); 183 184 return S_OK; 185 #endif /* VBOX_WITH_GUEST_CONTROL */ 186 } 187 188 STDMETHODIMP GuestFsObjInfo::COMGETTER(GenerationId)(ULONG *aGenerationId) 189 { 190 #ifndef VBOX_WITH_GUEST_CONTROL 191 ReturnComNotImplemented(); 192 #else 193 AutoCaller autoCaller(this); 194 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 195 196 CheckComArgOutPointerValid(aGenerationId); 171 197 172 198 *aGenerationId = mData.mGenerationID; … … 176 202 } 177 203 178 HRESULT GuestFsObjInfo::getGID(ULONG *aGID) 179 { 180 #ifndef VBOX_WITH_GUEST_CONTROL 181 ReturnComNotImplemented(); 182 #else 204 STDMETHODIMP GuestFsObjInfo::COMGETTER(GID)(ULONG *aGID) 205 { 206 #ifndef VBOX_WITH_GUEST_CONTROL 207 ReturnComNotImplemented(); 208 #else 209 AutoCaller autoCaller(this); 210 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 211 212 CheckComArgOutPointerValid(aGID); 183 213 184 214 *aGID = mData.mGID; … … 188 218 } 189 219 190 HRESULT GuestFsObjInfo::getGroupName(com::Utf8Str &aGroupName) 191 { 192 #ifndef VBOX_WITH_GUEST_CONTROL 193 ReturnComNotImplemented(); 194 #else 195 196 aGroupName = mData.mGroupName; 197 198 return S_OK; 199 #endif /* VBOX_WITH_GUEST_CONTROL */ 200 } 201 202 HRESULT GuestFsObjInfo::getHardLinks(ULONG *aHardLinks) 203 { 204 #ifndef VBOX_WITH_GUEST_CONTROL 205 ReturnComNotImplemented(); 206 #else 220 STDMETHODIMP GuestFsObjInfo::COMGETTER(GroupName)(BSTR *aGroupName) 221 { 222 #ifndef VBOX_WITH_GUEST_CONTROL 223 ReturnComNotImplemented(); 224 #else 225 AutoCaller autoCaller(this); 226 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 227 228 CheckComArgOutPointerValid(aGroupName); 229 230 mData.mGroupName.cloneTo(aGroupName); 231 232 return S_OK; 233 #endif /* VBOX_WITH_GUEST_CONTROL */ 234 } 235 236 STDMETHODIMP GuestFsObjInfo::COMGETTER(HardLinks)(ULONG *aHardLinks) 237 { 238 #ifndef VBOX_WITH_GUEST_CONTROL 239 ReturnComNotImplemented(); 240 #else 241 AutoCaller autoCaller(this); 242 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 243 244 CheckComArgOutPointerValid(aHardLinks); 207 245 208 246 *aHardLinks = mData.mNumHardLinks; … … 212 250 } 213 251 214 HRESULT GuestFsObjInfo::getModificationTime(LONG64 *aModificationTime) 215 { 216 #ifndef VBOX_WITH_GUEST_CONTROL 217 ReturnComNotImplemented(); 218 #else 252 STDMETHODIMP GuestFsObjInfo::COMGETTER(ModificationTime)(LONG64 *aModificationTime) 253 { 254 #ifndef VBOX_WITH_GUEST_CONTROL 255 ReturnComNotImplemented(); 256 #else 257 AutoCaller autoCaller(this); 258 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 259 260 CheckComArgOutPointerValid(aModificationTime); 219 261 220 262 *aModificationTime = mData.mModificationTime; … … 224 266 } 225 267 226 HRESULT GuestFsObjInfo::getName(com::Utf8Str &aName) 227 { 228 #ifndef VBOX_WITH_GUEST_CONTROL 229 ReturnComNotImplemented(); 230 #else 231 232 aName = mData.mName; 233 234 return S_OK; 235 #endif /* VBOX_WITH_GUEST_CONTROL */ 236 } 237 238 HRESULT GuestFsObjInfo::getNodeId(LONG64 *aNodeId) 239 { 240 #ifndef VBOX_WITH_GUEST_CONTROL 241 ReturnComNotImplemented(); 242 #else 268 STDMETHODIMP GuestFsObjInfo::COMGETTER(Name)(BSTR *aName) 269 { 270 #ifndef VBOX_WITH_GUEST_CONTROL 271 ReturnComNotImplemented(); 272 #else 273 AutoCaller autoCaller(this); 274 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 275 276 CheckComArgOutPointerValid(aName); 277 278 mData.mName.cloneTo(aName); 279 280 return S_OK; 281 #endif /* VBOX_WITH_GUEST_CONTROL */ 282 } 283 284 STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeId)(LONG64 *aNodeId) 285 { 286 #ifndef VBOX_WITH_GUEST_CONTROL 287 ReturnComNotImplemented(); 288 #else 289 AutoCaller autoCaller(this); 290 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 291 292 CheckComArgOutPointerValid(aNodeId); 243 293 244 294 *aNodeId = mData.mNodeID; … … 248 298 } 249 299 250 HRESULT GuestFsObjInfo::getNodeIdDevice(ULONG *aNodeIdDevice) 251 { 252 #ifndef VBOX_WITH_GUEST_CONTROL 253 ReturnComNotImplemented(); 254 #else 300 STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeIdDevice)(ULONG *aNodeIdDevice) 301 { 302 #ifndef VBOX_WITH_GUEST_CONTROL 303 ReturnComNotImplemented(); 304 #else 305 AutoCaller autoCaller(this); 306 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 307 308 CheckComArgOutPointerValid(aNodeIdDevice); 255 309 256 310 *aNodeIdDevice = mData.mNodeIDDevice; … … 260 314 } 261 315 262 HRESULT GuestFsObjInfo::getObjectSize(LONG64 *aObjectSize) 263 { 264 #ifndef VBOX_WITH_GUEST_CONTROL 265 ReturnComNotImplemented(); 266 #else 316 STDMETHODIMP GuestFsObjInfo::COMGETTER(ObjectSize)(LONG64 *aObjectSize) 317 { 318 #ifndef VBOX_WITH_GUEST_CONTROL 319 ReturnComNotImplemented(); 320 #else 321 AutoCaller autoCaller(this); 322 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 323 324 CheckComArgOutPointerValid(aObjectSize); 267 325 268 326 *aObjectSize = mData.mObjectSize; … … 272 330 } 273 331 274 HRESULT GuestFsObjInfo::getType(FsObjType_T *aType) 275 { 276 #ifndef VBOX_WITH_GUEST_CONTROL 277 ReturnComNotImplemented(); 278 #else 332 STDMETHODIMP GuestFsObjInfo::COMGETTER(Type)(FsObjType_T *aType) 333 { 334 #ifndef VBOX_WITH_GUEST_CONTROL 335 ReturnComNotImplemented(); 336 #else 337 AutoCaller autoCaller(this); 338 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 339 340 CheckComArgOutPointerValid(aType); 279 341 280 342 *aType = mData.mType; … … 284 346 } 285 347 286 HRESULT GuestFsObjInfo::getUID(ULONG *aUID) 287 { 288 #ifndef VBOX_WITH_GUEST_CONTROL 289 ReturnComNotImplemented(); 290 #else 348 STDMETHODIMP GuestFsObjInfo::COMGETTER(UID)(ULONG *aUID) 349 { 350 #ifndef VBOX_WITH_GUEST_CONTROL 351 ReturnComNotImplemented(); 352 #else 353 AutoCaller autoCaller(this); 354 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 355 356 CheckComArgOutPointerValid(aUID); 291 357 292 358 *aUID = mData.mUID; … … 296 362 } 297 363 298 HRESULT GuestFsObjInfo::getUserFlags(ULONG *aUserFlags) 299 { 300 #ifndef VBOX_WITH_GUEST_CONTROL 301 ReturnComNotImplemented(); 302 #else 364 STDMETHODIMP GuestFsObjInfo::COMGETTER(UserFlags)(ULONG *aUserFlags) 365 { 366 #ifndef VBOX_WITH_GUEST_CONTROL 367 ReturnComNotImplemented(); 368 #else 369 AutoCaller autoCaller(this); 370 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 371 372 CheckComArgOutPointerValid(aUserFlags); 303 373 304 374 *aUserFlags = mData.mUserFlags; … … 308 378 } 309 379 310 HRESULT GuestFsObjInfo::getUserName(com::Utf8Str &aUserName) 311 { 312 #ifndef VBOX_WITH_GUEST_CONTROL 313 ReturnComNotImplemented(); 314 #else 315 316 aUserName = mData.mUserName; 317 318 return S_OK; 319 #endif /* VBOX_WITH_GUEST_CONTROL */ 320 } 380 STDMETHODIMP GuestFsObjInfo::COMGETTER(UserName)(BSTR *aUserName) 381 { 382 #ifndef VBOX_WITH_GUEST_CONTROL 383 ReturnComNotImplemented(); 384 #else 385 AutoCaller autoCaller(this); 386 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 387 388 CheckComArgOutPointerValid(aUserName); 389 390 mData.mUserName.cloneTo(aUserName); 391 392 return S_OK; 393 #endif /* VBOX_WITH_GUEST_CONTROL */ 394 } 395 396 STDMETHODIMP GuestFsObjInfo::COMGETTER(ACL)(BSTR *aACL) 397 { 398 #ifndef VBOX_WITH_GUEST_CONTROL 399 ReturnComNotImplemented(); 400 #else 401 AutoCaller autoCaller(this); 402 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 403 404 CheckComArgOutPointerValid(aACL); 405 406 mData.mACL.cloneTo(aACL); 407 408 return S_OK; 409 #endif /* VBOX_WITH_GUEST_CONTROL */ 410 } 411 -
trunk/src/VBox/Main/src-client/xpcom/module.cpp
r50500 r50502 73 73 NS_DECL_CLASSINFO(GuestFile) 74 74 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestFile, IGuestFile, IFile) 75 NS_DECL_CLASSINFO(GuestFsObjInfo) 76 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestFsObjInfo, IGuestFsObjInfo, IFsObjInfo) 75 77 NS_DECL_CLASSINFO(GuestProcess) 76 78 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(GuestProcess, IGuestProcess, IProcess) -
trunk/src/VBox/Main/testcase/Makefile.kmk
r50501 r50502 182 182 tstGuestCtrlParseBuffer.cpp \ 183 183 ../src-client/GuestCtrlPrivate.cpp 184 tstGuestCtrlParseBuffer_INCS = ../include \ 185 $(VBOX_MAIN_APIWRAPPER_INCS) 184 tstGuestCtrlParseBuffer_INCS = ../include 186 185 187 186 … … 194 193 tstGuestCtrlContextID.cpp \ 195 194 ../src-client/GuestCtrlPrivate.cpp 196 tstGuestCtrlContextID_INCS = ../include \ 197 $(VBOX_MAIN_APIWRAPPER_INCS) 195 tstGuestCtrlContextID_INCS = ../include 198 196 199 197 … … 248 246 $(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \ 249 247 $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \ 250 $(VBOX_MAIN_APIWRAPPER_INCS) \251 248 $(dir $(VBOX_XML_SCHEMADEFS_H)) 252 249 tstMouseImpl_LIBS = \
Note:
See TracChangeset
for help on using the changeset viewer.