author | zautrix <zautrix> | 2004-08-07 17:24:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-07 17:24:40 (UTC) |
commit | 88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22 (patch) (unidiff) | |
tree | 6331418973714243beb674abc87692277b83869d /gammu/emb/common/service/gsmpbk.h | |
parent | ef8a09ce74ad3f0a51484d03fdf009bd5b3677bf (diff) | |
download | kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.zip kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.tar.gz kdepimpi-88b0d33b8b0b1f6ae320cfc863ca6a47fa8fec22.tar.bz2 |
Initial revision
Diffstat (limited to 'gammu/emb/common/service/gsmpbk.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/service/gsmpbk.h | 270 |
1 files changed, 270 insertions, 0 deletions
diff --git a/gammu/emb/common/service/gsmpbk.h b/gammu/emb/common/service/gsmpbk.h new file mode 100644 index 0000000..e556793 --- a/dev/null +++ b/gammu/emb/common/service/gsmpbk.h | |||
@@ -0,0 +1,270 @@ | |||
1 | /* (c) 2001-2004 by Marcin Wiacek and Michal Cihar */ | ||
2 | |||
3 | #ifndef __gsm_pbk_h | ||
4 | #define __gsm_pbk_h | ||
5 | |||
6 | #include <stdlib.h> | ||
7 | |||
8 | #include "../gsmcomon.h" | ||
9 | #include "gsmmisc.h" | ||
10 | |||
11 | /** | ||
12 | * Structure contains info about number of used/free entries in phonebook | ||
13 | * memory | ||
14 | */ | ||
15 | typedef struct { | ||
16 | /** | ||
17 | * Number of used entries | ||
18 | */ | ||
19 | int MemoryUsed; | ||
20 | /** | ||
21 | * Memory type | ||
22 | */ | ||
23 | GSM_MemoryType MemoryType; | ||
24 | /** | ||
25 | * Number of free entries | ||
26 | */ | ||
27 | int MemoryFree; | ||
28 | } GSM_MemoryStatus; | ||
29 | |||
30 | /** | ||
31 | * Type of specific phonebook entry. In parenthesis is specified in which | ||
32 | * member of @ref GSM_SubMemoryEntry value is stored. | ||
33 | */ | ||
34 | typedef enum { | ||
35 | /** | ||
36 | * General number. (Text) | ||
37 | */ | ||
38 | PBK_Number_General = 1, | ||
39 | /** | ||
40 | * Mobile number. (Text) | ||
41 | */ | ||
42 | PBK_Number_Mobile, | ||
43 | /** | ||
44 | * Work number. (Text) | ||
45 | */ | ||
46 | PBK_Number_Work, | ||
47 | /** | ||
48 | * Fax number. (Text) | ||
49 | */ | ||
50 | PBK_Number_Fax, | ||
51 | /** | ||
52 | * Home number. (Text) | ||
53 | */ | ||
54 | PBK_Number_Home, | ||
55 | /** | ||
56 | * Pager number. (Text) | ||
57 | */ | ||
58 | PBK_Number_Pager, | ||
59 | /** | ||
60 | * Other number. (Text) | ||
61 | */ | ||
62 | PBK_Number_Other, | ||
63 | /** | ||
64 | * Note. (Text) | ||
65 | */ | ||
66 | PBK_Text_Note, | ||
67 | /** | ||
68 | * Complete postal address. (Text) | ||
69 | */ | ||
70 | PBK_Text_Postal, | ||
71 | /** | ||
72 | * Email. (Text) | ||
73 | */ | ||
74 | PBK_Text_Email, | ||
75 | /** | ||
76 | * Second email. (Text) | ||
77 | */ | ||
78 | PBK_Text_Email2, | ||
79 | /** | ||
80 | * URL (Text) | ||
81 | */ | ||
82 | PBK_Text_URL, | ||
83 | /** | ||
84 | * Date and time. FIXME: describe better (Date) | ||
85 | */ | ||
86 | PBK_Date, | ||
87 | /** | ||
88 | * Caller group. (Text) | ||
89 | */ | ||
90 | PBK_Caller_Group, | ||
91 | /** | ||
92 | * Name (Text) | ||
93 | */ | ||
94 | PBK_Text_Name, | ||
95 | /** | ||
96 | * Last name. (Text) | ||
97 | */ | ||
98 | PBK_Text_LastName, | ||
99 | /** | ||
100 | * First name. (Text) | ||
101 | */ | ||
102 | PBK_Text_FirstName, | ||
103 | /** | ||
104 | * Company. (Text) | ||
105 | */ | ||
106 | PBK_Text_Company, | ||
107 | /** | ||
108 | * Job title. (Text) | ||
109 | */ | ||
110 | PBK_Text_JobTitle, | ||
111 | /** | ||
112 | * Category. (Number) | ||
113 | */ | ||
114 | PBK_Category, | ||
115 | /** | ||
116 | * Whether entry is private. (Number) | ||
117 | */ | ||
118 | PBK_Private, | ||
119 | /** | ||
120 | * Street address. (Text) | ||
121 | */ | ||
122 | PBK_Text_StreetAddress, | ||
123 | /** | ||
124 | * City. (Text) | ||
125 | */ | ||
126 | PBK_Text_City, | ||
127 | /** | ||
128 | * State. (Text) | ||
129 | */ | ||
130 | PBK_Text_State, | ||
131 | /** | ||
132 | * Zip code. (Text) | ||
133 | */ | ||
134 | PBK_Text_Zip, | ||
135 | /** | ||
136 | * Country. (Text) | ||
137 | */ | ||
138 | PBK_Text_Country, | ||
139 | /** | ||
140 | * Custom information 1. (Text) | ||
141 | */ | ||
142 | PBK_Text_Custom1, | ||
143 | /** | ||
144 | * Custom information 2. (Text) | ||
145 | */ | ||
146 | PBK_Text_Custom2, | ||
147 | /** | ||
148 | * Custom information 3. (Text) | ||
149 | */ | ||
150 | PBK_Text_Custom3, | ||
151 | /** | ||
152 | * Custom information 4. (Text) | ||
153 | */ | ||
154 | PBK_Text_Custom4, | ||
155 | /** | ||
156 | * Ringtone ID. (Number) | ||
157 | */ | ||
158 | PBK_RingtoneID, | ||
159 | /** | ||
160 | * Ringtone ID in phone filesystem. (Number) | ||
161 | */ | ||
162 | PBK_RingtoneFileSystemID, | ||
163 | /** | ||
164 | * Picture ID. (Number) | ||
165 | */ | ||
166 | PBK_PictureID, | ||
167 | PBK_SMSListID, | ||
168 | /** | ||
169 | * User ID. (Text) | ||
170 | */ | ||
171 | PBK_Text_UserID | ||
172 | } GSM_EntryType; | ||
173 | |||
174 | #define GSM_PHONEBOOK_TEXT_LENGTH 200 | ||
175 | #define GSM_PHONEBOOK_ENTRIES 26 | ||
176 | |||
177 | /** | ||
178 | * One value of phonebook memory entry. | ||
179 | */ | ||
180 | typedef struct { | ||
181 | /** | ||
182 | * Type of entry. | ||
183 | */ | ||
184 | GSM_EntryType EntryType; | ||
185 | /** | ||
186 | * Text of entry (if applicable, see @ref GSM_EntryType). | ||
187 | */ | ||
188 | unsigned char Text[(GSM_PHONEBOOK_TEXT_LENGTH+1)*2]; | ||
189 | /** | ||
190 | * Text of entry (if applicable, see @ref GSM_EntryType). | ||
191 | */ | ||
192 | GSM_DateTime Date; | ||
193 | /** | ||
194 | * Number of entry (if applicable, see @ref GSM_EntryType). | ||
195 | */ | ||
196 | int Number; | ||
197 | /** | ||
198 | * Voice dialling tag. | ||
199 | */ | ||
200 | int VoiceTag; | ||
201 | int SMSList[20]; | ||
202 | } GSM_SubMemoryEntry; | ||
203 | |||
204 | /** | ||
205 | * Structure for saving phonebook entries | ||
206 | */ | ||
207 | typedef struct { | ||
208 | /** | ||
209 | * Used memory for phonebook entry | ||
210 | */ | ||
211 | GSM_MemoryType MemoryType; | ||
212 | /** | ||
213 | * Used location for phonebook entry | ||
214 | */ | ||
215 | int Location; | ||
216 | /** | ||
217 | * Number of SubEntries in Entries table. | ||
218 | */ | ||
219 | int EntriesNum; | ||
220 | /** | ||
221 | * Values of SubEntries. | ||
222 | */ | ||
223 | GSM_SubMemoryEntry Entries[GSM_PHONEBOOK_ENTRIES]; | ||
224 | } GSM_MemoryEntry; | ||
225 | |||
226 | typedef enum { | ||
227 | Nokia_VCard10 = 1, | ||
228 | Nokia_VCard21, | ||
229 | SonyEricsson_VCard10, | ||
230 | SonyEricsson_VCard21 | ||
231 | } GSM_VCardVersion; | ||
232 | |||
233 | void GSM_PhonebookFindDefaultNameNumberGroup(GSM_MemoryEntry *entry, int *Name, int *Number, int *Group); | ||
234 | unsigned char *GSM_PhonebookGetEntryName (GSM_MemoryEntry *entry); | ||
235 | |||
236 | void GSM_EncodeVCARD(char *Buffer, int *Length, GSM_MemoryEntry *pbk, bool header, GSM_VCardVersion Version); | ||
237 | GSM_Error GSM_DecodeVCARD(unsigned char *Buffer, int *Pos, GSM_MemoryEntry *Pbk, GSM_VCardVersion Version); | ||
238 | |||
239 | #ifndef ENABLE_LGPL | ||
240 | /* (c) by Timo Teras */ | ||
241 | void DecodeVCARD21Text(char *VCard, GSM_MemoryEntry *pbk); | ||
242 | #endif | ||
243 | |||
244 | /** | ||
245 | * Structure for saving speed dials | ||
246 | */ | ||
247 | typedef struct { | ||
248 | /** | ||
249 | * Number of speed dial: 2,3..,8,9 | ||
250 | */ | ||
251 | int Location; | ||
252 | /** | ||
253 | * ID of phone number used in phonebook entry | ||
254 | */ | ||
255 | int MemoryNumberID; | ||
256 | /** | ||
257 | * Memory, where is saved used phonebook entry | ||
258 | */ | ||
259 | GSM_MemoryType MemoryType; | ||
260 | /** | ||
261 | * Location in memory, where is saved used phonebook entry | ||
262 | */ | ||
263 | int MemoryLocation; | ||
264 | } GSM_SpeedDial; | ||
265 | |||
266 | #endif | ||
267 | |||
268 | /* How should editor hadle tabs in this file? Add editor commands here. | ||
269 | * vim: noexpandtab sw=8 ts=8 sts=8: | ||
270 | */ | ||