Parent Directory | Revision Log
Added first basic edition of smsdaemon. So far sending & receiving sms works and a basic sample plugin is implemented.
1 | #ifndef __GSMMODEM_H__ |
2 | #define __GSMMODEM_H__ |
3 | |
4 | /* using http://sourceforge.net/projects/libserial/ |
5 | */ |
6 | |
7 | |
8 | #include <string> |
9 | #include <vector> |
10 | |
11 | #include "SerialPort.h" |
12 | #include "Sms.h" |
13 | |
14 | class GsmModem |
15 | { |
16 | public: |
17 | GsmModem(SerialPort& serialport); |
18 | virtual ~GsmModem() {} |
19 | |
20 | |
21 | void SendSms(std::string to, std::string message); |
22 | std::vector<SMS> ReadSms(bool readAll=false); |
23 | void DeleteSms(std::string smsIndex); |
24 | int DeleteAllSms(); |
25 | private: |
26 | void Init(); |
27 | std::string GetResponse(); |
28 | std::string Command(std::string command, std::string term = "OK\r\n"); |
29 | |
30 | |
31 | SerialPort& m_port; |
32 | }; |
33 | |
34 | |
35 | #endif // __GSMMODEM_H__ |
ViewVC Help | |
Powered by ViewVC 1.1.20 |