5 A Linux/Unix toolset and driver for Nokia mobile phones.
7 Released under the terms of the GNU GPL, see file COPYING for more details.
11 #ifndef __gsm_phonebook_h
12 #define __gsm_phonebook_h
16 /* Limits for sizing of array in GSM_PhonebookEntry. Individual handsets may
17 not support these lengths so they have their own limits set. */
19 #define GSM_MAX_PHONEBOOK_NAME_LENGTH (50) /* For 7110 */
20 #define GSM_MAX_PHONEBOOK_NUMBER_LENGTH (48) /* For 7110 */
21 #define GSM_MAX_PHONEBOOK_TEXT_LENGTH (60) /* For 7110 */
22 #define GSM_MAX_PHONEBOOK_SUB_ENTRIES (8) /* For 7110 */
23 #define GSM_MAX_PHONEBOOK_LOGO_LENGTH (126) /* For 7110 */
24 /* 7110 is able to in one
25 * entry 5 numbers and 2
26 * texts [email,notice,postal] */
28 /* Here is a macro for models that do not support caller groups. */
30 #define GSM_GROUPS_NOT_SUPPORTED -1
32 /* This data type is used to report the number of used and free positions in
33 memory (sim or internal). */
36 GSM_MemoryType MemoryType; /* Type of the memory */
37 int Used; /* Number of used positions */
38 int Free; /* Number of free positions */
41 /* Some phones (in this moment 6210/7110) supports extended phonebook
42 with additional datas. Here we have structure for them */
60 GSM_RingtoneNo = 0x0C,
61 GSM_Date = 0x13, /* Date is used for DC,RC,etc (last calls) */
68 char Number[GSM_MAX_PHONEBOOK_TEXT_LENGTH+1]; /* Number */
69 GSM_DateTime Date; /* or the last calls list */
70 } GSM_SubPhonebookEntrydata;
73 GSM_EntryType EntryType;
74 GSM_Number_Type NumberType;
75 GSM_SubPhonebookEntrydata data;
77 } GSM_SubPhonebookEntry;
79 /* Define datatype for phonebook entry, used for getting/writing phonebook
83 bool Empty; /* Is this entry empty? */
84 char Name[GSM_MAX_PHONEBOOK_NAME_LENGTH + 1]; /* Plus 1 for
86 char Number[GSM_MAX_PHONEBOOK_NUMBER_LENGTH + 1]; /* Number */
87 GSM_MemoryType MemoryType; /* Type of memory */
88 int Group; /* Group */
89 int Location; /* Location */
90 GSM_SubPhonebookEntry SubEntries[GSM_MAX_PHONEBOOK_SUB_ENTRIES];
92 * additional phonebook
94 int SubEntriesCount; /* Should be 0, if extended
95 phonebook is not used */
98 char *GSM_GetVCARD(GSM_PhonebookEntry *entry, int version);
100 int GSM_SavePhonebookEntryToSMS(GSM_MultiSMSMessage *SMS,
101 GSM_PhonebookEntry *entry, int version);
103 #endif /* __gsm_phonebook_h */