VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/cloud/UICloudMachineManager.h@ 105266

Last change on this file since 105266 was 105159, checked in by vboxsync, 9 months ago

FE/Qt: Build fix for r163797.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: UICloudMachineManager.h 105159 2024-07-05 11:42:30Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UICloudMachineManager class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_cloud_UICloudMachineManager_h
29#define FEQT_INCLUDED_SRC_cloud_UICloudMachineManager_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QObject>
36
37/* Other VBox includes: */
38#include <iprt/cdefs.h> // for RT_OVERRIDE / RT_FINAL stuff
39
40/* Forward declarations: */
41class QString;
42class QUuid;
43class CCloudMachine;
44
45/** QObject subclass processing various cloud signals and handlers. */
46class UICloudMachineManager : public QObject
47{
48 Q_OBJECT;
49
50signals:
51
52 /** Notifies listeners about cloud VM was unregistered.
53 * @param strProviderShortName Brings provider short name.
54 * @param strProfileName Brings profile name.
55 * @param uId Brings cloud VM id. */
56 void sigCloudMachineUnregistered(const QString &strProviderShortName,
57 const QString &strProfileName,
58 const QUuid &uId);
59 /** Notifies listeners about cloud VM was registered.
60 * @param strProviderShortName Brings provider short name.
61 * @param strProfileName Brings profile name.
62 * @param comMachine Brings cloud VM. */
63 void sigCloudMachineRegistered(const QString &strProviderShortName,
64 const QString &strProfileName,
65 const CCloudMachine &comMachine);
66
67public:
68
69 /** Returns UICloudMachineManager instance. */
70 static UICloudMachineManager *instance() { return s_pInstance; }
71 /** Creates UICloudMachineManager instance. */
72 static void create();
73 /** Destroys UICloudMachineManager instance. */
74 static void destroy();
75
76 /** Notifies listeners about cloud VM was unregistered.
77 * @param strProviderShortName Brings provider short name.
78 * @param strProfileName Brings profile name.
79 * @param uId Brings cloud VM id. */
80 void notifyCloudMachineUnregistered(const QString &strProviderShortName,
81 const QString &strProfileName,
82 const QUuid &uId);
83 /** Notifies listeners about cloud VM was registered.
84 * @param strProviderShortName Brings provider short name.
85 * @param strProfileName Brings profile name.
86 * @param comMachine Brings cloud VM. */
87 void notifyCloudMachineRegistered(const QString &strProviderShortName,
88 const QString &strProfileName,
89 const CCloudMachine &comMachine);
90
91public slots:
92
93 /** Handles signal about cloud machine was added. */
94 void sltHandleCloudMachineAdded(const QString &strProviderShortName,
95 const QString &strProfileName,
96 const CCloudMachine &comMachine);
97
98private:
99
100 /** Construcs global UICloudMachineManager object. */
101 UICloudMachineManager();
102 /** Destrucs global UICloudMachineManager object. */
103 virtual ~UICloudMachineManager() RT_OVERRIDE RT_FINAL;
104
105 /** Prepares all. */
106 void prepare();
107 /** Cleanups all. */
108 void cleanup();
109
110 /** Holds the singleton UICloudMachineManager instance. */
111 static UICloudMachineManager *s_pInstance;
112};
113
114/** Singleton Cloud Machine Manager 'official' name. */
115#define gpCloudMachineManager UICloudMachineManager::instance()
116
117#endif /* !FEQT_INCLUDED_SRC_cloud_UICloudMachineManager_h */
Note: See TracBrowser for help on using the repository browser.

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