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/phonebook.h | |
download | sms-utils-14fb44b17123b27e562379f51b75ee889982688d.tar.gz sms-utils-14fb44b17123b27e562379f51b75ee889982688d.tar.bz2 sms-utils-14fb44b17123b27e562379f51b75ee889982688d.zip |
initial commit
Diffstat (limited to 'src/phonebook.h')
-rw-r--r-- | src/phonebook.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/phonebook.h b/src/phonebook.h new file mode 100644 index 0000000..3b4cf79 --- /dev/null +++ b/src/phonebook.h @@ -0,0 +1,41 @@ +#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 */ |