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

Diff of /smsdaemon/ModemTransceiver.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 26 by torben, Mon Jun 9 18:15:53 2008 UTC revision 44 by torben, Wed Jun 11 08:25:34 2008 UTC
# Line 11  Line 11 
11  #include "SerialPort.h"  #include "SerialPort.h"
12  #include "Sms.h"  #include "Sms.h"
13    
14  class GsmModem  
15    class IGsmModem
16    {
17    public:
18            virtual void SendSms(std::string to, std::string message) = 0;
19            virtual ~IGsmModem() {}
20    };
21    
22    class GsmModem : public IGsmModem
23  {  {
24  public:  public:
25          GsmModem(SerialPort& serialport);          GsmModem(SerialPort& serialport);
26          virtual ~GsmModem() {}          virtual ~GsmModem() {}
27    
28    
29          void SendSms(std::string to, std::string message);          virtual void SendSms(std::string to, std::string message);
30          std::vector<SMS> ReadSms(bool readAll=false);          std::vector<SMS> ReadSms(bool readAll=false);
31          void DeleteSms(std::string smsIndex);          void DeleteSms(std::string smsIndex);
32          int DeleteAllSms();          int DeleteAllSms();
# Line 31  private: Line 39  private:
39          SerialPort& m_port;          SerialPort& m_port;
40  };  };
41    
42    class DebugGsmModem : public IGsmModem
43    {
44    public:
45            virtual void SendSms(std::string to, std::string message)
46                    {_to=to; _message = message;}
47    
48            std::string GetTo() {return _to;}
49            std::string GetMessage() {return _message;}
50    private:
51            std::string _to;
52            std::string _message;
53    };
54    
55  #endif // __GSMMODEM_H__  #endif // __GSMMODEM_H__

Legend:
Removed from v.26  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.20