Diffstat (limited to 'gammu/emb/common/service/sms/gsmmulti.c') (more/less context) (show 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 @@ -442,96 +442,101 @@ GSM_Error GSM_EncodeMultiPartSMS(GSM_MultiPartSMSInfo *Info, return GSM_EncodeEMSMultiPartSMS(Info,SMS,UDH_ConcatenatedMessages); } } return GSM_EncodeEMSMultiPartSMS(Info,SMS,UDH_ConcatenatedMessages16bit); } return error; } if (Info->EntriesNum != 1) return ERR_UNKNOWN; switch (Info->Entries[0].ID) { case SMS_AlcatelMonoBitmapLong: Buffer[0] = Info->Entries[0].Bitmap->Bitmap[0].BitmapWidth; Buffer[1] = Info->Entries[0].Bitmap->Bitmap[0].BitmapHeight; PHONE_EncodeBitmap(GSM_AlcatelBMMIPicture, Buffer+2, &Info->Entries[0].Bitmap->Bitmap[0]); Length = PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[0].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[0].BitmapHeight)+2; return GSM_EncodeAlcatelMultiPartSMS(SMS,Buffer,Length,Info->Entries[0].Bitmap->Bitmap[0].Text,ALCATELTDD_PICTURE); case SMS_AlcatelMonoAnimationLong: /* Number of sequence words */ Buffer[0] = (Info->Entries[0].Bitmap->Number+1) % 256; Buffer[1] = (Info->Entries[0].Bitmap->Number+1) / 256; /* Picture display time 1 second (1 = 100ms) */ Buffer[2] = 10 % 256; Buffer[3] = 10 / 256 + 0xF0; Length = 4; j = 0; /* Offsets to bitmaps */ for (i=0;i<Info->Entries[0].Bitmap->Number;i++) { Buffer[Length++] = (4+j+Info->Entries[0].Bitmap->Number*2) % 256; Buffer[Length++] = (4+j+Info->Entries[0].Bitmap->Number*2) / 256; j += PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight)+2; } /* Bitmaps */ for (i=0;i<Info->Entries[0].Bitmap->Number;i++) { Buffer[Length++] = Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth; Buffer[Length++] = Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight; PHONE_EncodeBitmap(GSM_AlcatelBMMIPicture, Buffer+Length, &Info->Entries[0].Bitmap->Bitmap[i]); Length += PHONE_GetBitmapSize(GSM_AlcatelBMMIPicture,Info->Entries[0].Bitmap->Bitmap[i].BitmapWidth,Info->Entries[0].Bitmap->Bitmap[i].BitmapHeight); } return GSM_EncodeAlcatelMultiPartSMS(SMS,Buffer,Length,Info->Entries[0].Bitmap->Bitmap[0].Text,ALCATELTDD_ANIMATION); case SMS_MMSIndicatorLong: Class = 1; UDH = UDH_MMSIndicatorLong; GSM_EncodeMMSIndicatorSMSText(Buffer,&Length,*Info->Entries[0].MMSIndicator); break; + case SMS_WAPIndicatorLong: + Class = 1; + UDH = UDH_MMSIndicatorLong; + GSM_EncodeWAPIndicatorSMSText(Buffer,&Length,Info->Entries[0].MMSIndicator->Title,Info->Entries[0].MMSIndicator->Address); + break; case SMS_NokiaRingtoneLong: case SMS_NokiaRingtone: UDH = UDH_NokiaRingtone; Class = 1; /* 7 = length of UDH_NokiaRingtone UDH header */ Length = GSM_MAX_8BIT_SMS_LENGTH-7; Info->Entries[0].RingtoneNotes = GSM_EncodeNokiaRTTLRingtone(*Info->Entries[0].Ringtone,Buffer,&Length); if (Info->Entries[0].ID == SMS_NokiaRingtone) break; if (Info->Entries[0].RingtoneNotes != Info->Entries[0].Ringtone->NoteTone.NrCommands) { UDH = UDH_NokiaRingtoneLong; Length = (GSM_MAX_8BIT_SMS_LENGTH-12)*3; Info->Entries[0].RingtoneNotes = GSM_EncodeNokiaRTTLRingtone(*Info->Entries[0].Ringtone,Buffer,&Length); } break; case SMS_NokiaOperatorLogoLong: if (Info->Entries[0].Bitmap->Bitmap[0].BitmapWidth > 72 || Info->Entries[0].Bitmap->Bitmap[0].BitmapHeight > 14) { UDH = UDH_NokiaOperatorLogoLong; Class = 1; NOKIA_EncodeNetworkCode(Buffer, Info->Entries[0].Bitmap->Bitmap[0].NetworkCode); Length = Length + 3; NOKIA_CopyBitmap(GSM_Nokia7110OperatorLogo, &Info->Entries[0].Bitmap->Bitmap[0], Buffer, &Length); break; } case SMS_NokiaOperatorLogo: UDH = UDH_NokiaOperatorLogo; Class = 1; NOKIA_EncodeNetworkCode(Buffer, Info->Entries[0].Bitmap->Bitmap[0].NetworkCode); Length = Length + 3; NOKIA_CopyBitmap(GSM_NokiaOperatorLogo, &Info->Entries[0].Bitmap->Bitmap[0], Buffer, &Length); break; case SMS_NokiaCallerLogo: UDH = UDH_NokiaCallerLogo; Class = 1; NOKIA_CopyBitmap(GSM_NokiaCallerLogo, &Info->Entries[0].Bitmap->Bitmap[0], Buffer, &Length); break; case SMS_NokiaProfileLong: case SMS_NokiaPictureImageLong: case SMS_NokiaScreenSaverLong: Class = 1; UDH = UDH_NokiaProfileLong; GSM_EncodeSMS30MultiPartSMS(Info,Buffer,&Length); break; case SMS_NokiaWAPBookmarkLong: Class = 1; NOKIA_EncodeWAPBookmarkSMSText(Buffer,&Length,Info->Entries[0].Bookmark); /* 7 = length of UDH_NokiaWAP UDH header */ if (Length>(GSM_MAX_8BIT_SMS_LENGTH-7)) { UDH=UDH_NokiaWAPLong; |