diff options
Diffstat (limited to 'contactList.h')
-rw-r--r-- | contactList.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/contactList.h b/contactList.h new file mode 100644 index 0000000..12d69ed --- /dev/null +++ b/contactList.h @@ -0,0 +1,58 @@ +#ifndef CONTACT_LIST_H +#define CONTACT_LIST_H + +#include <ncurses.h> +#include <stdio.h> +#include "basic_curses.h" + +typedef struct contact { + char name[100]; + char display_name[100]; + char number[50]; + int hasNewMessage; +} contact ; + + + + +// Params: The CSV filename (separator ';', unexcaped string, so ';' is forbiden in value) +// Return: 0 if success, >0 if error +int fillContactList(char* cvs_file_in); + + +// Params: A valide filename +// Return: 0 if success, >0 if error +int writeContactList(char* cvs_file_in); + +// Add a contact +// Params: A contact struct +// Return: 0 if success, >0 otherwise +int addContact(const contact*); + +// Delete a contact +// Params: A String which is a valide contact SIM number +// Return: 0 if success, >0 otherwise +int deleteContactFromNumber(const char*); + + +// Delete a contact from his name +// Params: A String which is a valide contact SIM number +// Return: 0 if success, >0 otherwise +int deleteContactFromName(const char*); + + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + + +// Window contact + +void clearContactListW(void); +void showContactListW(void); +void refreshContactListW(void); + +void selectNextContact(void); +void selectPreviousContact(void); + + +#endif |