VirtualBox

Changeset 75663 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Nov 22, 2018 2:00:59 PM (6 years ago)
Author:
vboxsync
Message:

Main/ExtPackManager+CloudProviderManager+VirtualBox: Handle runtime install and uninstall of extension packs containing cloud providers. This is a safeguard against uninstalling active cloud providers (which would cause crashes), and makes the install more convcenient. At the same time it eliminated the need to have a special "detect all cloud providers" logic when VBoxSVC is started. It achieves perfect singleton property of the per-extpack CloudProviderManager and the related CloudProvider objects. Nothing is ever created twice (which would cause trouble with coordinating e.g. the profile file updates).

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

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

    r74926 r75663  
    2121
    2222#include "CloudProviderManagerWrap.h"
    23 #ifdef VBOX_WITH_EXTPACK
    24 class ExtPackManager;
    25 #endif
    2623
    2724
     
    3532    void FinalRelease();
    3633
    37     HRESULT init(VirtualBox *aParent);
     34    HRESULT init();
    3835    void uninit();
    3936
    4037#ifdef VBOX_WITH_EXTPACK
    4138    // Safe helpers, take care of caller and lock themselves.
    42     void i_refreshProviders();
     39    bool i_canRemoveExtPack(IExtPack *aExtPack);
     40    void i_addExtPack(IExtPack *aExtPack);
    4341#endif
    4442
     
    5553private:
    5654#ifdef VBOX_WITH_EXTPACK
    57     ComObjPtr<ExtPackManager> mpExtPackMgr;
    58     uint64_t mcExtPackMgrUpdate;
    59     std::map<com::Utf8Str, ComPtr<ICloudProviderManager> > m_mapCloudProviderManagers;
     55    typedef std::map<com::Utf8Str, ComPtr<ICloudProviderManager> > ExtPackNameCloudProviderManagerMap;
     56    ExtPackNameCloudProviderManagerMap m_mapCloudProviderManagers;
     57    typedef std::vector<com::Utf8Str> ExtPackNameVec;
     58    ExtPackNameVec m_astrExtPackNames;
    6059#endif
    6160
    62     std::vector<ComPtr<ICloudProvider> > m_apCloudProviders;
     61    typedef std::vector<ComPtr<ICloudProvider> > CloudProviderVec;
     62    CloudProviderVec m_apCloudProviders;
    6363};
    6464
  • trunk/src/VBox/Main/include/ExtPackManagerImpl.h

    r74804 r75663  
    131131    bool        i_wantsToBeDefaultVrde(void) const;
    132132    HRESULT     i_refresh(bool *pfCanDelete);
     133#ifndef VBOX_COM_INPROC
     134    bool        i_areThereCloudProviderUninstallVetos();
     135    void        i_notifyCloudProviderManager();
     136#endif
    133137    /** @}  */
    134138
  • trunk/src/VBox/Main/include/VirtualBoxImpl.h

    r75380 r75663  
    4040class DHCPServer;
    4141class PerformanceCollector;
     42class CloudProviderManager;
    4243#ifdef VBOX_WITH_EXTPACK
    4344class ExtPackManager;
     
    216217    const Guid &i_getGlobalRegistryId() const;
    217218
    218     const ComObjPtr<Host>& i_host() const;
    219     SystemProperties* i_getSystemProperties() const;
     219    const ComObjPtr<Host> &i_host() const;
     220    SystemProperties *i_getSystemProperties() const;
     221    CloudProviderManager *i_getCloudProviderManager() const;
    220222#ifdef VBOX_WITH_EXTPACK
    221     ExtPackManager* i_getExtPackManager() const;
     223    ExtPackManager *i_getExtPackManager() const;
    222224#endif
    223225#ifdef VBOX_WITH_RESOURCE_USAGE_API
    224     const ComObjPtr<PerformanceCollector>& i_performanceCollector() const;
     226    const ComObjPtr<PerformanceCollector> &i_performanceCollector() const;
    225227#endif /* VBOX_WITH_RESOURCE_USAGE_API */
    226228
     
    229231
    230232    /** Returns the VirtualBox home directory */
    231     const Utf8Str& i_homeDir() const;
     233    const Utf8Str &i_homeDir() const;
    232234    int i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
    233235    void i_copyPathRelativeToConfig(const Utf8Str &strSource, Utf8Str &strTarget);
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