updater.h

main 58 lines · 1.9 KB Raw
Alex Alex Commit Map Editor 18/10/2026 23:40
1//////////////////////////////////////////////////////////////////////
2// This file is part of Remere's Map Editor
3//////////////////////////////////////////////////////////////////////
4// Remere's Map Editor is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// Remere's Map Editor is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
16//////////////////////////////////////////////////////////////////////
17
18#ifdef _USE_UPDATER_
19
20 #ifndef RME_UPDATER_H_
21 #define RME_UPDATER_H_
22
23 #include "threads.h"
24
25extern const wxEventType EVT_UPDATE_CHECK_FINISHED;
26
27 #define EVT_ON_UPDATE_CHECK_FINISHED(id, fn) \
28 DECLARE_EVENT_TABLE_ENTRY( \
29 EVT_UPDATE_CHECK_FINISHED, id, wxID_ANY, \
30 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &fn), \
31 (wxObject*)nullptr \
32 ),
33
34class wxURL;
35
36class UpdateConnectionThread : public DetachedThread {
37public:
38 UpdateConnectionThread(wxEvtHandler* receiver, wxURL* url);
39 virtual ~UpdateConnectionThread();
40
41protected:
42 virtual ExitCode Entry();
43 wxEvtHandler* receiver;
44 wxURL* url;
45};
46
47class UpdateChecker {
48public:
49 UpdateChecker();
50 ~UpdateChecker();
51
52 void connect(wxEvtHandler* receiver);
53};
54
55 #endif
56
57#endif
58
Top