--- smsdaemon/GsmModem.h 2008/06/09 18:15:53 26 +++ smsdaemon/GsmModem.h 2008/06/11 08:25:34 44 @@ -11,14 +11,22 @@ #include "SerialPort.h" #include "Sms.h" -class GsmModem + +class IGsmModem +{ +public: + virtual void SendSms(std::string to, std::string message) = 0; + virtual ~IGsmModem() {} +}; + +class GsmModem : public IGsmModem { public: GsmModem(SerialPort& serialport); virtual ~GsmModem() {} - void SendSms(std::string to, std::string message); + virtual void SendSms(std::string to, std::string message); std::vector ReadSms(bool readAll=false); void DeleteSms(std::string smsIndex); int DeleteAllSms(); @@ -31,5 +39,17 @@ SerialPort& m_port; }; +class DebugGsmModem : public IGsmModem +{ +public: + virtual void SendSms(std::string to, std::string message) + {_to=to; _message = message;} + + std::string GetTo() {return _to;} + std::string GetMessage() {return _message;} +private: + std::string _to; + std::string _message; +}; #endif // __GSMMODEM_H__