Changeset 73173 in vbox
- Timestamp:
- Jul 17, 2018 11:47:51 AM (6 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
-
include/CloudClientImpl.h (modified) (3 diffs)
-
include/CloudUserProfileListImpl.h (modified) (1 diff)
-
src-server/CloudClientImpl.cpp (modified) (3 diffs)
-
src-server/CloudUserProfileListImpl.cpp (modified) (7 diffs)
-
src-server/CloudUserProfileManagerImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/CloudClientImpl.h
r73164 r73173 32 32 public: 33 33 DECLARE_EMPTY_CTOR_DTOR(CloudClient) 34 explicit CloudClient(CloudProviderId_T aCloudProvider);34 // explicit CloudClient(CloudProviderId_T aCloudProvider); 35 35 36 36 HRESULT FinalConstruct(); … … 44 44 void uninit(); 45 45 46 pr ivate:46 protected: 47 47 ComPtr<VirtualBox> const mParent; /**< Strong reference to the parent object (VirtualBox/IMachine). */ 48 ComPtr<Machine> mMachine; /**< Strong reference to the machine object (Machine/IMachine). */49 48 CloudProviderId_T mCloudProvider; 50 49 std::map <Utf8Str, Utf8Str> userProfile; … … 71 70 const std::vector<com::Utf8Str> &aValues); 72 71 }; 72 73 73 #endif // !____H_CLOUDCLIENTIMPL 74 74 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/include/CloudUserProfileListImpl.h
r73164 r73173 98 98 HRESULT readProfiles(const Utf8Str &strConfigPath); 99 99 100 HRESULT createProfile(const com::Utf8Str &aProfileName, 100 private: 101 HRESULT i_createProfile(const com::Utf8Str &aProfileName, 101 102 const std::map <Utf8Str, Utf8Str> &aProfile); 102 HRESULT updateProfile(const com::Utf8Str &aProfileName,103 HRESULT i_updateProfile(const com::Utf8Str &aProfileName, 103 104 const std::map <Utf8Str, Utf8Str> &aProfile); 104 HRESULT getProfileProperties(const com::Utf8Str &aName,105 HRESULT i_getProfileProperties(const com::Utf8Str &aName, 105 106 std::map <Utf8Str, Utf8Str> &aProfileName); 106 107 private: -
trunk/src/VBox/Main/src-server/CloudClientImpl.cpp
r73167 r73173 51 51 } 52 52 53 CloudClient::CloudClient(CloudProviderId_T aCloudProvider)54 : mParent(NULL)55 {56 LogRel(("CloudClient::CloudClient(CloudProviderId_T %d)\n", mCloudProvider));57 mCloudProvider = aCloudProvider;58 }53 //CloudClient::CloudClient(CloudProviderId_T aCloudProvider) 54 // : mParent(NULL) 55 //{ 56 // LogRel(("CloudClient::CloudClient(CloudProviderId_T %d)\n", mCloudProvider)); 57 // mCloudProvider = aCloudProvider; 58 //} 59 59 60 60 HRESULT CloudClient::FinalConstruct() … … 79 79 80 80 unconst(mParent) = NULL; 81 mMachine.setNull();82 81 } 83 82 … … 245 244 return hrc; 246 245 } 247 -
trunk/src/VBox/Main/src-server/CloudUserProfileListImpl.cpp
r73169 r73173 236 236 void CloudUserProfileList::uninit() 237 237 { 238 238 /* Enclose the state transition Ready->InUninit->NotReady */ 239 AutoUninitSpan autoUninitSpan(this); 240 if (autoUninitSpan.uninitDone()) 241 return; 242 243 unconst(mParent) = NULL; 239 244 } 240 245 241 246 HRESULT CloudUserProfileList::init(VirtualBox *aParent) 242 247 { 248 /* Enclose the state transition NotReady->InInit->Ready */ 249 AutoInitSpan autoInitSpan(this); 250 AssertReturn(autoInitSpan.isOk(), E_FAIL); 251 243 252 unconst(mParent) = aParent; 244 253 254 autoInitSpan.setSucceeded(); 245 255 return S_OK; 246 256 } … … 360 370 ComPtr<ICloudClient> &aCloudClient) 361 371 { 372 HRESULT hrc = S_OK; 362 373 CloudProviderId_T providerId; 363 HRESULThrc = getProvider(&providerId);374 hrc = getProvider(&providerId); 364 375 365 376 ComObjPtr<CloudClient> ptrCloudClient; … … 472 483 { 473 484 std::map <Utf8Str, Utf8Str> profile; 474 hrc = getProfileProperties(aProfileName, profile);485 hrc = i_getProfileProperties(aProfileName, profile); 475 486 if (SUCCEEDED(hrc)) 476 487 { … … 482 493 aReturnNames.push_back(cit->first); 483 494 aReturnValues.push_back(cit->second); 495 ++cit; 484 496 } 485 497 } … … 511 523 512 524 513 HRESULT OCIUserProfileList:: createProfile(const com::Utf8Str &aProfileName,514 const std::map <Utf8Str, Utf8Str> &aProfile)525 HRESULT OCIUserProfileList::i_createProfile(const com::Utf8Str &aProfileName, 526 const std::map <Utf8Str, Utf8Str> &aProfile) 515 527 { 516 528 HRESULT hrc = S_OK; … … 521 533 } 522 534 523 HRESULT OCIUserProfileList:: updateProfile(const com::Utf8Str &aProfileName,524 const std::map <Utf8Str, Utf8Str> &aProfile)535 HRESULT OCIUserProfileList::i_updateProfile(const com::Utf8Str &aProfileName, 536 const std::map <Utf8Str, Utf8Str> &aProfile) 525 537 { 526 538 HRESULT hrc = S_OK; … … 533 545 } 534 546 535 HRESULT OCIUserProfileList:: getProfileProperties(const com::Utf8Str &aProfileName,536 std::map <Utf8Str, Utf8Str> &aProfile)547 HRESULT OCIUserProfileList::i_getProfileProperties(const com::Utf8Str &aProfileName, 548 std::map <Utf8Str, Utf8Str> &aProfile) 537 549 { 538 550 HRESULT hrc = S_OK; -
trunk/src/VBox/Main/src-server/CloudUserProfileManagerImpl.cpp
r73170 r73173 128 128 if (SUCCEEDED(hrc)) 129 129 { 130 Utf8Str strConfigPath = mParent->i_homeDir(); 130 char szHomeDir[RTPATH_MAX]; 131 int vrc = RTPathUserHome(szHomeDir, sizeof(szHomeDir)); 132 Utf8Str strConfigPath(szHomeDir); 131 133 strConfigPath.append(RTPATH_SLASH_STR) 132 134 .append(".oci")
Note:
See TracChangeset
for help on using the changeset viewer.

