Diffstat (limited to 'gammu/emb/common/service/sms/gsmmulti.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/service/sms/gsmmulti.c | 5 |
1 files changed, 5 insertions, 0 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 | |||
@@ -466,48 +466,53 @@ GSM_Error GSM_EncodeMultiPartSMS(GSM_MultiPartSMSInfo *Info, | |||
466 | 466 | ||
467 | Length = 4; | 467 | Length = 4; |
468 | j = 0; | 468 | j = 0; |
469 | 469 | ||
470 | /* Offsets to bitmaps */ | 470 | /* Offsets to bitmaps */ |
471 | for (i=0;i<Info->Entries[0].Bitmap->Number;i++) { | 471 | for (i=0;i<Info->Entries[0].Bitmap->Number;i++) { |
472 | Buffer[Length++] = (4+j+Info->Entries[0].Bitmap->Number*2) % 256; | 472 | Buffer[Length++] = (4+j+Info->Entries[0].Bitmap->Number*2) % 256; |
473 | Buffer[Length++] = (4+j+Info->Entries[0].Bitmap->Number*2) / 256; | 473 | Buffer[Length++] = (4+j+Info->Entries[0].Bitmap->Number*2) / 256; |
474 | j += PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight)+2; | 474 | j += PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight)+2; |
475 | } | 475 | } |
476 | 476 | ||
477 | /* Bitmaps */ | 477 | /* Bitmaps */ |
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); |
502 | } | 507 | } |
503 | break; | 508 | break; |
504 | case SMS_NokiaOperatorLogoLong: | 509 | case SMS_NokiaOperatorLogoLong: |
505 | if (Info->Entries[0].Bitmap->Bitmap[0].BitmapWidth > 72 || Info->Entries[0].Bitmap->Bitmap[0].BitmapHeight > 14) { | 510 | if (Info->Entries[0].Bitmap->Bitmap[0].BitmapWidth > 72 || Info->Entries[0].Bitmap->Bitmap[0].BitmapHeight > 14) { |
506 | UDH= UDH_NokiaOperatorLogoLong; | 511 | UDH= UDH_NokiaOperatorLogoLong; |
507 | Class = 1; | 512 | Class = 1; |
508 | NOKIA_EncodeNetworkCode(Buffer, Info->Entries[0].Bitmap->Bitmap[0].NetworkCode); | 513 | NOKIA_EncodeNetworkCode(Buffer, Info->Entries[0].Bitmap->Bitmap[0].NetworkCode); |
509 | Length = Length + 3; | 514 | Length = Length + 3; |
510 | NOKIA_CopyBitmap(GSM_Nokia7110OperatorLogo, &Info->Entries[0].Bitmap->Bitmap[0], Buffer, &Length); | 515 | NOKIA_CopyBitmap(GSM_Nokia7110OperatorLogo, &Info->Entries[0].Bitmap->Bitmap[0], Buffer, &Length); |
511 | break; | 516 | break; |
512 | } | 517 | } |
513 | case SMS_NokiaOperatorLogo: | 518 | case SMS_NokiaOperatorLogo: |