forked from adiesner/GarminPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedge705Device.h
100 lines (71 loc) · 2.1 KB
/
edge705Device.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef EDGE705DEVICE_H_INCLUDED
#define EDGE705DEVICE_H_INCLUDED
#define TIXML_USE_TICPP
#include "ticpp.h"
#include <string>
#include "messageBox.h"
#include "garminFilebasedDevice.h"
using namespace std;
class MessageBox;
class Edge705Device : public GarminFilebasedDevice
{
public:
Edge705Device();
virtual ~Edge705Device();
/**
* Starts a thread that tries to read the fitness data from a garmin device
* @return int returns 1 if successful otherwise 0
*/
int startReadFitnessData();
/**
* Returns the status of reading fitness data from the device
* @return int 0 = idle 1 = working 2 = waiting 3 = finished
*/
int finishReadFitnessData();
/**
* Gets the fitness data xml
* @return xml containing fitness data read from garmin device
*/
string getFitnessData();
/**
* Starts reading the fitness data without points
* @return int returns 1 if successful otherwise 0
*/
virtual int startReadFITDirectory();
/**
* Starts reading the fitness data without points
* @return int returns 1 if successful otherwise 0
*/
virtual int startReadFitnessDirectory();
/**
* Checks if the read of the fitness directory finished
* @return 0 = idle 1 = working 2 = waiting 3 = finished
*/
virtual int finishReadFitnessDirectory();
/**
* Cancels the read of the fitness data
*/
virtual void cancelReadFitnessData();
virtual int startReadFitnessDetail(string id);
virtual int finishReadFitnessDetail();
virtual void cancelReadFitnessDetail();
protected:
virtual void doWork();
void readFitnessDataFromDevice(bool readTrackData, string fitnessDetailId);
/**
* Directory where this device stores its fitness data
*/
string fitnessDirectory;
string fitnessFileExtension;
virtual void setPathesFromConfiguration();
private:
/**
* Stores the fitnessData which was read from the device
*/
string fitnessDataTcdXml;
/**
* Stores the id of the track that should be read
*/
string readFitnessDetailId;
};
#endif // EDGE705DEVICE_H_INCLUDED