diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-18 13:36:52 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-18 13:36:52 -0500 |
commit | 2844eecb65501f7dafa4de15d7377bfb810e1158 (patch) | |
tree | 7b2530cba82e54655a74bdcd6e31d9724583e83b /src/tracker_frame.h | |
parent | 4fb25ff5efe48ca8f594ce5b5d2839cb244018a9 (diff) | |
download | lingo-ap-tracker-2844eecb65501f7dafa4de15d7377bfb810e1158.tar.gz lingo-ap-tracker-2844eecb65501f7dafa4de15d7377bfb810e1158.tar.bz2 lingo-ap-tracker-2844eecb65501f7dafa4de15d7377bfb810e1158.zip |
Make IPC opt-in and configurable
Diffstat (limited to 'src/tracker_frame.h')
-rw-r--r-- | src/tracker_frame.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/tracker_frame.h b/src/tracker_frame.h index 9d18dc7..e9fec17 100644 --- a/src/tracker_frame.h +++ b/src/tracker_frame.h | |||
@@ -13,10 +13,34 @@ class TrackerPanel; | |||
13 | class wxBookCtrlEvent; | 13 | class wxBookCtrlEvent; |
14 | class wxNotebook; | 14 | class wxNotebook; |
15 | 15 | ||
16 | class ApConnectEvent : public wxEvent { | ||
17 | public: | ||
18 | ApConnectEvent(wxEventType eventType, int winid, std::string server, | ||
19 | std::string user, std::string pass) | ||
20 | : wxEvent(winid, eventType), | ||
21 | ap_server_(std::move(server)), | ||
22 | ap_user_(std::move(user)), | ||
23 | ap_pass_(std::move(pass)) {} | ||
24 | |||
25 | const std::string &GetServer() const { return ap_server_; } | ||
26 | |||
27 | const std::string &GetUser() const { return ap_user_; } | ||
28 | |||
29 | const std::string &GetPass() const { return ap_pass_; } | ||
30 | |||
31 | virtual wxEvent *Clone() const { return new ApConnectEvent(*this); } | ||
32 | |||
33 | private: | ||
34 | std::string ap_server_; | ||
35 | std::string ap_user_; | ||
36 | std::string ap_pass_; | ||
37 | }; | ||
38 | |||
16 | wxDECLARE_EVENT(STATE_RESET, wxCommandEvent); | 39 | wxDECLARE_EVENT(STATE_RESET, wxCommandEvent); |
17 | wxDECLARE_EVENT(STATE_CHANGED, wxCommandEvent); | 40 | wxDECLARE_EVENT(STATE_CHANGED, wxCommandEvent); |
18 | wxDECLARE_EVENT(STATUS_CHANGED, wxCommandEvent); | 41 | wxDECLARE_EVENT(STATUS_CHANGED, wxCommandEvent); |
19 | wxDECLARE_EVENT(REDRAW_POSITION, wxCommandEvent); | 42 | wxDECLARE_EVENT(REDRAW_POSITION, wxCommandEvent); |
43 | wxDECLARE_EVENT(CONNECT_TO_AP, ApConnectEvent); | ||
20 | 44 | ||
21 | enum UpdateIndicatorsMode { | 45 | enum UpdateIndicatorsMode { |
22 | kUPDATE_ALL_INDICATORS = 0, | 46 | kUPDATE_ALL_INDICATORS = 0, |
@@ -27,6 +51,7 @@ class TrackerFrame : public wxFrame { | |||
27 | public: | 51 | public: |
28 | TrackerFrame(); | 52 | TrackerFrame(); |
29 | 53 | ||
54 | void ConnectToAp(std::string server, std::string user, std::string pass); | ||
30 | void UpdateStatusMessage(); | 55 | void UpdateStatusMessage(); |
31 | 56 | ||
32 | void ResetIndicators(); | 57 | void ResetIndicators(); |
@@ -36,7 +61,8 @@ class TrackerFrame : public wxFrame { | |||
36 | private: | 61 | private: |
37 | void OnExit(wxCommandEvent &event); | 62 | void OnExit(wxCommandEvent &event); |
38 | void OnAbout(wxCommandEvent &event); | 63 | void OnAbout(wxCommandEvent &event); |
39 | void OnConnect(wxCommandEvent &event); | 64 | void OnApConnect(wxCommandEvent &event); |
65 | void OnIpcConnect(wxCommandEvent &event); | ||
40 | void OnSettings(wxCommandEvent &event); | 66 | void OnSettings(wxCommandEvent &event); |
41 | void OnCheckForUpdates(wxCommandEvent &event); | 67 | void OnCheckForUpdates(wxCommandEvent &event); |
42 | void OnZoomIn(wxCommandEvent &event); | 68 | void OnZoomIn(wxCommandEvent &event); |
@@ -48,6 +74,7 @@ class TrackerFrame : public wxFrame { | |||
48 | void OnStateChanged(wxCommandEvent &event); | 74 | void OnStateChanged(wxCommandEvent &event); |
49 | void OnStatusChanged(wxCommandEvent &event); | 75 | void OnStatusChanged(wxCommandEvent &event); |
50 | void OnRedrawPosition(wxCommandEvent &event); | 76 | void OnRedrawPosition(wxCommandEvent &event); |
77 | void OnConnectToAp(ApConnectEvent &event); | ||
51 | 78 | ||
52 | void CheckForUpdates(bool manual); | 79 | void CheckForUpdates(bool manual); |
53 | 80 | ||