7 |
{ |
{ |
8 |
public: |
public: |
9 |
SMS(); |
SMS(); |
10 |
SMS(std::string _sender, std::string _message, std::string _timestamp=""); |
SMS(std::string index, std::string _sender, std::string _message, std::string _timestamp=""); |
11 |
|
|
12 |
//decode an CMGF=1 text string |
std::string ExtractCommand(); |
13 |
static SMS FromRawString(const std::string& input); |
std::string ExtractParameters(); |
14 |
|
|
15 |
|
|
16 |
|
void SetIndex(std::string i) |
17 |
|
{ |
18 |
|
sms_index=i; |
19 |
|
} |
20 |
|
void SetSender(std::string s) |
21 |
|
{ |
22 |
|
sender=s; |
23 |
|
} |
24 |
|
void SetMessage(std::string m) |
25 |
|
{ |
26 |
|
message=m; |
27 |
|
} |
28 |
|
void SetTimestamp(std::string t) |
29 |
|
{ |
30 |
|
timestamp=t; |
31 |
|
} |
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
std::string GetIndex() |
36 |
|
{ |
37 |
|
return sms_index; |
38 |
|
} |
39 |
|
std::string GetSender() |
40 |
|
{ |
41 |
|
return sender; |
42 |
|
} |
43 |
|
std::string GetMessage() |
44 |
|
{ |
45 |
|
return message; |
46 |
|
} |
47 |
|
std::string GetTimestamp() |
48 |
|
{ |
49 |
|
return timestamp; |
50 |
|
} |
51 |
|
|
52 |
|
private: |
53 |
std::string sms_index; |
std::string sms_index; |
54 |
std::string sender; |
std::string sender; |
55 |
std::string message; |
std::string message; |
57 |
}; |
}; |
58 |
|
|
59 |
|
|
|
std::string GetSmsCommand(SMS& sms); |
|
|
std::string GetSmsData(SMS& sms); |
|
60 |
|
|
61 |
#endif // __SMS_H__ |
#endif // __SMS_H__ |