/[projects]/smsdaemon/ModemTransceiver.h
ViewVC logotype

Contents of /smsdaemon/ModemTransceiver.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 196 - (show annotations) (download)
Thu Dec 18 06:53:29 2008 UTC (15 years, 5 months ago) by torben
File MIME type: text/plain
File size: 935 byte(s)
Make pretty

astyle -t -b -N

1 #ifndef __MODEMTRANSCEIVER_H__
2 #define __MODEMTRANSCEIVER_H__
3
4
5
6 #include "ISmsTransceiver.h"
7
8 #include <string>
9 #include <vector>
10
11 #include "Sms.h"
12
13 class SerialPort;
14
15
16 class ModemTransceiver : public ISmsTransceiver
17 {
18 public:
19 ModemTransceiver(SerialPort& serialport);
20 virtual ~ModemTransceiver() {}
21
22 void Init();
23
24 virtual void SendSms(std::string to, std::string message, bool allowMultipart);
25 void SendSmsPdu(std::string pdu, int len);
26
27 virtual std::vector<SMS> ReadSms(bool readAll=false);
28
29 virtual void DeleteSms(std::string smsIndex);
30 virtual int DeleteAllSms();
31 private:
32 std::string GetResponse();
33 std::string Command(std::string command, std::string term = "OK\r\n");
34
35 //decode an CMGF=1 text string
36 SMS FromRawString(const std::string& input);
37 SMS FromPduString(const std::string& input);
38
39 void HandlePincode();
40 void WaitForSimcard();
41
42 bool _timeout;
43 SerialPort& m_port;
44 };
45
46
47 #endif // __MODEMTRANSCEIVER_H__

Properties

Name Value
svn:mergeinfo

  ViewVC Help
Powered by ViewVC 1.1.20