20#include <wx/infobar.h>
21#include <wx/sstream.h>
23const long WEBUPDATE_CONNECTION_TIMEOUT = 2000;
24const wxString WEBUPDATE_SERVER_DOWNLOAD =
"http://www.toolmap.ch";
25const wxString WEBUPDATE_SERVER_UPDATE =
"https://www.terranum.ch/toolmap/latestversion2.txt";
27const int INFOBAR_DOWNLOAD_BUTTON = wxID_HIGHEST + 10;
35 void OnCommandDownload(wxCommandEvent& event);
37 void OnInternetFailed(wxThreadEvent& event);
39 void OnNewVersion(wxThreadEvent& event);
41 void OnNoNewVersion(wxThreadEvent& event);
43 DECLARE_EVENT_TABLE();
52size_t wxcurl_str_write(
void* ptr,
size_t size,
size_t nmemb,
void* stream);
54const int THREAD_MESSAGE_NEW_VERSION = wxID_HIGHEST + 11;
55const int THREAD_MESSAGE_NONEW_VERSION = wxID_HIGHEST + 12;
56const int THREAD_MESSAGE_NO_INTERNET = wxID_HIGHEST + 13;
62 wxStringOutputStream m_Buffer;
65 bool m_msgNoNewVersion;
71 virtual ExitCode Entry();
74 WebUpdateThread(wxWindow* parent,
const wxString& proxy = wxEmptyString);
78 bool CheckNewVersion(
long actualversion,
bool msgNewVersion =
true,
bool msgNoNewVersion =
true,
79 bool msgNoInternet =
true);