1 |
torben |
148 |
#ifndef __SMSPDU_H__ |
2 |
|
|
#define __SMSPDU_H__ |
3 |
torben |
59 |
|
4 |
|
|
#include <string> |
5 |
|
|
#include <vector> |
6 |
|
|
|
7 |
torben |
69 |
#include "Sms.h" |
8 |
|
|
|
9 |
torben |
60 |
struct PduInfo |
10 |
|
|
{ |
11 |
|
|
std::string pdu; |
12 |
|
|
int len; |
13 |
|
|
}; |
14 |
|
|
|
15 |
torben |
176 |
|
16 |
|
|
struct SmsPart |
17 |
|
|
{ |
18 |
|
|
std::string message; |
19 |
|
|
std::string sender; |
20 |
|
|
short group,count,id; |
21 |
|
|
}; |
22 |
|
|
|
23 |
torben |
59 |
namespace SmsPdu |
24 |
|
|
{ |
25 |
torben |
176 |
//public section: |
26 |
|
|
std::vector<PduInfo> CreateSmsPdu(std::string to, std::string message, bool allowMultipart); |
27 |
torben |
59 |
|
28 |
torben |
176 |
SMS ParseSmsPdu(std::string pdu); |
29 |
|
|
|
30 |
|
|
//private section: |
31 |
|
|
|
32 |
|
|
SmsPart ParseSmsPduWorker(std::string pdu); |
33 |
|
|
|
34 |
torben |
68 |
std::string EncodePhonenr(std::string input); |
35 |
|
|
std::string DecodePhonenr(std::string input); |
36 |
|
|
|
37 |
torben |
59 |
std::string HexformatVector(std::vector<unsigned char> vec); |
38 |
torben |
69 |
std::vector<unsigned char> HexDecodeString(std::string str); |
39 |
torben |
59 |
|
40 |
torben |
73 |
std::vector<unsigned char> Encode7to8bit(std::string str, int shift_start); |
41 |
torben |
70 |
std::string Decode8to7bit( std::vector<unsigned char> input, int shift_start ); |
42 |
torben |
59 |
|
43 |
|
|
} |
44 |
torben |
148 |
|
45 |
|
|
#endif // __SMSPDU_H__ |