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

Annotation of /smsdaemon/ModemTransceiver.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 26 - (hide annotations) (download)
Mon Jun 9 18:15:53 2008 UTC (15 years, 11 months ago) by torben
Original Path: smsdaemon/GsmModem.h
File MIME type: text/plain
File size: 605 byte(s)
Added first basic edition of smsdaemon.

So far sending & receiving sms works and a basic sample plugin is implemented.

1 torben 26 #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