--- smsdaemon/Sms.h 2008/06/13 10:10:06 75 +++ smsdaemon/Sms.h 2008/12/07 15:51:02 142 @@ -7,12 +7,25 @@ { 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); - static SMS FromPduString(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; @@ -20,7 +33,5 @@ }; -std::string GetSmsCommand(SMS& sms); -std::string GetSmsData(SMS& sms); #endif // __SMS_H__