KiCad PCB EDA Suite
Loading...
Searching...
No Matches
update_manager.h
Go to the documentation of this file.
1
/*
2
* This program source code file is part of KiCad, a free EDA CAD application.
3
*
4
* Copyright (C) 2023 Mark Roszko <
[email protected]
>
5
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
*/
20
21
#include <wx/string.h>
22
#include <atomic>
23
#include <memory>
24
#include <future>
25
26
class
PROGRESS_REPORTER
;
27
struct
BACKGROUND_JOB
;
28
29
class
wxWindow;
30
31
class
UPDATE_MANAGER
32
{
33
public
:
34
UPDATE_MANAGER
();
35
~UPDATE_MANAGER
();
36
37
void
CheckForUpdate
( wxWindow* aNoticeParent );
38
int
PostRequest
(
const
wxString& aUrl, std::string aRequestBody, std::ostream* aOutput,
39
PROGRESS_REPORTER
* aReporter,
const
size_t
aSizeLimit );
40
41
private
:
42
std::atomic<bool>
m_working
;
43
std::shared_ptr<BACKGROUND_JOB>
m_updateBackgroundJob
;
44
std::future<void>
m_updateTask
;
45
};
PROGRESS_REPORTER
A progress reporter interface for use in multi-threaded environments.
Definition
progress_reporter.h:36
UPDATE_MANAGER::UPDATE_MANAGER
UPDATE_MANAGER()
UPDATE_MANAGER::~UPDATE_MANAGER
~UPDATE_MANAGER()
Definition
update_manager.cpp:85
UPDATE_MANAGER::m_updateBackgroundJob
std::shared_ptr< BACKGROUND_JOB > m_updateBackgroundJob
Definition
update_manager.h:43
UPDATE_MANAGER::PostRequest
int PostRequest(const wxString &aUrl, std::string aRequestBody, std::ostream *aOutput, PROGRESS_REPORTER *aReporter, const size_t aSizeLimit)
Definition
update_manager.cpp:98
UPDATE_MANAGER::CheckForUpdate
void CheckForUpdate(wxWindow *aNoticeParent)
Definition
update_manager.cpp:167
UPDATE_MANAGER::m_working
std::atomic< bool > m_working
Definition
update_manager.h:42
UPDATE_MANAGER::m_updateTask
std::future< void > m_updateTask
Definition
update_manager.h:44
BACKGROUND_JOB
Definition
background_jobs_monitor.h:73
src
kicad
update_manager.h
Generated on Fri Jun 26 2026 00:05:37 for KiCad PCB EDA Suite by
1.13.2