From c5eec553984f937b1f1682378ab7096b7f6b3933 Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 17 Aug 2007 08:32:50 +0000 Subject: SIM Phonebook access implementation. This patch adds primitive-but-working support for SIM phonebook access, including phonebook memory storage and entry read/write/delete. Also, libgsmd-tools shell is modified to perform listing actions. API changes: lgsm_pb_read_entryies -> lgsm_pb_read_entries lgsm_pb_list_storage (new): List of supported phonebook memory storage. lgsm_pb_set_storage (new); Select phonebook memory storage. lgsmd_pb_del_entry -> lgsm_pb_del_entry lgsmd_pb_write_entry -> lgsm_pb_write_entry git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2726 99fdad57-331a-0410-800a-d7fa5415bdb3 --- include/gsmd/usock.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/gsmd') diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 0f9f05c..3472189 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -2,6 +2,7 @@ #define _GSMD_USOCK_H #include +#include #define GSMD_UNIX_SOCKET "\0gsmd" //#define GSMD_UNIX_SOCKET_TYPE SOCK_SEQPACKET @@ -192,6 +193,8 @@ enum gsmd_msg_phonebook { GSMD_PHONEBOOK_WRITE = 4, GSMD_PHONEBOOK_DELETE = 5, GSMD_PHONEBOOK_GET_SUPPORT = 6, + GSMD_PHONEBOOK_LIST_STORAGE = 7, + GSMD_PHONEBOOK_SET_STORAGE = 8, }; /* Type-of-Address, Numbering-Plan-Identification field, GSM 03.40, 9.1.2.5 */ @@ -423,6 +426,7 @@ struct gsmd_phonebook_readrg { #define GSMD_PB_NUMB_MAXLEN 44 #define GSMD_PB_TEXT_MAXLEN 14 struct gsmd_phonebook { + struct llist_head list; u_int8_t index; char numb[GSMD_PB_NUMB_MAXLEN+1]; u_int8_t type; @@ -469,6 +473,11 @@ struct gsmd_msg_prefoper { char opname_longalpha[16]; }; +struct gsmd_phonebook_storage { + struct llist_head list; + char storage[3]; +} __attribute__ ((packed)); + struct gsmd_msg_hdr { u_int8_t version; u_int8_t msg_type; @@ -481,8 +490,6 @@ struct gsmd_msg_hdr { #ifdef __GSMD__ -#include - #include #include -- cgit v1.2.3