#ifndef __SMS_UTILS_H #define __SMS_UTILS_H #include #include "pdu.h" #include "list.h" #include "phonebook.h" #ifdef __SMS_UTILS_C #define SMS_UTILS_EXTERN #else #define SMS_UTILS_EXTERN extern #endif #define SMS_PDU_MODE 0 #define SMS_TEXT_MODE 1 #define SMS_FORMAT_3GPP 1 #define SMS_FORMAT_3GPP2 0 #define SMS_ADDR_UNSPEC 0x00 #define SMS_ADDR_LOCAL 0x81 #define SMS_ADDR_GLOBAL 0x91 #define SMS_ADDR_NATIONAL 0xA1 #define SMS_ADDR_TEXT 0xD1 #define SMS_ADDR_CMD 0xFF enum { SMS_MSG_REC_UNREAD = 0, SMS_MSG_REC_READ = 1, SMS_MSG_STO_UNSENT = 2, SMS_MSG_STO_SENT = 3, SMS_MSG_ALL = 4, }; enum { SMS_DELETE_INDEX = 0, SMS_DELETE_READ = 1, SMS_DELETE_READSENT = 2, SMS_DELETE_READSTO = 3, SMS_DELETE_ALL = 4, }; int msg_status_name_to_value(const char *name); const char *msg_status_value_to_name(int value); struct sms_msg { int index; int status; char name[PHONEBOOK_TEXT_SIZE]; int len; struct pdu_info pdu; struct list_head list; }; void sms_msg_free(struct sms_msg *msg); struct sms_msg *sms_msg_alloc(void); #endif /* ~__SMS_UTILS_H */