--- smsdaemon/Sms.h 2008/06/13 06:38:43 69 +++ smsdaemon/Sms.h 2008/12/18 06:53:29 196 @@ -7,11 +7,49 @@ { public: SMS(); - SMS(std::string _sender, std::string _message, std::string _timestamp=""); + SMS(std::string index, std::string _sender, std::string _message, std::string _timestamp=""); - //decode an CMGF=1 text string - static SMS FromRawString(const std::string& input); + std::string ExtractCommand(); + std::string ExtractParameters(); + + void SetIndex(std::string i) + { + sms_index=i; + } + void SetSender(std::string s) + { + sender=s; + } + void SetMessage(std::string m) + { + message=m; + } + void SetTimestamp(std::string t) + { + timestamp=t; + } + + + + std::string GetIndex() + { + return sms_index; + } + std::string GetSender() + { + return sender; + } + std::string GetMessage() + { + return message; + } + std::string GetTimestamp() + { + return timestamp; + } + +private: std::string sms_index; std::string sender; std::string message; @@ -19,7 +57,5 @@ }; -std::string GetSmsCommand(SMS& sms); -std::string GetSmsData(SMS& sms); #endif // __SMS_H__