From 20a87184b1c06f63b2b3d8b9c48a68535b31b4bb Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 17 Nov 2017 11:21:12 +0100 Subject: New mesms --- contactList.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'contactList.h') diff --git a/contactList.h b/contactList.h index 5857c2f..bb25ef2 100644 --- a/contactList.h +++ b/contactList.h @@ -5,11 +5,14 @@ #include #include "basic_curses.h" +typedef struct conversation conversation; + typedef struct contact { char name[100]; char display_name[100]; char number[50]; int hasNewMessage; + conversation* conversation; } contact ; #define DEFAULT_CONTACT_FILENAME "/usr/share/sms/contact.csv" @@ -30,6 +33,12 @@ int writeContactList(char* cvs_file_in); // Return: 0 if success, >0 otherwise int findContact(const char*, contact**); +// Find a contact +// Params: A name +// Return: 0 if success, >0 otherwise +int findContactFromName(const char*, contact**); + + // Add a contact @@ -49,18 +58,15 @@ int deleteContactFromNumber(const char*); int deleteContactFromName(const char*); +// Sort the contact list +// Params : Nothing +// Return : Nothing +void sortContacts(void); + + /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // Window contact - -void clearContactListW(void); -void showContactListW(void); -void refreshContactListW(void); - -void selectNextContact(void); -void selectPreviousContact(void); - - #endif -- cgit v1.2.3