blob: 12d69ed971ed4c9d0b937f06f15a5439924c3ea9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
|