--- smsdaemon/SmsPdu.h 2008/06/11 21:18:04 60 +++ smsdaemon/SmsPdu.h 2008/12/11 22:32:58 176 @@ -1,22 +1,46 @@ - +#ifndef __SMSPDU_H__ +#define __SMSPDU_H__ #include #include +#include "Sms.h" + struct PduInfo { std::string pdu; int len; }; + +struct SmsPart +{ + std::string message; + std::string sender; + short group,count,id; +}; + namespace SmsPdu { - std::vector BcdEncode(std::string input); +//public section: + std::vector CreateSmsPdu(std::string to, std::string message, bool allowMultipart); - std::string HexformatVector(std::vector vec); + SMS ParseSmsPdu(std::string pdu); - std::vector Encode7to8bit(std::string str); +//private section: + + SmsPart ParseSmsPduWorker(std::string pdu); - std::vector CreateSmsPdu(std::string to, std::string message, bool allowMultipart); + std::string EncodePhonenr(std::string input); + std::string DecodePhonenr(std::string input); + + std::string HexformatVector(std::vector vec); + std::vector HexDecodeString(std::string str); + + std::vector Encode7to8bit(std::string str, int shift_start); + std::string Decode8to7bit( std::vector input, int shift_start ); } + +#endif // __SMSPDU_H__ +