3
* VBox frontends: Qt4 GUI ("VirtualBox"):
4
* UIUpdateManager class declaration
8
* Copyright (C) 2006-2011 Oracle Corporation
10
* This file is part of VirtualBox Open Source Edition (OSE), as
11
* available from http://www.virtualbox.org. This file is free software;
12
* you can redistribute it and/or modify it under the terms of the GNU
13
* General Public License (GPL) as published by the Free Software
14
* Foundation, in version 2 as it comes in the "COPYING" file of the
15
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19
#ifndef __UIUpdateManager_h__
20
#define __UIUpdateManager_h__
22
/* Global includes: */
26
#include "UIUpdateDefs.h"
28
/* Forward declarations: */
31
/* Singleton to check for the new VirtualBox version.
32
* Performs update of required parts if necessary. */
33
class UIUpdateManager : public QObject
39
/* Schedule manager: */
40
static void schedule();
41
/* Shutdown manager: */
42
static void shutdown();
43
/* Manager instance: */
44
static UIUpdateManager* instance() { return m_pInstance; }
48
/* Signal to notify listeners about downloading: */
49
void sigDownloaderCreatedForExtensionPack();
53
/* Force call for new version check: */
58
/* Slot to check if update is necessary: */
59
void sltCheckIfUpdateIsNecessary(bool fForceCall = false);
61
/* Handle downloaded extension pack: */
62
void sltHandleDownloadedExtensionPack(const QString &strSource, const QString &strTarget);
66
/* Constructor/destructor: */
71
void checkIfUpdateIsNecessary(bool fForceCall);
72
void checkIfUpdateIsNecessaryForExtensionPack(bool fForceCall);
75
static UIUpdateManager* m_pInstance;
78
#define gUpdateManager UIUpdateManager::instance()
80
/* Class to check for the new VirtualBox version: */
81
class UINewVersionChecker : public QObject
88
UINewVersionChecker(bool fForceCall);
90
/* Function to check if new version is available: */
91
void checkForTheNewVersion();
95
/* Slot to analyze new version check reply: */
96
void sltHandleCheckReply();
106
#endif // __UIUpdateManager_h__