Changeset 42673 in vbox for trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
- Timestamp:
- Aug 8, 2012 8:07:09 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 79873
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestFsObjInfoImpl.cpp
r42478 r42673 52 52 ///////////////////////////////////////////////////////////////////////////// 53 53 54 HRESULT GuestFsObjInfo::init(void) 55 { 56 return S_OK; 54 int GuestFsObjInfo::init(const GuestFsObjData &objData) 55 { 56 LogFlowThisFuncEnter(); 57 58 /* Enclose the state transition NotReady->InInit->Ready. */ 59 AutoInitSpan autoInitSpan(this); 60 AssertReturn(autoInitSpan.isOk(), E_FAIL); 61 62 mData = objData; 63 64 /* Confirm a successful initialization when it's the case. */ 65 autoInitSpan.setSucceeded(); 66 67 return VINF_SUCCESS; 57 68 } 58 69 … … 82 93 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 83 94 84 ReturnComNotImplemented(); 95 CheckComArgOutPointerValid(aAccessTime); 96 97 *aAccessTime = mData.mAccessTime; 98 99 return S_OK; 85 100 #endif /* VBOX_WITH_GUEST_CONTROL */ 86 101 } … … 94 109 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 95 110 96 ReturnComNotImplemented(); 111 CheckComArgOutPointerValid(aAllocatedSize); 112 113 *aAllocatedSize = mData.mAllocatedSize; 114 115 return S_OK; 97 116 #endif /* VBOX_WITH_GUEST_CONTROL */ 98 117 } … … 106 125 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 107 126 108 ReturnComNotImplemented(); 127 CheckComArgOutPointerValid(aBirthTime); 128 129 *aBirthTime = mData.mBirthTime; 130 131 return S_OK; 109 132 #endif /* VBOX_WITH_GUEST_CONTROL */ 110 133 } … … 118 141 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 119 142 120 ReturnComNotImplemented(); 143 CheckComArgOutPointerValid(aChangeTime); 144 145 *aChangeTime = mData.mChangeTime; 146 147 return S_OK; 121 148 #endif /* VBOX_WITH_GUEST_CONTROL */ 122 149 } … … 130 157 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 131 158 132 ReturnComNotImplemented(); 133 #endif /* VBOX_WITH_GUEST_CONTROL */ 134 } 135 136 STDMETHODIMP GuestFsObjInfo::COMGETTER(FileAttrs)(BSTR *aFileAttrs) 137 { 138 #ifndef VBOX_WITH_GUEST_CONTROL 139 ReturnComNotImplemented(); 140 #else 141 AutoCaller autoCaller(this); 142 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 143 144 ReturnComNotImplemented(); 145 #endif /* VBOX_WITH_GUEST_CONTROL */ 146 } 147 148 STDMETHODIMP GuestFsObjInfo::COMGETTER(GenerationID)(ULONG *aGenerationID) 149 { 150 #ifndef VBOX_WITH_GUEST_CONTROL 151 ReturnComNotImplemented(); 152 #else 153 AutoCaller autoCaller(this); 154 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 155 156 ReturnComNotImplemented(); 159 CheckComArgOutPointerValid(aDeviceNumber); 160 161 *aDeviceNumber = mData.mDeviceNumber; 162 163 return S_OK; 164 #endif /* VBOX_WITH_GUEST_CONTROL */ 165 } 166 167 STDMETHODIMP GuestFsObjInfo::COMGETTER(FileAttributes)(BSTR *aAttributes) 168 { 169 #ifndef VBOX_WITH_GUEST_CONTROL 170 ReturnComNotImplemented(); 171 #else 172 AutoCaller autoCaller(this); 173 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 174 175 CheckComArgOutPointerValid(aAttributes); 176 177 mData.mFileAttrs.cloneTo(aAttributes); 178 179 return S_OK; 180 #endif /* VBOX_WITH_GUEST_CONTROL */ 181 } 182 183 STDMETHODIMP GuestFsObjInfo::COMGETTER(GenerationId)(ULONG *aGenerationId) 184 { 185 #ifndef VBOX_WITH_GUEST_CONTROL 186 ReturnComNotImplemented(); 187 #else 188 AutoCaller autoCaller(this); 189 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 190 191 CheckComArgOutPointerValid(aGenerationId); 192 193 *aGenerationId = mData.mGenerationID; 194 195 return S_OK; 157 196 #endif /* VBOX_WITH_GUEST_CONTROL */ 158 197 } … … 166 205 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 167 206 168 ReturnComNotImplemented(); 207 CheckComArgOutPointerValid(aGID); 208 209 *aGID = mData.mGID; 210 211 return S_OK; 169 212 #endif /* VBOX_WITH_GUEST_CONTROL */ 170 213 } … … 178 221 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 179 222 180 ReturnComNotImplemented(); 223 CheckComArgOutPointerValid(aGroupName); 224 225 mData.mGroupName.cloneTo(aGroupName); 226 227 return S_OK; 181 228 #endif /* VBOX_WITH_GUEST_CONTROL */ 182 229 } … … 190 237 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 191 238 192 ReturnComNotImplemented(); 239 CheckComArgOutPointerValid(aHardLinks); 240 241 *aHardLinks = mData.mNumHardLinks; 242 243 return S_OK; 193 244 #endif /* VBOX_WITH_GUEST_CONTROL */ 194 245 } … … 202 253 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 203 254 204 ReturnComNotImplemented(); 255 CheckComArgOutPointerValid(aModificationTime); 256 257 *aModificationTime = mData.mModificationTime; 258 259 return S_OK; 205 260 #endif /* VBOX_WITH_GUEST_CONTROL */ 206 261 } … … 214 269 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 215 270 216 ReturnComNotImplemented(); 217 #endif /* VBOX_WITH_GUEST_CONTROL */ 218 } 219 220 STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeID)(LONG64 *aNodeID) 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 ReturnComNotImplemented(); 229 #endif /* VBOX_WITH_GUEST_CONTROL */ 230 } 231 232 STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeIDDevice)(ULONG *aNodeIDDevice) 233 { 234 #ifndef VBOX_WITH_GUEST_CONTROL 235 ReturnComNotImplemented(); 236 #else 237 AutoCaller autoCaller(this); 238 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 239 240 ReturnComNotImplemented(); 241 #endif /* VBOX_WITH_GUEST_CONTROL */ 242 } 243 244 STDMETHODIMP GuestFsObjInfo::COMGETTER(ObjectSize)(ULONG *aObjectSize) 245 { 246 #ifndef VBOX_WITH_GUEST_CONTROL 247 ReturnComNotImplemented(); 248 #else 249 AutoCaller autoCaller(this); 250 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 251 252 ReturnComNotImplemented(); 271 CheckComArgOutPointerValid(aName); 272 273 mData.mName.cloneTo(aName); 274 275 return S_OK; 276 #endif /* VBOX_WITH_GUEST_CONTROL */ 277 } 278 279 STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeId)(LONG64 *aNodeId) 280 { 281 #ifndef VBOX_WITH_GUEST_CONTROL 282 ReturnComNotImplemented(); 283 #else 284 AutoCaller autoCaller(this); 285 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 286 287 CheckComArgOutPointerValid(aNodeId); 288 289 *aNodeId = mData.mNodeID; 290 291 return S_OK; 292 #endif /* VBOX_WITH_GUEST_CONTROL */ 293 } 294 295 STDMETHODIMP GuestFsObjInfo::COMGETTER(NodeIdDevice)(ULONG *aNodeIdDevice) 296 { 297 #ifndef VBOX_WITH_GUEST_CONTROL 298 ReturnComNotImplemented(); 299 #else 300 AutoCaller autoCaller(this); 301 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 302 303 CheckComArgOutPointerValid(aNodeIdDevice); 304 305 *aNodeIdDevice = mData.mNodeIDDevice; 306 307 return S_OK; 308 #endif /* VBOX_WITH_GUEST_CONTROL */ 309 } 310 311 STDMETHODIMP GuestFsObjInfo::COMGETTER(ObjectSize)(LONG64 *aObjectSize) 312 { 313 #ifndef VBOX_WITH_GUEST_CONTROL 314 ReturnComNotImplemented(); 315 #else 316 AutoCaller autoCaller(this); 317 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 318 319 CheckComArgOutPointerValid(aObjectSize); 320 321 *aObjectSize = mData.mObjectSize; 322 323 return S_OK; 253 324 #endif /* VBOX_WITH_GUEST_CONTROL */ 254 325 } … … 262 333 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 263 334 264 ReturnComNotImplemented(); 335 CheckComArgOutPointerValid(aType); 336 337 *aType = mData.mType; 338 339 return S_OK; 265 340 #endif /* VBOX_WITH_GUEST_CONTROL */ 266 341 } … … 274 349 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 275 350 276 ReturnComNotImplemented(); 351 CheckComArgOutPointerValid(aUID); 352 353 *aUID = mData.mUID; 354 355 return S_OK; 277 356 #endif /* VBOX_WITH_GUEST_CONTROL */ 278 357 } … … 286 365 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 287 366 288 ReturnComNotImplemented(); 367 CheckComArgOutPointerValid(aUserFlags); 368 369 *aUserFlags = mData.mUserFlags; 370 371 return S_OK; 289 372 #endif /* VBOX_WITH_GUEST_CONTROL */ 290 373 } … … 298 381 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 299 382 300 ReturnComNotImplemented(); 383 CheckComArgOutPointerValid(aUserName); 384 385 mData.mUserName.cloneTo(aUserName); 386 387 return S_OK; 301 388 #endif /* VBOX_WITH_GUEST_CONTROL */ 302 389 } … … 310 397 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 311 398 312 ReturnComNotImplemented(); 313 #endif /* VBOX_WITH_GUEST_CONTROL */ 314 } 315 399 CheckComArgOutPointerValid(aACL); 400 401 mData.mACL.cloneTo(aACL); 402 403 return S_OK; 404 #endif /* VBOX_WITH_GUEST_CONTROL */ 405 } 406
Note:
See TracChangeset
for help on using the changeset viewer.