--- smsdaemon/GsmModem.h 2008/06/11 19:42:24 59 +++ smsdaemon/GsmModem.h 2008/06/16 10:21:02 90 @@ -4,6 +4,7 @@ /* using http://sourceforge.net/projects/libserial/ */ +#include "IGsmModem.h" #include #include @@ -12,12 +13,6 @@ class SerialPort; -class IGsmModem -{ -public: - virtual void SendSms(std::string to, std::string message) = 0; - virtual ~IGsmModem() {} -}; class GsmModem : public IGsmModem { @@ -27,7 +22,7 @@ void Init(); - virtual void SendSms(std::string to, std::string message); + virtual void SendSms(std::string to, std::string message, bool allowMultipart); void SendSmsPdu(std::string pdu, int len); std::vector ReadSms(bool readAll=false); @@ -44,14 +39,20 @@ class DebugGsmModem : public IGsmModem { public: - virtual void SendSms(std::string to, std::string message) - {_to=to; _message = message;} + DebugGsmModem() : _print(false) {} + DebugGsmModem(bool print) : _print(print) {} + + + virtual void SendSms(std::string to, std::string message, bool allowMultipart); std::string GetTo() {return _to;} std::string GetMessage() {return _message;} + bool GetMultipart() {return _multipart;} private: std::string _to; std::string _message; + bool _multipart; + bool _print; }; #endif // __GSMMODEM_H__