From 1584a74a4acdfb17aab0d6a2b13b18a7799aa37d Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 2 Sep 2006 10:32:06 +0000 Subject: first compiling (unfinished, not-working) version of userspace gsm infrastructure git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@40 99fdad57-331a-0410-800a-d7fa5415bdb3 --- include/libgsmd/phonebook.h | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 include/libgsmd/phonebook.h (limited to 'include/libgsmd/phonebook.h') diff --git a/include/libgsmd/phonebook.h b/include/libgsmd/phonebook.h new file mode 100644 index 0000000..92c3a7f --- /dev/null +++ b/include/libgsmd/phonebook.h @@ -0,0 +1,51 @@ +#ifndef _LIBGSMD_PBOOK_H +#define _LIBGSMD_PBOOK_H + +#include + +/* Phonebook */ + +/* Chapter 8.11 */ +enum lgsm_pbook_type { + LGSM_PB_ME_DIALLED = 1, + LGSM_PB_SIM_EMERGENCY = 2, + LGSM_PB_SIM_FIXDIAL = 3, + LGSM_PB_SIM_DIALLED = 4, + LGSM_PB_ME_MISSED = 5, + LGSM_PB_ME_PHONEBOOK = 6, + LGSM_PB_COMB_PHONEBOOK = 7, + LGSM_PB_SIM_OWN_NUMBERS = 8, + LGSM_PB_ME_RECEIVED = 9, + LGSM_PB_SIM_PHONEBOOK = 10, + LGSM_PB_TA_PHONEBOOK = 11, +}; + +/* Get a bitmask of supported phonebook types */ +extern int lgsm_pb_get_types(struct lgsm_handle *lh, u_int32 *typemask); + +/* Get a range of supported indexes in given phonebook type, Chapter 8.12 */ +extern int lgsm_pb_get_range(struct lgsm_handle *lh, + enum lgsm_pbook_type type, + u_int32_t *from, u_int32_t *to, + u_int32_t *nlength, *u_int32_t tlength); + +#define LGSM_PB_TEXT_MAXLEN 31 + +struct lgsm_pb_entry { + struct lgsm_pb_entry *next; + enum lgsm_pbook_type type; + u_int32_t index; + char text[LGSM_PB_TEXT_MAXLEN+1]; +}; + +/* Get a specific phonebook entry and store it to 'pb' + * pb' is caller-allocated */ +extern int lgsm_pb_get_entry(struct lgsm_handle *lh, + struct lgsm_pb_entry *pb); + +/* Store a specific phonebook entry 'pb' into phone */ +extern int lgsm_pb_set_entry(struct lgsm_handle *lh, + struct lgsm_pb_entry *pb); + + +#endif -- cgit v1.2.3