15 |
class IGsmModem |
class IGsmModem |
16 |
{ |
{ |
17 |
public: |
public: |
18 |
virtual void SendSms(std::string to, std::string message) = 0; |
virtual void SendSms(std::string to, std::string message, bool allowMultipart) = 0; |
19 |
virtual ~IGsmModem() {} |
virtual ~IGsmModem() {} |
20 |
}; |
}; |
21 |
|
|
27 |
|
|
28 |
void Init(); |
void Init(); |
29 |
|
|
30 |
virtual void SendSms(std::string to, std::string message); |
virtual void SendSms(std::string to, std::string message, bool allowMultipart); |
31 |
void SendSmsPdu(std::string pdu, int len); |
void SendSmsPdu(std::string pdu, int len); |
32 |
|
|
33 |
std::vector<SMS> ReadSms(bool readAll=false); |
std::vector<SMS> ReadSms(bool readAll=false); |
44 |
class DebugGsmModem : public IGsmModem |
class DebugGsmModem : public IGsmModem |
45 |
{ |
{ |
46 |
public: |
public: |
47 |
virtual void SendSms(std::string to, std::string message) |
DebugGsmModem() : _print(false) {} |
48 |
{_to=to; _message = message;} |
DebugGsmModem(bool print) : _print(print) {} |
49 |
|
|
50 |
|
|
51 |
|
virtual void SendSms(std::string to, std::string message, bool allowMultipart); |
52 |
|
|
53 |
std::string GetTo() {return _to;} |
std::string GetTo() {return _to;} |
54 |
std::string GetMessage() {return _message;} |
std::string GetMessage() {return _message;} |
55 |
|
bool GetMultipart() {return _multipart;} |
56 |
private: |
private: |
57 |
std::string _to; |
std::string _to; |
58 |
std::string _message; |
std::string _message; |
59 |
|
bool _multipart; |
60 |
|
bool _print; |
61 |
}; |
}; |
62 |
|
|
63 |
#endif // __GSMMODEM_H__ |
#endif // __GSMMODEM_H__ |