Diffstat (limited to 'gammu/emb/common/service/sms/gsmmulti.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/service/sms/gsmmulti.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gammu/emb/common/service/sms/gsmmulti.h b/gammu/emb/common/service/sms/gsmmulti.h index c672261..3f70d81 100644 --- a/gammu/emb/common/service/sms/gsmmulti.h +++ b/gammu/emb/common/service/sms/gsmmulti.h | |||
@@ -1,53 +1,57 @@ | |||
1 | /* (c) 2002-2004 by Marcin Wiacek */ | 1 | /* (c) 2002-2004 by Marcin Wiacek */ |
2 | 2 | ||
3 | #ifndef __gsm_multi_h | 3 | #ifndef __gsm_multi_h |
4 | #define __gsm_multi_h | 4 | #define __gsm_multi_h |
5 | 5 | ||
6 | #if defined(_MSC_VER) && defined(__cplusplus) | ||
7 | extern "C" { | ||
8 | #endif | ||
9 | |||
6 | #include "../../gsmcomon.h" | 10 | #include "../../gsmcomon.h" |
7 | #include "../gsmlogo.h" | 11 | #include "../gsmlogo.h" |
8 | #include "../gsmcal.h" | 12 | #include "../gsmcal.h" |
9 | #include "../gsmpbk.h" | 13 | #include "../gsmpbk.h" |
10 | #include "../gsmdata.h" | 14 | #include "../gsmdata.h" |
11 | #include "../gsmring.h" | 15 | #include "../gsmring.h" |
12 | #include "gsmsms.h" | 16 | #include "gsmsms.h" |
13 | 17 | ||
14 | /* ---------------------- multi SMS --------------------------------------- */ | 18 | /* ---------------------- multi SMS --------------------------------------- */ |
15 | 19 | ||
16 | /* Identifiers for Smart Messaging 3.0 multipart SMS */ | 20 | /* Identifiers for Smart Messaging 3.0 multipart SMS */ |
17 | 21 | ||
18 | #define SM30_ISOTEXT 0 /* ISO 8859-1 text */ | 22 | #define SM30_ISOTEXT 0 /* ISO 8859-1 text */ |
19 | #define SM30_UNICODETEXT 1 | 23 | #define SM30_UNICODETEXT 1 |
20 | #define SM30_OTA 2 | 24 | #define SM30_OTA 2 |
21 | #define SM30_RINGTONE 3 | 25 | #define SM30_RINGTONE 3 |
22 | #define SM30_PROFILENAME 4 | 26 | #define SM30_PROFILENAME 4 |
23 | /* ... */ | 27 | /* ... */ |
24 | #define SM30_SCREENSAVER 6 | 28 | #define SM30_SCREENSAVER 6 |
25 | 29 | ||
26 | /* Identifiers for Alcatel Terminal Data Download */ | 30 | /* Identifiers for Alcatel Terminal Data Download */ |
27 | #define ALCATELTDD_PICTURE 4 | 31 | #define ALCATELTDD_PICTURE 4 |
28 | #define ALCATELTDD_ANIMATION 5 | 32 | #define ALCATELTDD_ANIMATION 5 |
29 | #define ALCATELTDD_SMSTEMPLATE 6 | 33 | #define ALCATELTDD_SMSTEMPLATE 6 |
30 | 34 | ||
31 | void GSM_SMSCounter(int MessageLength, | 35 | void GSM_SMSCounter(int MessageLength, |
32 | unsigned char *MessageBuffer, | 36 | unsigned char *MessageBuffer, |
33 | GSM_UDH UDHType, | 37 | GSM_UDH UDHType, |
34 | GSM_Coding_Type Coding, | 38 | GSM_Coding_Type Coding, |
35 | int *SMSNum, | 39 | int *SMSNum, |
36 | int *CharsLeft); | 40 | int *CharsLeft); |
37 | 41 | ||
38 | #define MAX_MULTI_SMS 10 | 42 | #define MAX_MULTI_SMS 10 |
39 | 43 | ||
40 | /** | 44 | /** |
41 | * Multiple SMS messages, used for Smart Messaging 3.0/EMS. | 45 | * Multiple SMS messages, used for Smart Messaging 3.0/EMS. |
42 | */ | 46 | */ |
43 | typedef struct { | 47 | typedef struct { |
44 | /** | 48 | /** |
45 | * Sender or recipient number. | 49 | * Sender or recipient number. |
46 | */ | 50 | */ |
47 | unsigned char Number; | 51 | unsigned char Number; |
48 | /** | 52 | /** |
49 | * Array of SMSes. | 53 | * Array of SMSes. |
50 | */ | 54 | */ |
51 | GSM_SMSMessage SMS[MAX_MULTI_SMS]; | 55 | GSM_SMSMessage SMS[MAX_MULTI_SMS]; |
52 | } GSM_MultiSMSMessage; | 56 | } GSM_MultiSMSMessage; |
53 | 57 | ||
@@ -127,145 +131,150 @@ typedef enum { | |||
127 | */ | 131 | */ |
128 | SMS_NokiaWAPBookmarkLong, | 132 | SMS_NokiaWAPBookmarkLong, |
129 | /** | 133 | /** |
130 | * Nokia WAP settings in 2 SMS | 134 | * Nokia WAP settings in 2 SMS |
131 | */ | 135 | */ |
132 | SMS_NokiaWAPSettingsLong, | 136 | SMS_NokiaWAPSettingsLong, |
133 | /** | 137 | /** |
134 | * Nokia MMS settings in 2 SMS | 138 | * Nokia MMS settings in 2 SMS |
135 | */ | 139 | */ |
136 | SMS_NokiaMMSSettingsLong, | 140 | SMS_NokiaMMSSettingsLong, |
137 | /** | 141 | /** |
138 | * Nokia VCARD 1.0 - only name and default number | 142 | * Nokia VCARD 1.0 - only name and default number |
139 | */ | 143 | */ |
140 | SMS_NokiaVCARD10Long, | 144 | SMS_NokiaVCARD10Long, |
141 | /** | 145 | /** |
142 | * Nokia VCARD 2.1 - all numbers + text | 146 | * Nokia VCARD 2.1 - all numbers + text |
143 | */ | 147 | */ |
144 | SMS_NokiaVCARD21Long, | 148 | SMS_NokiaVCARD21Long, |
145 | /** | 149 | /** |
146 | * Nokia VCALENDAR 1.0 - can be in few sms | 150 | * Nokia VCALENDAR 1.0 - can be in few sms |
147 | */ | 151 | */ |
148 | SMS_NokiaVCALENDAR10Long, | 152 | SMS_NokiaVCALENDAR10Long, |
149 | SMS_NokiaVTODOLong, | 153 | SMS_NokiaVTODOLong, |
150 | SMS_VCARD10Long, | 154 | SMS_VCARD10Long, |
151 | SMS_VCARD21Long, | 155 | SMS_VCARD21Long, |
152 | SMS_DisableVoice, | 156 | SMS_DisableVoice, |
153 | SMS_DisableFax, | 157 | SMS_DisableFax, |
154 | SMS_DisableEmail, | 158 | SMS_DisableEmail, |
155 | SMS_EnableVoice, | 159 | SMS_EnableVoice, |
156 | SMS_EnableFax, | 160 | SMS_EnableFax, |
157 | SMS_EnableEmail, | 161 | SMS_EnableEmail, |
158 | SMS_VoidSMS, | 162 | SMS_VoidSMS, |
159 | /** | 163 | /** |
160 | * IMelody 1.0 | 164 | * IMelody 1.0 |
161 | */ | 165 | */ |
162 | SMS_EMSSound10, | 166 | SMS_EMSSound10, |
163 | /** | 167 | /** |
164 | * IMelody 1.2 | 168 | * IMelody 1.2 |
165 | */ | 169 | */ |
166 | SMS_EMSSound12, | 170 | SMS_EMSSound12, |
167 | /** | 171 | /** |
168 | * IMelody without header - SonyEricsson extension | 172 | * IMelody without header - SonyEricsson extension |
169 | */ | 173 | */ |
170 | SMS_EMSSonyEricssonSound, | 174 | SMS_EMSSonyEricssonSound, |
171 | /** | 175 | /** |
172 | * IMelody 1.0 with UPI. | 176 | * IMelody 1.0 with UPI. |
173 | */ | 177 | */ |
174 | SMS_EMSSound10Long, | 178 | SMS_EMSSound10Long, |
175 | /*** | 179 | /** |
176 | * IMelody 1.2 with UPI. | 180 | * IMelody 1.2 with UPI. |
177 | */ | 181 | */ |
178 | SMS_EMSSound12Long, | 182 | SMS_EMSSound12Long, |
179 | /** | 183 | /** |
180 | * IMelody without header with UPI. | 184 | * IMelody without header with UPI. |
181 | */ | 185 | */ |
182 | SMS_EMSSonyEricssonSoundLong, | 186 | SMS_EMSSonyEricssonSoundLong, |
183 | SMS_EMSPredefinedSound, | 187 | SMS_EMSPredefinedSound, |
184 | SMS_EMSPredefinedAnimation, | 188 | SMS_EMSPredefinedAnimation, |
185 | SMS_EMSAnimation, | 189 | SMS_EMSAnimation, |
186 | /** | 190 | /** |
187 | * Fixed bitmap of size 16x16 or 32x32. | 191 | * Fixed bitmap of size 16x16 or 32x32. |
188 | */ | 192 | */ |
189 | SMS_EMSFixedBitmap, | 193 | SMS_EMSFixedBitmap, |
190 | SMS_EMSVariableBitmap, | 194 | SMS_EMSVariableBitmap, |
191 | SMS_EMSVariableBitmapLong, | 195 | SMS_EMSVariableBitmapLong, |
192 | SMS_MMSIndicatorLong, | 196 | SMS_MMSIndicatorLong, |
197 | SMS_WAPIndicatorLong, | ||
193 | /** | 198 | /** |
194 | * Variable bitmap with black and white colors | 199 | * Variable bitmap with black and white colors |
195 | */ | 200 | */ |
196 | SMS_AlcatelMonoBitmapLong, | 201 | SMS_AlcatelMonoBitmapLong, |
197 | /** | 202 | /** |
198 | * Variable animation with black and white colors | 203 | * Variable animation with black and white colors |
199 | */ | 204 | */ |
200 | SMS_AlcatelMonoAnimationLong, | 205 | SMS_AlcatelMonoAnimationLong, |
201 | SMS_AlcatelSMSTemplateName | 206 | SMS_AlcatelSMSTemplateName |
202 | } EncodeMultiPartSMSID; | 207 | } EncodeMultiPartSMSID; |
203 | 208 | ||
204 | typedef struct { | 209 | typedef struct { |
205 | EncodeMultiPartSMSID ID; | 210 | EncodeMultiPartSMSID ID; |
206 | 211 | ||
207 | int Number; | 212 | int Number; |
208 | GSM_Ringtone *Ringtone; | 213 | GSM_Ringtone *Ringtone; |
209 | GSM_MultiBitmap *Bitmap; | 214 | GSM_MultiBitmap *Bitmap; |
210 | GSM_WAPBookmark *Bookmark; | 215 | GSM_WAPBookmark *Bookmark; |
211 | GSM_WAPSettings *Settings; | 216 | GSM_WAPSettings *Settings; |
212 | GSM_MMSIndicator*MMSIndicator; | 217 | GSM_MMSIndicator*MMSIndicator; |
213 | GSM_MemoryEntry *Phonebook; | 218 | GSM_MemoryEntry *Phonebook; |
214 | GSM_CalendarEntry *Calendar; | 219 | GSM_CalendarEntry *Calendar; |
215 | GSM_ToDoEntry *ToDo; | 220 | GSM_ToDoEntry *ToDo; |
216 | bool Protected; | 221 | bool Protected; |
217 | 222 | ||
218 | unsigned char *Buffer; | 223 | unsigned char *Buffer; |
219 | bool Left; | 224 | bool Left; |
220 | bool Right; | 225 | bool Right; |
221 | bool Center; | 226 | bool Center; |
222 | bool Large; | 227 | bool Large; |
223 | bool Small; | 228 | bool Small; |
224 | bool Bold; | 229 | bool Bold; |
225 | bool Italic; | 230 | bool Italic; |
226 | bool Underlined; | 231 | bool Underlined; |
227 | bool Strikethrough; | 232 | bool Strikethrough; |
228 | 233 | ||
229 | /* Return values */ | 234 | /* Return values */ |
230 | int RingtoneNotes; | 235 | int RingtoneNotes; |
231 | } MultiPartSMSEntry; | 236 | } MultiPartSMSEntry; |
232 | 237 | ||
233 | typedef struct { | 238 | typedef struct { |
234 | MultiPartSMSEntryEntries[MAX_MULTI_SMS]; | 239 | MultiPartSMSEntryEntries[MAX_MULTI_SMS]; |
235 | int EntriesNum; | 240 | int EntriesNum; |
236 | bool UnicodeCoding; | 241 | bool UnicodeCoding; |
237 | int Class; | 242 | int Class; |
238 | unsigned char ReplaceMessage; | 243 | unsigned char ReplaceMessage; |
239 | bool Unknown; | 244 | bool Unknown; |
240 | } GSM_MultiPartSMSInfo; | 245 | } GSM_MultiPartSMSInfo; |
241 | 246 | ||
242 | /** | 247 | /** |
243 | * Encodes multi part SMS from "readable" format. | 248 | * Encodes multi part SMS from "readable" format. |
244 | */ | 249 | */ |
245 | GSM_Error GSM_EncodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS); | 250 | GSM_Error GSM_EncodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS); |
246 | 251 | ||
247 | /** | 252 | /** |
248 | * Decodes multi part SMS to "readable" format. | 253 | * Decodes multi part SMS to "readable" format. |
249 | */ | 254 | */ |
250 | bool GSM_DecodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS, bool ems); | 255 | bool GSM_DecodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS, bool ems); |
251 | 256 | ||
252 | /** | 257 | /** |
253 | * Clears @ref GSM_MultiPartSMSInfo to default values. | 258 | * Clears @ref GSM_MultiPartSMSInfo to default values. |
254 | */ | 259 | */ |
255 | void GSM_ClearMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); | 260 | void GSM_ClearMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); |
256 | 261 | ||
257 | /** | 262 | /** |
258 | * Frees any allocated structures inside @ref GSM_MultiPartSMSInfo. | 263 | * Frees any allocated structures inside @ref GSM_MultiPartSMSInfo. |
259 | */ | 264 | */ |
260 | void GSM_FreeMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); | 265 | void GSM_FreeMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); |
261 | 266 | ||
262 | /** | 267 | /** |
263 | * Links SMS messages according to IDs. | 268 | * Links SMS messages according to IDs. |
264 | */ | 269 | */ |
265 | GSM_Error GSM_LinkSMS(GSM_MultiSMSMessage **INPUT, GSM_MultiSMSMessage **OUTPUT, bool ems); | 270 | GSM_Error GSM_LinkSMS(GSM_MultiSMSMessage **INPUT, GSM_MultiSMSMessage **OUTPUT, bool ems); |
266 | 271 | ||
272 | #if defined(_MSC_VER) && defined(__cplusplus) | ||
273 | } | ||
274 | #endif | ||
275 | |||
267 | #endif | 276 | #endif |
268 | 277 | ||
269 | /* How should editor hadle tabs in this file? Add editor commands here. | 278 | /* How should editor hadle tabs in this file? Add editor commands here. |
270 | * vim: noexpandtab sw=8 ts=8 sts=8: | 279 | * vim: noexpandtab sw=8 ts=8 sts=8: |
271 | */ | 280 | */ |