1 #pragma once
2 #include <string>
3 
4 class CVehicleApi
5 {
6 public:
7 	enum eCommandType {
8 		Climate_Off,
9 		Climate_On,
10 		Climate_Defrost,
11 		Climate_Defrost_Off,
12 		Charge_Start,
13 		Charge_Stop,
14 		Wake_Up
15 	};
16 
17 	struct tLocationData {
18 		double latitude;
19 		double longitude;
20 		int speed;
21 		bool is_driving;
22 	};
23 
24 	struct tChargeData {
25 		float battery_level;
26 		bool is_connected;
27 		bool is_charging;
28 		std::string status_string;
29 	};
30 
31 	struct tClimateData {
32 		float inside_temp;
33 		float outside_temp;
34 		bool is_climate_on;
35 		bool is_defrost_on;
36 	};
37 
38 	struct tAllCarData {
39 		tLocationData location;
40 		tChargeData charge;
41 		tClimateData climate;
42 	};
43 
44 	virtual bool Login() = 0;
45 	virtual bool RefreshLogin() = 0;
46 	virtual bool SendCommand(eCommandType command) = 0;
47 	virtual bool IsAwake() = 0;
48 	virtual bool GetAllData(tAllCarData& data) = 0;
49 	virtual bool GetLocationData(tLocationData& data) = 0;
50 	virtual bool GetChargeData(tChargeData& data) = 0;
51 	virtual bool GetClimateData(tClimateData& data) = 0;
52 
53 	virtual int GetSleepInterval() = 0;
54 
55 	std::string m_carname;
56 };
57