#ifndef __PHONEBOOK_H #define __PHONEBOOK_H #include "atcmd.h" #include "list.h" #define PHONEBOOK_ADDR_SIZE 64 #define PHONEBOOK_TEXT_SIZE 64 struct phonebook_entry { int index; char addr[PHONEBOOK_ADDR_SIZE]; int type; char name[PHONEBOOK_TEXT_SIZE]; struct list_head list; }; void phonebook_entry_free(struct phonebook_entry *entry); struct phonebook_entry *phonebook_entry_alloc(void); struct phonebook_entry *phonebook_find_by_name(struct list_head *head, const char *name); struct phonebook_entry *phonebook_search_names_i(struct list_head *head, const char *name); struct phonebook_list_info { struct phonebook_store store; char store_select[STORE_NAME_SIZE]; int state; int nr_lines; int nr_entries; struct list_head entry_list; }; void phonebook_list_free(struct phonebook_list_info *list_info); int phonebook_list_get(int fd, struct phonebook_list_info *list_info); int print_phonebook_list(int fd, const char *store); #endif /* ~__PHONEBOOK_H */