about summary refs log tree commit diff stats
path: root/contact_list.h
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-03-20 00:05:33 +0000
committerJames Booth <boothj5@gmail.com>2012-03-20 00:05:33 +0000
commitdab37236a2e51b8ef7e6181df302adef9eeba199 (patch)
tree96dd8e07d38e9e3133b3272a3678e6aea89753b5 /contact_list.h
parent9a3a0840e358e1f9d6065ba034688d87a8aa0283 (diff)
downloadprofani-tty-dab37236a2e51b8ef7e6181df302adef9eeba199.tar.gz
Rewrote copying of contact list for /who
Diffstat (limited to 'contact_list.h')
-rw-r--r--contact_list.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/contact_list.h b/contact_list.h
index e6653757..ba44738e 100644
--- a/contact_list.h
+++ b/contact_list.h
@@ -23,23 +23,25 @@
 #ifndef CONTACT_LIST_H
 #define CONTACT_LIST_H
 
-typedef struct _contact {
+struct contact_t {
     char *name;
     char *show;
     char *status;
-} contact_t;
+};
 
-typedef struct _contact_list_t {
-    contact_t **contacts;
-    int size;
-} contact_list_t;
+struct contact_node_t {
+    struct contact_t *contact;    
+    struct contact_node_t *next;
+};
 
 void contact_list_clear(void);
 void reset_search_attempts(void);
 int contact_list_add(const char * const name, const char * const show,
     const char * const status);
 int contact_list_remove(const char * const name);
-contact_list_t * get_contact_list(void);
-char * find_contact(const char * const search_str);
+struct contact_node_t * get_contact_list(void);
+char * find_contact(char *search_str);
+int get_size(struct contact_node_t *list);
+void destroy_list(struct contact_node_t *list);
 
 #endif