diff options
Diffstat (limited to 'ap_state.h')
-rw-r--r-- | ap_state.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ap_state.h b/ap_state.h new file mode 100644 index 0000000..5f9e952 --- /dev/null +++ b/ap_state.h | |||
@@ -0,0 +1,41 @@ | |||
1 | #ifndef AP_STATE_H_664A4180 | ||
2 | #define AP_STATE_H_664A4180 | ||
3 | |||
4 | #include <apclient.hpp> | ||
5 | #include <memory> | ||
6 | #include <mutex> | ||
7 | #include <set> | ||
8 | #include <string> | ||
9 | |||
10 | #include "game_data.h" | ||
11 | #include "tracker_frame.h" | ||
12 | |||
13 | class APState { | ||
14 | public: | ||
15 | APState(); | ||
16 | |||
17 | void SetTrackerFrame(TrackerFrame* tracker_frame) { | ||
18 | tracker_frame_ = tracker_frame; | ||
19 | } | ||
20 | |||
21 | void Connect(std::string server, std::string player, std::string password); | ||
22 | |||
23 | private: | ||
24 | TrackerFrame* tracker_frame_; | ||
25 | |||
26 | std::unique_ptr<APClient> apclient_; | ||
27 | bool client_active_ = false; | ||
28 | std::mutex client_mutex_; | ||
29 | |||
30 | std::set<int> inventory_; | ||
31 | std::set<int> checked_locations_; | ||
32 | |||
33 | std::map<int, int> ap_id_by_location_id_; | ||
34 | std::map<int, int> ap_id_by_door_id_; | ||
35 | std::map<int, int> ap_id_by_door_group_id_; | ||
36 | std::map<LingoColor, int> ap_id_by_color_; | ||
37 | }; | ||
38 | |||
39 | APState& GetAPState(); | ||
40 | |||
41 | #endif /* end of include guard: AP_STATE_H_664A4180 */ | ||