diff options
author | James Maki <jmaki@multitech.com> | 2010-04-23 11:58:20 -0500 |
---|---|---|
committer | James Maki <jmaki@multitech.com> | 2010-04-23 11:58:20 -0500 |
commit | 14fb44b17123b27e562379f51b75ee889982688d (patch) | |
tree | 3c2344f5c42396ab839638ee12f7c2f66a2656cb /src/sms_utils.h | |
download | sms-utils-14fb44b17123b27e562379f51b75ee889982688d.tar.gz sms-utils-14fb44b17123b27e562379f51b75ee889982688d.tar.bz2 sms-utils-14fb44b17123b27e562379f51b75ee889982688d.zip |
initial commit
Diffstat (limited to 'src/sms_utils.h')
-rw-r--r-- | src/sms_utils.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/sms_utils.h b/src/sms_utils.h new file mode 100644 index 0000000..01d0e1f --- /dev/null +++ b/src/sms_utils.h @@ -0,0 +1,57 @@ +#ifndef __SMS_UTILS_H +#define __SMS_UTILS_H + +#include <stdarg.h> + +#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_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 */ |