VirtualBox

Changeset 73173 in vbox


Ignore:
Timestamp:
Jul 17, 2018 11:47:51 AM (6 years ago)
Author:
vboxsync
Message:

bugref:9152. Fixed several issues in the code.

Location:
trunk/src/VBox/Main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/CloudClientImpl.h

    r73164 r73173  
    3232public:
    3333    DECLARE_EMPTY_CTOR_DTOR(CloudClient)
    34     explicit CloudClient(CloudProviderId_T aCloudProvider);
     34//  explicit CloudClient(CloudProviderId_T aCloudProvider);
    3535
    3636    HRESULT FinalConstruct();
     
    4444    void uninit();
    4545
    46 private:
     46protected:
    4747    ComPtr<VirtualBox> const mParent;       /**< Strong reference to the parent object (VirtualBox/IMachine). */
    48     ComPtr<Machine> mMachine;               /**< Strong reference to the machine object (Machine/IMachine). */
    4948    CloudProviderId_T mCloudProvider;
    5049    std::map <Utf8Str, Utf8Str> userProfile;
     
    7170                                      const std::vector<com::Utf8Str> &aValues);
    7271};
     72
    7373#endif // !____H_CLOUDCLIENTIMPL
    7474/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/include/CloudUserProfileListImpl.h

    r73164 r73173  
    9898    HRESULT readProfiles(const Utf8Str &strConfigPath);
    9999
    100     HRESULT createProfile(const com::Utf8Str &aProfileName,
     100private:
     101    HRESULT i_createProfile(const com::Utf8Str &aProfileName,
    101102                          const std::map <Utf8Str, Utf8Str> &aProfile);
    102     HRESULT updateProfile(const com::Utf8Str &aProfileName,
     103    HRESULT i_updateProfile(const com::Utf8Str &aProfileName,
    103104                          const std::map <Utf8Str, Utf8Str> &aProfile);
    104     HRESULT getProfileProperties(const com::Utf8Str &aName,
     105    HRESULT i_getProfileProperties(const com::Utf8Str &aName,
    105106                                 std::map <Utf8Str, Utf8Str> &aProfileName);
    106107private:
  • trunk/src/VBox/Main/src-server/CloudClientImpl.cpp

    r73167 r73173  
    5151}
    5252
    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//}
    5959
    6060HRESULT CloudClient::FinalConstruct()
     
    7979
    8080    unconst(mParent) = NULL;
    81     mMachine.setNull();
    8281}
    8382
     
    245244    return hrc;
    246245}
    247 
  • trunk/src/VBox/Main/src-server/CloudUserProfileListImpl.cpp

    r73169 r73173  
    236236void CloudUserProfileList::uninit()
    237237{
    238 
     238    /* Enclose the state transition Ready->InUninit->NotReady */
     239    AutoUninitSpan autoUninitSpan(this);
     240    if (autoUninitSpan.uninitDone())
     241        return;
     242
     243    unconst(mParent) = NULL;
    239244}
    240245
    241246HRESULT CloudUserProfileList::init(VirtualBox *aParent)
    242247{
     248    /* Enclose the state transition NotReady->InInit->Ready */
     249    AutoInitSpan autoInitSpan(this);
     250    AssertReturn(autoInitSpan.isOk(), E_FAIL);
     251
    243252    unconst(mParent) = aParent;
    244253
     254    autoInitSpan.setSucceeded();
    245255    return S_OK;
    246256}
     
    360370                                              ComPtr<ICloudClient> &aCloudClient)
    361371{
     372    HRESULT hrc = S_OK;
    362373    CloudProviderId_T providerId;
    363     HRESULT hrc = getProvider(&providerId);
     374    hrc = getProvider(&providerId);
    364375
    365376    ComObjPtr<CloudClient> ptrCloudClient;
     
    472483    {
    473484        std::map <Utf8Str, Utf8Str> profile;
    474         hrc = getProfileProperties(aProfileName, profile);
     485        hrc = i_getProfileProperties(aProfileName, profile);
    475486        if (SUCCEEDED(hrc))
    476487        {
     
    482493                aReturnNames.push_back(cit->first);
    483494                aReturnValues.push_back(cit->second);
     495                ++cit;
    484496            }
    485497        }
     
    511523
    512524
    513 HRESULT OCIUserProfileList::createProfile(const com::Utf8Str &aProfileName,
    514                                           const std::map <Utf8Str, Utf8Str> &aProfile)
     525HRESULT OCIUserProfileList::i_createProfile(const com::Utf8Str &aProfileName,
     526                                           const std::map <Utf8Str, Utf8Str> &aProfile)
    515527{
    516528    HRESULT hrc = S_OK;
     
    521533}
    522534
    523 HRESULT OCIUserProfileList::updateProfile(const com::Utf8Str &aProfileName,
    524                                           const std::map <Utf8Str, Utf8Str> &aProfile)
     535HRESULT OCIUserProfileList::i_updateProfile(const com::Utf8Str &aProfileName,
     536                                           const std::map <Utf8Str, Utf8Str> &aProfile)
    525537{
    526538    HRESULT hrc = S_OK;
     
    533545}
    534546
    535 HRESULT OCIUserProfileList::getProfileProperties(const com::Utf8Str &aProfileName,
    536                                                  std::map <Utf8Str, Utf8Str> &aProfile)
     547HRESULT OCIUserProfileList::i_getProfileProperties(const com::Utf8Str &aProfileName,
     548                                                  std::map <Utf8Str, Utf8Str> &aProfile)
    537549{
    538550    HRESULT hrc = S_OK;
  • trunk/src/VBox/Main/src-server/CloudUserProfileManagerImpl.cpp

    r73170 r73173  
    128128                if (SUCCEEDED(hrc))
    129129                {
    130                     Utf8Str strConfigPath = mParent->i_homeDir();
     130                    char szHomeDir[RTPATH_MAX];
     131                    int vrc = RTPathUserHome(szHomeDir, sizeof(szHomeDir));
     132                    Utf8Str strConfigPath(szHomeDir);
    131133                    strConfigPath.append(RTPATH_SLASH_STR)
    132134                                 .append(".oci")
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette