VirtualBox

source: vbox/trunk/src/VBox/Main/include/CloudClientImpl.h@ 73337

Last change on this file since 73337 was 73337, checked in by vboxsync, 6 years ago

bugref:9152. Renamed CloudUserProfileList to CloudUserProfiles.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: CloudClientImpl.h 73337 2018-07-23 22:05:26Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation
4 */
5
6/*
7 * Copyright (C) 2006-2018 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
19#ifndef ____H_CLOUDCLIENTIMPL
20#define ____H_CLOUDCLIENTIMPL
21
22/* VBox includes */
23
24#include "CloudClientWrap.h"
25
26/* VBox forward declarations */
27class CloudUserProfiles;
28
29class CloudClient :
30 public CloudClientWrap
31{
32public:
33 DECLARE_EMPTY_CTOR_DTOR(CloudClient)
34// explicit CloudClient(CloudProviderId_T aCloudProvider);
35
36 HRESULT FinalConstruct();
37 void FinalRelease();
38
39 HRESULT init(VirtualBox *aVirtualBox);
40 HRESULT initCloudClient(CloudUserProfiles *aProfiles,
41 VirtualBox *aParent,
42 CloudProviderId_T aCloudProvider,
43 const com::Utf8Str &aProfileName);
44 void uninit();
45
46protected:
47 ComPtr<VirtualBox> const mParent; /**< Strong reference to the parent object (VirtualBox/IMachine). */
48 CloudProviderId_T mCloudProvider;
49 std::map <Utf8Str, Utf8Str> userProfile;
50
51private:
52 HRESULT getOperationParameters(CloudOperation_T aCloudOperation, com::Utf8Str &aJsonString);
53
54 HRESULT createOperation(const com::Utf8Str &aProfileName,
55 CloudOperation_T aCloudOperation,
56 com::Guid &aOpId);
57 HRESULT runOperation(const com::Guid &aOpId,
58 LONG64 aTimeout);
59 HRESULT checkOperationResult(const com::Guid &aOpId,
60 LONG64 *aStartOpTime,
61 LONG64 *aLastTime,
62 CloudOperationResult_T *aResult);
63 HRESULT getOperationParameterNames(CloudOperation_T aCloudOperation,
64 std::vector<com::Utf8Str> &aParameterNames);
65 HRESULT getOperationParameterProperties(const com::Utf8Str &aOpParameterName,
66 com::Utf8Str &aOpParameterType,
67 com::Utf8Str &aOpParameterDesc,
68 std::vector<com::Utf8Str> &aOpParameterValues);
69 HRESULT setParametersForOperation(const com::Guid &aOpId,
70 const std::vector<com::Utf8Str> &aValues);
71};
72
73class CloudClientOCI :
74 public CloudClient
75{
76public:
77 DECLARE_EMPTY_CTOR_DTOR(CloudClientOCI)
78
79 HRESULT initCloudClient(CloudUserProfiles *aProfiles,
80 VirtualBox *aParent,
81 CloudProviderId_T aCloudProvider,
82 const com::Utf8Str &aProfileName);
83
84private:
85 HRESULT getOperationParameters(CloudOperation_T aCloudOperation, com::Utf8Str &aJsonString);
86
87 HRESULT createOperation(const com::Utf8Str &aProfileName,
88 CloudOperation_T aCloudOperation,
89 com::Guid &aOpId);
90 HRESULT runOperation(const com::Guid &aOpId,
91 LONG64 aTimeout);
92 HRESULT checkOperationResult(const com::Guid &aOpId,
93 LONG64 *aStartOpTime,
94 LONG64 *aLastTime,
95 CloudOperationResult_T *aResult);
96 HRESULT getOperationParameterNames(CloudOperation_T aCloudOperation,
97 std::vector<com::Utf8Str> &aParameterNames);
98 HRESULT getOperationParameterProperties(const com::Utf8Str &aOpParameterName,
99 com::Utf8Str &aOpParameterType,
100 com::Utf8Str &aOpParameterDesc,
101 std::vector<com::Utf8Str> &aOpParameterValues);
102 HRESULT setParametersForOperation(const com::Guid &aOpId,
103 const std::vector<com::Utf8Str> &aValues);
104};
105
106#endif // !____H_CLOUDCLIENTIMPL
107/* vi: set tabstop=4 shiftwidth=4 expandtab: */
108
Note: See TracBrowser for help on using the repository browser.

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