1 | /* $Id: CloudProviderManagerImpl.h 76562 2019-01-01 03:22:50Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VirtualBox COM class implementation
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2018-2019 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 |
|
---|
27 | class ATL_NO_VTABLE CloudProviderManager
|
---|
28 | : public CloudProviderManagerWrap
|
---|
29 | {
|
---|
30 | public:
|
---|
31 | DECLARE_EMPTY_CTOR_DTOR(CloudProviderManager)
|
---|
32 |
|
---|
33 | HRESULT FinalConstruct();
|
---|
34 | void FinalRelease();
|
---|
35 |
|
---|
36 | HRESULT init();
|
---|
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 | typedef std::vector<com::Utf8Str> ExtPackNameVec;
|
---|
60 | ExtPackNameVec m_astrExtPackNames;
|
---|
61 | #endif
|
---|
62 |
|
---|
63 | typedef std::vector<ComPtr<ICloudProvider> > CloudProviderVec;
|
---|
64 | CloudProviderVec m_apCloudProviders;
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif /* !MAIN_INCLUDED_CloudProviderManagerImpl_h */
|
---|
68 |
|
---|
69 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|