1 | /* $Id: CloudProviderManagerImpl.h 93115 2022-01-01 11:31:46Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox COM class implementation
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2018-2022 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef MAIN_INCLUDED_CloudProviderManagerImpl_h
|
---|
19 | #define MAIN_INCLUDED_CloudProviderManagerImpl_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #include "CloudProviderManagerWrap.h"
|
---|
25 |
|
---|
26 | class ATL_NO_VTABLE CloudProviderManager
|
---|
27 | : public CloudProviderManagerWrap
|
---|
28 | {
|
---|
29 | public:
|
---|
30 | CloudProviderManager();
|
---|
31 | virtual ~CloudProviderManager();
|
---|
32 |
|
---|
33 | HRESULT FinalConstruct();
|
---|
34 | void FinalRelease();
|
---|
35 |
|
---|
36 | HRESULT init(VirtualBox *aVirtualBox);
|
---|
37 | void uninit();
|
---|
38 |
|
---|
39 | #ifdef VBOX_WITH_EXTPACK
|
---|
40 | // Safe helpers, take care of caller and lock themselves.
|
---|
41 | bool i_canRemoveExtPack(IExtPack *aExtPack);
|
---|
42 | void i_addExtPack(IExtPack *aExtPack);
|
---|
43 | #endif
|
---|
44 |
|
---|
45 | private:
|
---|
46 | // wrapped ICloudProviderManager attributes and methods
|
---|
47 | HRESULT getProviders(std::vector<ComPtr<ICloudProvider> > &aProviders);
|
---|
48 | HRESULT getProviderById(const com::Guid &aProviderId,
|
---|
49 | ComPtr<ICloudProvider> &aProvider);
|
---|
50 | HRESULT getProviderByShortName(const com::Utf8Str &aProviderName,
|
---|
51 | ComPtr<ICloudProvider> &aProvider);
|
---|
52 | HRESULT getProviderByName(const com::Utf8Str &aProviderName,
|
---|
53 | ComPtr<ICloudProvider> &aProvider);
|
---|
54 |
|
---|
55 | private:
|
---|
56 | #ifdef VBOX_WITH_EXTPACK
|
---|
57 | typedef std::map<com::Utf8Str, ComPtr<ICloudProviderManager> > ExtPackNameCloudProviderManagerMap;
|
---|
58 | ExtPackNameCloudProviderManagerMap m_mapCloudProviderManagers;
|
---|
59 |
|
---|
60 | typedef std::vector<com::Utf8Str> ExtPackNameVec;
|
---|
61 | ExtPackNameVec m_astrExtPackNames;
|
---|
62 | #endif
|
---|
63 |
|
---|
64 | typedef std::vector<ComPtr<ICloudProvider> > CloudProviderVec;
|
---|
65 | CloudProviderVec m_apCloudProviders;
|
---|
66 |
|
---|
67 | VirtualBox * const m_pVirtualBox;
|
---|
68 | };
|
---|
69 |
|
---|
70 | #endif /* !MAIN_INCLUDED_CloudProviderManagerImpl_h */
|
---|
71 |
|
---|
72 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|