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, you may find one here:
19
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20
* or you may search the http://www.gnu.org website for the version 2 license,
21
* or you may write to the Free Software Foundation, Inc.,
22
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23
*/
24
25
#include <wx/string.h>
26
#include <atomic>
27
#include <memory>
28
#include <future>
29
30
class
PROGRESS_REPORTER
;
31
struct
BACKGROUND_JOB
;
32
33
class
wxWindow;
34
35
class
UPDATE_MANAGER
36
{
37
public
:
38
UPDATE_MANAGER
();
39
~UPDATE_MANAGER
();
40
41
void
CheckForUpdate
( wxWindow* aNoticeParent );
42
int
PostRequest
(
const
wxString& aUrl, std::string aRequestBody, std::ostream* aOutput,
43
PROGRESS_REPORTER
* aReporter,
const
size_t
aSizeLimit );
44
45
private
:
46
std::atomic<bool>
m_working
;
47
std::shared_ptr<BACKGROUND_JOB>
m_updateBackgroundJob
;
48
std::future<void>
m_updateTask
;
49
};
PROGRESS_REPORTER
A progress reporter interface for use in multi-threaded environments.
Definition
progress_reporter.h:39
UPDATE_MANAGER::UPDATE_MANAGER
UPDATE_MANAGER()
UPDATE_MANAGER::~UPDATE_MANAGER
~UPDATE_MANAGER()
Definition
update_manager.cpp:89
UPDATE_MANAGER::m_updateBackgroundJob
std::shared_ptr< BACKGROUND_JOB > m_updateBackgroundJob
Definition
update_manager.h:47
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:102
UPDATE_MANAGER::CheckForUpdate
void CheckForUpdate(wxWindow *aNoticeParent)
Definition
update_manager.cpp:170
UPDATE_MANAGER::m_working
std::atomic< bool > m_working
Definition
update_manager.h:46
UPDATE_MANAGER::m_updateTask
std::future< void > m_updateTask
Definition
update_manager.h:48
BACKGROUND_JOB
Definition
background_jobs_monitor.h:74
src
kicad
update_manager.h
Generated on Sun Sep 21 2025 01:05:26 for KiCad PCB EDA Suite by
1.13.2