summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/service/sms
authorzautrix <zautrix>2004-10-05 11:13:51 (UTC)
committer zautrix <zautrix>2004-10-05 11:13:51 (UTC)
commit50ab40e1e02ad7c65c17a78d08116a808b1257aa (patch) (unidiff)
tree0d1939e2297fa7bbd8e1f2030f154463854164c6 /gammu/emb/common/service/sms
parentcf8616f64f20e5448d4ff644f7cc15750cf3f85f (diff)
downloadkdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.zip
kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.gz
kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.bz2
updated to latest gammu version
Diffstat (limited to 'gammu/emb/common/service/sms') (more/less context) (show whitespace changes)
-rw-r--r--gammu/emb/common/service/sms/gsmmulti.c5
-rw-r--r--gammu/emb/common/service/sms/gsmmulti.h11
-rw-r--r--gammu/emb/common/service/sms/gsmsms.c5
-rw-r--r--gammu/emb/common/service/sms/gsmsms.h5
4 files changed, 23 insertions, 3 deletions
diff --git a/gammu/emb/common/service/sms/gsmmulti.c b/gammu/emb/common/service/sms/gsmmulti.c
index 6c1cdcd..bdb5ee9 100644
--- a/gammu/emb/common/service/sms/gsmmulti.c
+++ b/gammu/emb/common/service/sms/gsmmulti.c
@@ -478,24 +478,29 @@ GSM_Error GSM_EncodeMultiPartSMS(GSM_MultiPartSMSInfo *Info,
478 for (i=0;i<Info->Entries[0].Bitmap->Number;i++) { 478 for (i=0;i<Info->Entries[0].Bitmap->Number;i++) {
479 Buffer[Length++] = Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth; 479 Buffer[Length++] = Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth;
480 Buffer[Length++] = Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight; 480 Buffer[Length++] = Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight;
481 PHONE_EncodeBitmap(GSM_AlcatelBMMIPicture, Buffer+Length, &Info->Entries[0].Bitmap->Bitmap[i]); 481 PHONE_EncodeBitmap(GSM_AlcatelBMMIPicture, Buffer+Length, &Info->Entries[0].Bitmap->Bitmap[i]);
482 Length += PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight); 482 Length += PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight);
483 } 483 }
484 return GSM_EncodeAlcatelMultiPartSMS(SMS,Buffer,Length,Info->Entries[0].Bitmap->Bitmap[0].Text,ALCATELTDD_ANIMATION); 484 return GSM_EncodeAlcatelMultiPartSMS(SMS,Buffer,Length,Info->Entries[0].Bitmap->Bitmap[0].Text,ALCATELTDD_ANIMATION);
485 case SMS_MMSIndicatorLong: 485 case SMS_MMSIndicatorLong:
486 Class= 1; 486 Class= 1;
487 UDH= UDH_MMSIndicatorLong; 487 UDH= UDH_MMSIndicatorLong;
488 GSM_EncodeMMSIndicatorSMSText(Buffer,&Length,*Info->Entries[0].MMSIndicator); 488 GSM_EncodeMMSIndicatorSMSText(Buffer,&Length,*Info->Entries[0].MMSIndicator);
489 break; 489 break;
490 case SMS_WAPIndicatorLong:
491 Class= 1;
492 UDH= UDH_MMSIndicatorLong;
493 GSM_EncodeWAPIndicatorSMSText(Buffer,&Length,Info->Entries[0].MMSIndicator->Title,Info->Entries[0].MMSIndicator->Address);
494 break;
490 case SMS_NokiaRingtoneLong: 495 case SMS_NokiaRingtoneLong:
491 case SMS_NokiaRingtone: 496 case SMS_NokiaRingtone:
492 UDH= UDH_NokiaRingtone; 497 UDH= UDH_NokiaRingtone;
493 Class= 1; 498 Class= 1;
494 /* 7 = length of UDH_NokiaRingtone UDH header */ 499 /* 7 = length of UDH_NokiaRingtone UDH header */
495 Length = GSM_MAX_8BIT_SMS_LENGTH-7; 500 Length = GSM_MAX_8BIT_SMS_LENGTH-7;
496 Info->Entries[0].RingtoneNotes = GSM_EncodeNokiaRTTLRingtone(*Info->Entries[0].Ringtone,Buffer,&Length); 501 Info->Entries[0].RingtoneNotes = GSM_EncodeNokiaRTTLRingtone(*Info->Entries[0].Ringtone,Buffer,&Length);
497 if (Info->Entries[0].ID == SMS_NokiaRingtone) break; 502 if (Info->Entries[0].ID == SMS_NokiaRingtone) break;
498 if (Info->Entries[0].RingtoneNotes != Info->Entries[0].Ringtone->NoteTone.NrCommands) { 503 if (Info->Entries[0].RingtoneNotes != Info->Entries[0].Ringtone->NoteTone.NrCommands) {
499 UDH = UDH_NokiaRingtoneLong; 504 UDH = UDH_NokiaRingtoneLong;
500 Length = (GSM_MAX_8BIT_SMS_LENGTH-12)*3; 505 Length = (GSM_MAX_8BIT_SMS_LENGTH-12)*3;
501 Info->Entries[0].RingtoneNotes = GSM_EncodeNokiaRTTLRingtone(*Info->Entries[0].Ringtone,Buffer,&Length); 506 Info->Entries[0].RingtoneNotes = GSM_EncodeNokiaRTTLRingtone(*Info->Entries[0].Ringtone,Buffer,&Length);
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,17 +1,21 @@
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
@@ -163,42 +167,43 @@ typedef enum {
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
204typedef struct { 209typedef struct {
@@ -255,17 +260,21 @@ bool GSM_DecodeMultiPartSMS (GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SM
255void GSM_ClearMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); 260void 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 */
260void GSM_FreeMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info); 265void 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 */
265GSM_Error GSM_LinkSMS(GSM_MultiSMSMessage **INPUT, GSM_MultiSMSMessage **OUTPUT, bool ems); 270GSM_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 */
diff --git a/gammu/emb/common/service/sms/gsmsms.c b/gammu/emb/common/service/sms/gsmsms.c
index 9920835..feceba4 100644
--- a/gammu/emb/common/service/sms/gsmsms.c
+++ b/gammu/emb/common/service/sms/gsmsms.c
@@ -1,14 +1,17 @@
1/* (c) 2001-2004 by Marcin Wiacek */ 1/* (c) 2001-2004 by Marcin Wiacek */
2/* based on some work from Pawel Kot, others and Gnokii */ 2/* Based on some Pawel Kot and others work from Gnokii (www.gnokii.org)
3 * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
4 * GNU GPL version 2 or later
5 */
3 6
4#include <ctype.h> 7#include <ctype.h>
5#include <string.h> 8#include <string.h>
6#include <time.h> 9#include <time.h>
7 10
8#include "../../gsmcomon.h" 11#include "../../gsmcomon.h"
9#include "../../misc/coding/coding.h" 12#include "../../misc/coding/coding.h"
10#include "../gsmcal.h" 13#include "../gsmcal.h"
11#include "../gsmpbk.h" 14#include "../gsmpbk.h"
12#include "../gsmlogo.h" 15#include "../gsmlogo.h"
13#include "../gsmring.h" 16#include "../gsmring.h"
14#include "../gsmdata.h" 17#include "../gsmdata.h"
diff --git a/gammu/emb/common/service/sms/gsmsms.h b/gammu/emb/common/service/sms/gsmsms.h
index d87ff60..0b950d3 100644
--- a/gammu/emb/common/service/sms/gsmsms.h
+++ b/gammu/emb/common/service/sms/gsmsms.h
@@ -1,14 +1,17 @@
1/* (c) 2001-2004 by Marcin Wiacek */ 1/* (c) 2001-2004 by Marcin Wiacek */
2/* based on some work from Pawel Kot, others and Gnokii */ 2/* Based on some Pawel Kot and others work from Gnokii (www.gnokii.org)
3 * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
4 * GNU GPL version 2 or later
5 */
3 6
4#ifndef __gsm_sms_h 7#ifndef __gsm_sms_h
5#define __gsm_sms_h 8#define __gsm_sms_h
6 9
7#include "../../gsmcomon.h" 10#include "../../gsmcomon.h"
8#include "../gsmlogo.h" 11#include "../gsmlogo.h"
9#include "../gsmcal.h" 12#include "../gsmcal.h"
10#include "../gsmpbk.h" 13#include "../gsmpbk.h"
11#include "../gsmdata.h" 14#include "../gsmdata.h"
12#include "../gsmring.h" 15#include "../gsmring.h"
13 16
14/* --------------------- Some general definitions ------------------------- */ 17/* --------------------- Some general definitions ------------------------- */