From 65087f82753a12e330fa0e6fc0c0e4b70c6a6c63 Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 11 Nov 2017 03:57:47 +0000 Subject: PoC menu Contact --- contactList.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 contactList.h (limited to 'contactList.h') 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 +#include +#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 -- cgit v1.2.3