VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.h

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: UIUpdateManager.h 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIUpdateManager class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2023 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_networking_UIUpdateManager_h
29#define FEQT_INCLUDED_SRC_networking_UIUpdateManager_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QObject>
36
37/* GUI includes: */
38#include "UILibraryDefs.h"
39
40/* Forward declarations: */
41class UIExecutionQueue;
42
43/** Singleton to perform new version checks
44 * and update of various VirtualBox parts. */
45class SHARED_LIBRARY_STUFF UIUpdateManager : public QObject
46{
47 Q_OBJECT;
48
49 /** Constructs Update Manager. */
50 UIUpdateManager();
51 /** Destructs Update Manager. */
52 ~UIUpdateManager();
53
54public:
55
56 /** Schedules manager. */
57 static void schedule();
58 /** Shutdowns manager. */
59 static void shutdown();
60 /** Returns manager instance. */
61 static UIUpdateManager *instance() { return s_pInstance; }
62
63 /** Returns whether the Extension Pack installation is requested. */
64 bool isEPInstallationRequested() const { return m_fEPInstallationRequested; }
65 /** Defines whether the Extension Pack installation is @a fRequested. */
66 void setEPInstallationRequested(bool fRequested) { m_fEPInstallationRequested = fRequested; }
67
68public slots:
69
70 /** Performs forced new version check. */
71 void sltForceCheck();
72
73private slots:
74
75 /** Checks whether update is necessary.
76 * @param fForcedCall Brings whether this customer has forced privelegies. */
77 void sltCheckIfUpdateIsNecessary(bool fForcedCall = false);
78
79 /** Handles update finishing. */
80 void sltHandleUpdateFinishing();
81
82private:
83
84 /** Holds the singleton instance. */
85 static UIUpdateManager *s_pInstance;
86
87 /** Holds the execution queue instance. */
88 UIExecutionQueue *m_pQueue;
89 /** Holds whether Update Manager is running. */
90 bool m_fIsRunning;
91 /** Holds the refresh period. */
92 quint64 m_uTime;
93
94 /** Holds whether the Extension Pack installation is requested. */
95 bool m_fEPInstallationRequested;
96};
97
98/** Singleton Update Manager 'official' name. */
99#define gUpdateManager UIUpdateManager::instance()
100
101#endif /* !FEQT_INCLUDED_SRC_networking_UIUpdateManager_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use