diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gsmd/usock.h | 11 | ||||
-rw-r--r-- | include/libgsmd/phonebook.h | 12 |
2 files changed, 18 insertions, 5 deletions
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 <gsmd/event.h> +#include <common/linux_list.h> #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 <common/linux_list.h> - #include <gsmd/usock.h> #include <gsmd/gsmd.h> diff --git a/include/libgsmd/phonebook.h b/include/libgsmd/phonebook.h index a08d891..badb76f 100644 --- a/include/libgsmd/phonebook.h +++ b/include/libgsmd/phonebook.h @@ -78,6 +78,12 @@ extern int lgsm_pb_get_entry(struct lgsm_handle *lh, extern int lgsm_pb_set_entry(struct lgsm_handle *lh, struct lgsm_pb_entry *pb); +/* List of supported phonebook memory storage */ +extern int lgsm_pb_list_storage(struct lgsm_handle *lh); + +/* Select phonebook memory storage */ +extern int lgsm_pb_set_storage(struct lgsm_handle *lh, char *storage); + /* Find phonebook entires which alphanumeric filed start * with string <findtext> */ extern int lgsm_pb_find_entry(struct lgsm_handle *lh, @@ -87,14 +93,14 @@ extern int lgsm_pb_find_entry(struct lgsm_handle *lh, extern int lgsm_pb_read_entry(struct lgsm_handle *lh, int index); /* Read phonebook entries in location number range */ -extern int lgsm_pb_read_entryies(struct lgsm_handle *lh, +extern int lgsm_pb_read_entries(struct lgsm_handle *lh, const struct lgsm_phonebook_readrg *pb_readrg); /* Delete phonebook entry in location index */ -extern int lgsmd_pb_del_entry(struct lgsm_handle *lh, int index); +extern int lgsm_pb_del_entry(struct lgsm_handle *lh, int index); /* Write phonebook entry in location */ -extern int lgsmd_pb_write_entry(struct lgsm_handle *lh, +extern int lgsm_pb_write_entry(struct lgsm_handle *lh, const struct lgsm_phonebook *pb); /* Get the location range/nlength/tlength supported */ |