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/sms/gsmmulti.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/sms/gsmmulti.h') (more/less context) (show whitespace changes)
-rw-r--r-- | gammu/emb/common/service/sms/gsmmulti.h | 271 |
1 files changed, 271 insertions, 0 deletions
diff --git a/gammu/emb/common/service/sms/gsmmulti.h b/gammu/emb/common/service/sms/gsmmulti.h new file mode 100644 index 0000000..c672261 --- a/dev/null +++ b/gammu/emb/common/service/sms/gsmmulti.h | |||
@@ -0,0 +1,271 @@ | |||
1 | /* (c) 2002-2004 by Marcin Wiacek */ | ||
2 | |||
3 | #ifndef __gsm_multi_h | ||
4 | #define __gsm_multi_h | ||
5 | |||
6 | #include "../../gsmcomon.h" | ||
7 | #include "../gsmlogo.h" | ||
8 | #include "../gsmcal.h" | ||
9 | #include "../gsmpbk.h" | ||
10 | #include "../gsmdata.h" | ||
11 | #include "../gsmring.h" | ||
12 | #include "gsmsms.h" | ||
13 | |||
14 | /* ---------------------- multi SMS --------------------------------------- */ | ||
15 | |||
16 | /* Identifiers for Smart Messaging 3.0 multipart SMS */ | ||
17 | |||
18 | #define SM30_ISOTEXT 0 /* ISO 8859-1 text */ | ||
19 | #define SM30_UNICODETEXT 1 | ||
20 | #define SM30_OTA 2 | ||
21 | #define SM30_RINGTONE 3 | ||
22 | #define SM30_PROFILENAME 4 | ||
23 | /* ... */ | ||
24 | #define SM30_SCREENSAVER 6 | ||
25 | |||
26 | /* Identifiers for Alcatel Terminal Data Download */ | ||
27 | #define ALCATELTDD_PICTURE 4 | ||
28 | #define ALCATELTDD_ANIMATION 5 | ||
29 | #define ALCATELTDD_SMSTEMPLATE 6 | ||
30 | |||
31 | void GSM_SMSCounter(int MessageLength, | ||
32 | unsigned char *MessageBuffer, | ||
33 | GSM_UDH UDHType, | ||
34 | GSM_Coding_Type Coding, | ||
35 | int *SMSNum, | ||
36 | int *CharsLeft); | ||
37 | |||
38 | #define MAX_MULTI_SMS 10 | ||
39 | |||
40 | /** | ||
41 | * Multiple SMS messages, used for Smart Messaging 3.0/EMS. | ||
42 | */ | ||
43 | typedef struct { | ||
44 | /** | ||
45 | * Sender or recipient number. | ||
46 | */ | ||
47 | unsigned char Number; | ||
48 | /** | ||
49 | * Array of SMSes. | ||
50 | */ | ||
51 | GSM_SMSMessage SMS[MAX_MULTI_SMS]; | ||
52 | } GSM_MultiSMSMessage; | ||
53 | |||
54 | GSM_Error GSM_AddSMS_Text_UDH(GSM_MultiSMSMessage *SMS, | ||
55 | GSM_Coding_Type Coding, | ||
56 | char *Buffer, | ||
57 | int BufferLen, | ||
58 | bool UDH, | ||
59 | int *UsedText, | ||
60 | int *CopiedText, | ||
61 | int *CopiedSMSText); | ||
62 | |||
63 | void GSM_MakeMultiPartSMS(GSM_MultiSMSMessage *SMS, | ||
64 | unsigned char *MessageBuffer, | ||
65 | int MessageLength, | ||
66 | GSM_UDH UDHType, | ||
67 | GSM_Coding_Type Coding, | ||
68 | int Class, | ||
69 | unsigned char RejectDuplicates); | ||
70 | |||
71 | void GSM_Find_Free_Used_SMS2(GSM_Coding_Type Coding,GSM_SMSMessage SMS, int *UsedText, int *FreeText, int *FreeBytes); | ||
72 | |||
73 | unsigned char GSM_MakeSMSIDFromTime(void); | ||
74 | |||
75 | /** | ||
76 | * ID during packing SMS for Smart Messaging 3.0, EMS and other | ||
77 | */ | ||
78 | typedef enum { | ||
79 | /** | ||
80 | * 1 text SMS. | ||
81 | */ | ||
82 | SMS_Text = 1, | ||
83 | /** | ||
84 | * Contacenated SMS, when longer than 1 SMS. | ||
85 | */ | ||
86 | SMS_ConcatenatedTextLong, | ||
87 | /** | ||
88 | * Contacenated SMS, auto Default/Unicode coding. | ||
89 | */ | ||
90 | SMS_ConcatenatedAutoTextLong, | ||
91 | SMS_ConcatenatedTextLong16bit, | ||
92 | SMS_ConcatenatedAutoTextLong16bit, | ||
93 | /** | ||
94 | * Nokia profile = Name, Ringtone, ScreenSaver | ||
95 | */ | ||
96 | SMS_NokiaProfileLong, | ||
97 | /** | ||
98 | * Nokia Picture Image + (text) | ||
99 | */ | ||
100 | SMS_NokiaPictureImageLong, | ||
101 | /** | ||
102 | * Nokia screen saver + (text) | ||
103 | */ | ||
104 | SMS_NokiaScreenSaverLong, | ||
105 | /** | ||
106 | * Nokia ringtone - old SM2.0 format, 1 SMS | ||
107 | */ | ||
108 | SMS_NokiaRingtone, | ||
109 | /** | ||
110 | * Nokia ringtone contacenated, when very long | ||
111 | */ | ||
112 | SMS_NokiaRingtoneLong, | ||
113 | /** | ||
114 | * Nokia 72x14 operator logo, 1 SMS | ||
115 | */ | ||
116 | SMS_NokiaOperatorLogo, | ||
117 | /** | ||
118 | * Nokia 72x14 op logo or 78x21 in 2 SMS | ||
119 | */ | ||
120 | SMS_NokiaOperatorLogoLong, | ||
121 | /** | ||
122 | * Nokia 72x14 caller logo, 1 SMS | ||
123 | */ | ||
124 | SMS_NokiaCallerLogo, | ||
125 | /** | ||
126 | * Nokia WAP bookmark in 1 or 2 SMS | ||
127 | */ | ||
128 | SMS_NokiaWAPBookmarkLong, | ||
129 | /** | ||
130 | * Nokia WAP settings in 2 SMS | ||
131 | */ | ||
132 | SMS_NokiaWAPSettingsLong, | ||
133 | /** | ||
134 | * Nokia MMS settings in 2 SMS | ||
135 | */ | ||
136 | SMS_NokiaMMSSettingsLong, | ||
137 | /** | ||
138 | * Nokia VCARD 1.0 - only name and default number | ||
139 | */ | ||
140 | SMS_NokiaVCARD10Long, | ||
141 | /** | ||
142 | * Nokia VCARD 2.1 - all numbers + text | ||
143 | */ | ||
144 | SMS_NokiaVCARD21Long, | ||
145 | /** | ||
146 | * Nokia VCALENDAR 1.0 - can be in few sms | ||
147 | */ | ||
148 | SMS_NokiaVCALENDAR10Long, | ||
149 | SMS_NokiaVTODOLong, | ||
150 | SMS_VCARD10Long, | ||
151 | SMS_VCARD21Long, | ||
152 | SMS_DisableVoice, | ||
153 | SMS_DisableFax, | ||
154 | SMS_DisableEmail, | ||
155 | SMS_EnableVoice, | ||
156 | SMS_EnableFax, | ||
157 | SMS_EnableEmail, | ||
158 | SMS_VoidSMS, | ||
159 | /** | ||
160 | * IMelody 1.0 | ||
161 | */ | ||
162 | SMS_EMSSound10, | ||
163 | /** | ||
164 | * IMelody 1.2 | ||
165 | */ | ||
166 | SMS_EMSSound12, | ||
167 | /** | ||
168 | * IMelody without header - SonyEricsson extension | ||
169 | */ | ||
170 | SMS_EMSSonyEricssonSound, | ||
171 | /** | ||
172 | * IMelody 1.0 with UPI. | ||
173 | */ | ||
174 | SMS_EMSSound10Long, | ||
175 | /*** | ||
176 | * IMelody 1.2 with UPI. | ||
177 | */ | ||
178 | SMS_EMSSound12Long, | ||
179 | /** | ||
180 | * IMelody without header with UPI. | ||
181 | */ | ||
182 | SMS_EMSSonyEricssonSoundLong, | ||
183 | SMS_EMSPredefinedSound, | ||
184 | SMS_EMSPredefinedAnimation, | ||
185 | SMS_EMSAnimation, | ||
186 | /** | ||
187 | * Fixed bitmap of size 16x16 or 32x32. | ||
188 | */ | ||
189 | SMS_EMSFixedBitmap, | ||
190 | SMS_EMSVariableBitmap, | ||
191 | SMS_EMSVariableBitmapLong, | ||
192 | SMS_MMSIndicatorLong, | ||
193 | /** | ||
194 | * Variable bitmap with black and white colors | ||
195 | */ | ||
196 | SMS_AlcatelMonoBitmapLong, | ||
197 | /** | ||
198 | * Variable animation with black and white colors | ||
199 | */ | ||
200 | SMS_AlcatelMonoAnimationLong, | ||
201 | SMS_AlcatelSMSTemplateName | ||
202 | } EncodeMultiPartSMSID; | ||
203 | |||
204 | typedef struct { | ||
205 | EncodeMultiPartSMSID ID; | ||
206 | |||
207 | int Number; | ||
208 | GSM_Ringtone *Ringtone; | ||
209 | GSM_MultiBitmap *Bitmap; | ||
210 | GSM_WAPBookmark *Bookmark; | ||
211 | GSM_WAPSettings *Settings; | ||
212 | GSM_MMSIndicator*MMSIndicator; | ||
213 | GSM_MemoryEntry *Phonebook; | ||
214 | GSM_CalendarEntry *Calendar; | ||
215 | GSM_ToDoEntry *ToDo; | ||
216 | bool Protected; | ||
217 | |||
218 | unsigned char *Buffer; | ||
219 | bool Left; | ||
220 | bool Right; | ||
221 | bool Center; | ||
222 | bool Large; | ||
223 | bool Small; | ||
224 | bool Bold; | ||
225 | bool Italic; | ||
226 | bool Underlined; | ||
227 | bool Strikethrough; | ||
228 | |||
229 | /* Return values */ | ||
230 | int RingtoneNotes; | ||
231 | } MultiPartSMSEntry; | ||
232 | |||
233 | typedef struct { | ||
234 | MultiPartSMSEntryEntries[MAX_MULTI_SMS]; | ||
235 | int EntriesNum; | ||
236 | bool UnicodeCoding; | ||
237 | int Class; | ||
238 | unsigned char ReplaceMessage; | ||
239 | bool Unknown; | ||
240 | } GSM_MultiPartSMSInfo; | ||
241 | |||
242 | /** | ||
243 | * Encodes multi part SMS from "readable" format. | ||
244 | */ | ||
245 | GSM_Error GSM_EncodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS); | ||
246 | |||
247 | /** | ||
248 | * Decodes multi part SMS to "readable" format. | ||
249 | */ | ||
250 | bool GSM_DecodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS, bool ems); | ||
251 | |||
252 | /** | ||
253 | * Clears @ref GSM_MultiPartSMSInfo to default values. | ||
254 | */ | ||
255 | void GSM_ClearMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); | ||
256 | |||
257 | /** | ||
258 | * Frees any allocated structures inside @ref GSM_MultiPartSMSInfo. | ||
259 | */ | ||
260 | void GSM_FreeMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); | ||
261 | |||
262 | /** | ||
263 | * Links SMS messages according to IDs. | ||
264 | */ | ||
265 | GSM_Error GSM_LinkSMS(GSM_MultiSMSMessage **INPUT, GSM_MultiSMSMessage **OUTPUT, bool ems); | ||
266 | |||
267 | #endif | ||
268 | |||
269 | /* How should editor hadle tabs in this file? Add editor commands here. | ||
270 | * vim: noexpandtab sw=8 ts=8 sts=8: | ||
271 | */ | ||