Audacity 3.2.0
UpdateManager.h
Go to the documentation of this file.
1/*!********************************************************************
2 Audacity: A Digital Audio Editor
3
4 @file UpdateManager.h
5 @brief Declare a class that handles managing of updates.
6
7 Anton Gerasimov
8 **********************************************************************/
9#pragma once
10
11#include "VersionId.h"
12#include "VersionPatch.h"
13#include "UpdateDataParser.h"
14
15#include "Prefs.h"
16#include "BasicUI.h"
17
18#include <wx/string.h>
19#include <wx/event.h>
20#include <wx/timer.h>
21#include <wx/progdlg.h>
22
23#include <iostream>
24#include <fstream>
25#include <mutex>
26
28
33class UpdateManager final : public wxEvtHandler
34{
35public:
36 UpdateManager() = default;
37
38 static UpdateManager& GetInstance();
39 static void Start(bool suppressModal);
40
41 void GetUpdates(bool ignoreNetworkErrors, bool configurableNotification);
42
44
45private:
48
49 wxTimer mTimer;
50
51 void OnTimer(wxTimerEvent& event);
52
55
56 std::unique_ptr<BasicUI::ProgressDialog> mProgressDialog;
57
59 std::ofstream mAudacityInstaller;
60
61 std::mutex mUpdateMutex;
62 bool mOnProgress{ false };
63public:
64 DECLARE_EVENT_TABLE()
65};
Toolkit-neutral facade for basic user interface services.
Declare a class that parses update server data format.
Declare a class with version number manipulation.
Declare a structure that describes patch fields.
A class that parses update server data format.
A class that managing of updates.
Definition: UpdateManager.h:34
void GetUpdates(bool ignoreNetworkErrors, bool configurableNotification)
std::unique_ptr< BasicUI::ProgressDialog > mProgressDialog
Definition: UpdateManager.h:56
static UpdateManager & GetInstance()
std::string mAudacityInstallerPath
Definition: UpdateManager.h:58
std::mutex mUpdateMutex
Definition: UpdateManager.h:61
UpdateManager()=default
static void Start(bool suppressModal)
void OnTimer(wxTimerEvent &event)
UpdateDataParser mUpdateDataParser
Definition: UpdateManager.h:46
std::ofstream mAudacityInstaller
Definition: UpdateManager.h:59
VersionPatch GetVersionPatch() const
wxTimer mTimer
Definition: UpdateManager.h:49
VersionPatch mVersionPatch
Definition: UpdateManager.h:47
bool IsTimeForUpdatesChecking()
Scheduling update time for avoiding multiplying update notifications.
A structure that describes patch fields.
Definition: VersionPatch.h:15