11 #include "../gsmring.h" 12 #include "../gsmlogo.h" 13 #include "../../misc/coding/coding.h" 14 #include "../../debug.h" 16 #include "../gsmdata.h" 17 #include "../gsmnet.h" 29 case 2:
case 7: retval = retval + 60;
break;
30 case 4:
case 8: retval = retval + 120;
break;
31 case 9:
case 5:
case 0: retval = retval + 180;
break;
44 UsedBytes = *UsedText * 7 / 8;
45 if (UsedBytes * 8 / 7 != *UsedText) UsedBytes++;
51 UsedBytes = *UsedText * 2;
53 *FreeText = *FreeBytes / 2;
56 *UsedText = UsedBytes = SMS->
Length;
58 *FreeText = *FreeBytes;
63 smfprintf(di,
"UDH len %i, UsedBytes %ld, FreeText %ld, UsedText %ld, FreeBytes %ld\n",
73 size_t offset = character_index * 2;
76 (
unsigned int) ((
unsigned char) Buffer[offset] << 8)
77 + (
unsigned char) Buffer[offset + 1]
107 if (n >= 0xd800 && n <= 0xdbff) {
127 if (*Copy <= 1 || *Copy >= BufferLen) {
147 if ((n >= 0xfe20 && n <= 0xfe2f) ||
148 (n >= 0x300 && n <= 0x36f) || (n >= 0x1ab0 && n <= 0x1aff) ||
149 (n >= 0x1dc0 && n <= 0x1dff) || (n >= 0x20d0 && n <= 0x20ff)) {
163 unsigned int l1, l2, r1, r2;
172 if (*Copy <= 2 || (*Copy + 2) >= BufferLen) {
188 if (l1 == 0xd83c && r1 == 0xd83c &&
189 l2 >= 0xdde6 && l2 <= 0xddff && r2 >= 0xdde6 && r2 <= 0xddff) {
220 size_t *CopiedSMSText)
222 size_t FreeText=0,FreeBytes=0,Copy,i,j;
227 UsedText, &FreeText, &FreeBytes
232 if (FreeBytes - BufferLen <= 0) {
237 UsedText, &FreeText, &FreeBytes
248 smfprintf(di,
"UDH added %ld\n", (
long)BufferLen);
256 UsedText, &FreeText, &FreeBytes
261 smfprintf(di,
"Copy %ld (max %ld)\n", (
long)Copy, (
long)BufferLen);
262 if (BufferLen < Copy) {
269 smfprintf(di,
"Defalt text, length %ld %ld\n", (
long)i, (
long)j);
282 *CopiedText = *CopiedSMSText = Copy;
288 *CopiedText = *CopiedSMSText = Copy;
299 UsedText, &FreeText, &FreeBytes
306 unsigned char *MessageBuffer,
307 size_t MessageLength,
311 unsigned char ReplaceMessage)
313 size_t Len,UsedText = 0,CopiedText = 0,CopiedSMSText = 0;
331 GSM_AddSMS_Text_UDH(di, SMS,Coding,MessageBuffer+Len,MessageLength - Len,
FALSE,&UsedText,&CopiedText,&CopiedSMSText);
333 GSM_AddSMS_Text_UDH(di, SMS,Coding,MessageBuffer+Len*2,MessageLength - Len,
FALSE,&UsedText,&CopiedText,&CopiedSMSText);
336 smfprintf(di,
"%ld %ld\n", (
long)Len, (
long)MessageLength);
338 if (Len == MessageLength)
break;
343 for (j=0;j<SMS->
Number;j++) {
356 unsigned char *MessageBuffer,
362 size_t UsedText=0,FreeBytes=0;
368 di, Coding, &(MultiSMS.
SMS[MultiSMS.
Number-1]),
369 &UsedText, CharsLeft, &FreeBytes
371 *SMSNum = MultiSMS.
Number;
376 char *Buffer,
size_t *Length)
381 Buffer[(*Length)++] = 0x30;
387 Buffer[(*Length)++] = 0x00;
396 Buffer[(*Length)++] = 0x01;
397 Buffer[(*Length)++] = 0x00;
403 Buffer[(*Length)-2] = len / 256;
404 Buffer[(*Length)-1] = len % 256;
405 *Length = *Length + len;
414 Buffer[(*Length)++] = 0x01;
415 Buffer[(*Length)++] = 0x00;
421 Buffer[(*Length)++] = 0x00;
428 Buffer[(*Length)++] = 0x00;
444 unsigned char buff[100],UDHID;
478 if (Len - p < i) i = Len - p;
489 for (i = 0; i < (size_t)SMS->
Number; i++) {
504 unsigned char *Buffer;
505 unsigned char *Buffer2;
507 int i, Class = -1, j;
509 size_t Length = 0, smslen;
519 Buffer = malloc(buffer_size);
520 if (Buffer == NULL) {
523 Buffer2 = malloc(buffer_size);
524 if (Buffer2 == NULL) {
532 Buffer[Length++] = 0x00;
547 Buffer[Length++] = 0x01;
548 Buffer[Length++] = 1 % 256;
549 Buffer[Length++] = 1 / 256;
554 Buffer[Length++] = 0x02;
555 Buffer[Length++] = 1 % 256;
556 Buffer[Length++] = 1 / 256;
563 Buffer[Length++] = 0x00;
566 Buffer[Length-2] = smslen % 256;
567 Buffer[Length-1] = smslen / 256;
568 Length = Length + smslen;
575 Buffer[0] = Buffer[0] * 2;
608 if (textnum > 1) EMS =
TRUE;
658 Buffer[2] = 10 % 256;
659 Buffer[3] = 10 / 256 + 0xF0;
759 memcpy(Buffer2,Buffer,Length);
769 memcpy(Buffer2,Buffer,Length);
779 memcpy(Buffer2,Buffer,Length);
789 memcpy(Buffer2,Buffer,Length);
800 sprintf(Buffer,
"//SCKE4 ");
805 memcpy(Buffer2,Buffer,Length);
815 memcpy(Buffer2,Buffer,Length);
838 UDHHeader.
Type = UDH;
844 if (Length > (
size_t)(140 - UDHHeader.
Length) / 2) {
845 Length = (140 - UDHHeader.
Length) / 2;
860 smfprintf(di,
"Info->Entries[0].Buffer:\n");
870 smfprintf(di,
"Setting to Unicode %ld\n", (
long)smslen);
985 int i, Length = 0, j;
989 for (i = 0; i < SMS->
Number; i++) {
1002 dbgprintf(di,
"MMS data of length %d:\n", Length);
1018 if (Buffer[1] != 0x06) {
1019 dbgprintf(di,
"Unsupported transaction id: 0x%02x\n", Buffer[1]);
1023 for (i = 3 + Buffer[2]; i < Length; i++) {
1028 if (Buffer[i] != 0x82) {
1029 dbgprintf(di,
"Unsupported transaction type: 0x%02x\n", Buffer[i]);
1035 while (Buffer[i] != 0 && i < Length) i++;
1040 if (Buffer[i] < 0x90 || Buffer[i] > 0x92) {
1041 dbgprintf(di,
"Unsupported MMS version: 0x%02x\n", Buffer[i]);
1048 if (Buffer[i] == 0)
continue;
1049 if (Buffer[i + 1] == 0x80) {
1050 if (Buffer[i + 2] < 32) {
1061 if (Buffer[i + 1] == 0x0a && Buffer[i + 2] == 0xea) {
1073 switch (Buffer[i]) {
1087 dbgprintf(di,
"Unsupported MMS class: 0x%02x\n", Buffer[i]);
1094 for (j = i + 1; j < i + 1 + Buffer[i]; j++) {
1115 dbgprintf(di,
"Unknown MMS tag: 0x%02x\n", Buffer[i]);
1133 for (i=0;i<SMS->
Number;i++) {
1150 while (i < Length) {
1151 switch (Buffer[i]) {
1159 smfprintf(di,
"OTA bitmap as Picture Image\n");
1178 smfprintf(di,
"OTA bitmap as Screen Saver\n");
1189 i = i + Buffer[i+1]*256 + Buffer[i+2] + 3;
1190 smfprintf(di,
"Profile: pos=%i length=%i\n", i, Length);
1193 while (i < Length) {
1194 switch (Buffer[i]) {
1208 smfprintf(di,
"OTA bitmap as Picture Image\n");
1217 smfprintf(di,
"OTA bitmap as Screen Saver\n");
1220 i = i + Buffer[i+1]*256 + Buffer[i+2] + 3;
1221 smfprintf(di,
"Profile: pos=%i length=%i\n", i, Length);
1241 for (i=0;i<SMS->
Number;i++) {
1288 for (i=0;i<SMS->
Number;i++) {
1309 for (i=0;i<SMS->
Number;i++) {
1398 int i,OutputMessagesNum,z,w,m,p;
1403 while (InputMessages[i] != NULL) i++;
1405 OutputMessagesNum = 0;
1406 OutputMessages[0] = NULL;
1412 InputMessagesSorted = calloc(i,
sizeof(
gboolean));
1416 for (i = 0; InputMessages[i] != NULL; i++) {
1417 if (InputMessages[i]->SMS[0].UDH.Type ==
UDH_UserUDH) {
1419 while (w < InputMessages[i]->SMS[0].UDH.Length) {
1420 switch(InputMessages[i]->SMS[0].UDH.Text[w]) {
1422 smfprintf(di,
"Adding ID to user UDH - linked SMS with 8 bit ID\n");
1429 smfprintf(di,
"Adding ID to user UDH - linked SMS with 16 bit ID\n");
1436 smfprintf(di,
"Block %02x\n",InputMessages[i]->SMS[0].UDH.Text[w]);
1438 smfprintf(di,
"id8: %i, id16: %i, part: %i, parts count: %i\n",
1439 InputMessages[i]->SMS[0].UDH.ID8bit,
1443 w=w+InputMessages[i]->
SMS[0].
UDH.
Text[w+1]+2;
1450 while (InputMessages[i]!=NULL) {
1452 if (InputMessagesSorted[i]) {
1462 if (OutputMessages[OutputMessagesNum] == NULL) {
1463 free(InputMessagesSorted);
1464 InputMessagesSorted=NULL;
1467 OutputMessages[OutputMessagesNum+1] = NULL;
1469 memcpy(&OutputMessages[OutputMessagesNum]->SMS[0],&InputMessages[i]->SMS[0],
sizeof(
GSM_SMSMessage));
1470 OutputMessages[OutputMessagesNum]->
Number = 1;
1471 InputMessagesSorted[i] =
TRUE;
1476 while(InputMessages[z]!=NULL) {
1478 if (InputMessagesSorted[z] || InputMessages[z]->Number != 1) {
1495 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver &&
1500 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver &&
1501 InputMessages[z]->SMS[0].OtherNumbersNum!=InputMessages[i]->SMS[0].OtherNumbersNum) {
1505 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver) {
1507 OtherNumbers[m]=
FALSE;
1512 if (OtherNumbers[p])
continue;
1514 OtherNumbers[0]=
TRUE;
1519 OtherNumbers[p]=
TRUE;
1524 OtherNumbers[0]=
TRUE;
1529 OtherNumbers[p]=
TRUE;
1542 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver &&
1545 (InputMessages[z]->SMS[0].DateTime.Day != InputMessages[i]->
SMS[0].
DateTime.
Day ||
1554 smfprintf(di,
"Found Siemens SMS %i\n",j);
1556 memcpy(&OutputMessages[OutputMessagesNum]->SMS[j],&InputMessages[z]->SMS[0],
sizeof(
GSM_SMSMessage));
1557 OutputMessages[OutputMessagesNum]->
Number++;
1558 InputMessagesSorted[z]=
TRUE;
1562 if (OutputMessages[OutputMessagesNum]->Number==j) {
1568 OutputMessagesNum++;
1576 while (InputMessages[j]!=NULL) {
1577 if (InputMessagesSorted[j]) {
1590 if (InputMessages[j]==NULL) {
1592 if (OutputMessages[OutputMessagesNum] == NULL) {
1593 free(InputMessagesSorted);
1594 InputMessagesSorted=NULL;
1597 OutputMessages[OutputMessagesNum+1] = NULL;
1600 InputMessagesSorted[i]=
TRUE;
1601 OutputMessagesNum++;
1612 if (InputMessages[i]->Number != 1 ||
1613 InputMessages[i]->SMS[0].UDH.Type ==
UDH_NoUDH ||
1618 if (InputMessages[i]->SMS[0].UDH.Type ==
UDH_UserUDH) {
1619 if (!ems) copyit =
TRUE;
1620 if (ems && InputMessages[i]->SMS[0].UDH.PartNumber == -1) copyit =
TRUE;
1624 if (OutputMessages[OutputMessagesNum] == NULL) {
1625 free(InputMessagesSorted);
1626 InputMessagesSorted=NULL;
1629 OutputMessages[OutputMessagesNum+1] = NULL;
1632 InputMessagesSorted[i]=
TRUE;
1633 OutputMessagesNum++;
1640 if (InputMessages[i]->SMS[0].UDH.PartNumber == 1) {
1642 if (OutputMessages[OutputMessagesNum] == NULL) {
1643 free(InputMessagesSorted);
1644 InputMessagesSorted=NULL;
1647 OutputMessages[OutputMessagesNum+1] = NULL;
1649 memcpy(&OutputMessages[OutputMessagesNum]->SMS[0],&InputMessages[i]->SMS[0],
sizeof(
GSM_SMSMessage));
1650 OutputMessages[OutputMessagesNum]->
Number = 1;
1651 InputMessagesSorted[i] =
TRUE;
1654 while (j != InputMessages[i]->SMS[0].UDH.AllParts) {
1656 while(InputMessages[z]!=NULL) {
1658 if (InputMessagesSorted[z] || InputMessages[z]->Number != 1) {
1668 if (InputMessages[z]->SMS[0].UDH.Type != InputMessages[i]->
SMS[0].
UDH.
Type) {
1673 if (!ems && InputMessages[z]->SMS[0].UDH.Type != InputMessages[i]->
SMS[0].
UDH.
Type) {
1679 InputMessages[i]->SMS[0].UDH.ID8bit,
1684 InputMessages[z]->SMS[0].UDH.ID8bit,
1688 if (InputMessages[z]->SMS[0].UDH.ID8bit != InputMessages[i]->
SMS[0].
UDH.
ID8bit ||
1696 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver &&
1701 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver &&
1702 InputMessages[z]->SMS[0].OtherNumbersNum!=InputMessages[i]->SMS[0].OtherNumbersNum) {
1706 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver) {
1708 OtherNumbers[m]=
FALSE;
1713 if (OtherNumbers[p])
continue;
1715 OtherNumbers[0]=
TRUE;
1720 OtherNumbers[p]=
TRUE;
1725 OtherNumbers[0]=
TRUE;
1730 OtherNumbers[p]=
TRUE;
1743 if (InputMessages[z]->SMS[0].PDU ==
SMS_Deliver &&
1746 (InputMessages[z]->SMS[0].DateTime.Day != InputMessages[i]->
SMS[0].
DateTime.
Day ||
1756 memcpy(&OutputMessages[OutputMessagesNum]->SMS[j],&InputMessages[z]->SMS[0],
sizeof(
GSM_SMSMessage));
1757 OutputMessages[OutputMessagesNum]->
Number++;
1758 InputMessagesSorted[z]=
TRUE;
1762 if (OutputMessages[OutputMessagesNum]->Number==j) {
1768 OutputMessagesNum++;
1773 if (InputMessages[i]->SMS[0].UDH.PartNumber > 1) {
1775 while (InputMessages[j]!=NULL) {
1776 if (InputMessagesSorted[j]) {
1783 if (InputMessages[j]->SMS[0].UDH.PartNumber == 1)
break;
1786 if (InputMessages[j]==NULL) {
1788 if (OutputMessages[OutputMessagesNum] == NULL) {
1789 free(InputMessagesSorted);
1790 InputMessagesSorted=NULL;
1793 OutputMessages[OutputMessagesNum+1] = NULL;
1796 InputMessagesSorted[i]=
TRUE;
1797 OutputMessagesNum++;
1803 free(InputMessagesSorted);
1804 InputMessagesSorted=NULL;
GSM_Error GSM_EncodeEMSMultiPartSMS(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS, GSM_UDH UDHType)
GSM_Error GSM_EncodeVCALENDAR(char *Buffer, const size_t buff_len, size_t *Length, GSM_CalendarEntry *note, const gboolean header, const GSM_VCalendarVersion Version)
unsigned int ReassembleCharacter(char *Buffer, size_t character_index)
gboolean GSM_DecodeMultiPartSMS(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS, gboolean ems)
unsigned char Name[2 *(GSM_MAX_FILENAME_LENGTH+1)]
GSM_MemoryEntry * Phonebook
unsigned char Text[(GSM_MAX_SMS_LENGTH+1) *2]
gboolean GSM_DecodeMMSIndication(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS)
GSM_Error GSM_EncodeVCARD(GSM_Debug_Info *di, char *Buffer, const size_t buff_len, size_t *Length, GSM_MemoryEntry *pbk, const gboolean header, const GSM_VCardVersion Version)
char * DecodeUnicodeString(const unsigned char *src)
void DumpMessage(GSM_Debug_Info *d, const unsigned char *message, const size_t messagesize)
size_t PHONE_GetBitmapSize(GSM_Phone_Bitmap_Types Type, size_t Width, size_t Height)
GSM_Error GSM_AddSMS_Text_UDH(GSM_Debug_Info *di, GSM_MultiSMSMessage *SMS, GSM_Coding_Type Coding, char *Buffer, size_t BufferLen, gboolean UDH, size_t *UsedText, size_t *CopiedText, size_t *CopiedSMSText)
void CopyUnicodeString(unsigned char *Dest, const unsigned char *Source)
GSM_WAPSettings * Settings
void DecodeDefault(unsigned char *dest, const unsigned char *src, size_t len, gboolean UseExtensions, unsigned char *ExtraAlphabet)
unsigned char ReplaceMessage
void FindDefaultAlphabetLen(const unsigned char *src, size_t *srclen, size_t *smslen, size_t maxlen)
unsigned char ReplaceMessage
void GSM_EncodeMMSIndicatorSMSText(unsigned char *Buffer, size_t *Length, GSM_MMSIndicator *Indicator)
#define GSM_MAX_SMS_CHARS_LENGTH
GSM_MMSIndicator * MMSIndicator
void GSM_SMSCounter(GSM_Debug_Info *di, unsigned char *MessageBuffer, GSM_UDH UDHType, GSM_Coding_Type Coding, int *SMSNum, size_t *CharsLeft)
int GSM_PackSevenBitsToEight(size_t offset, const unsigned char *input, unsigned char *output, size_t length)
void PHONE_EncodeBitmap(GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap)
void NOKIA_EncodeWAPMMSSettingsSMSText(unsigned char *Buffer, size_t *Length, GSM_WAPSettings *settings, gboolean MMS)
void GSM_SetDefaultSMSData(GSM_SMSMessage *SMS)
size_t UnicodeLength(const unsigned char *str)
int AlignIfCombinedSurrogate(GSM_Debug_Info *di, size_t *Copy, char *Buffer, size_t BufferLen)
void PHONE_DecodeBitmap(GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap)
unsigned char DataName[40]
void NOKIA_EncodeWAPBookmarkSMSText(unsigned char *Buffer, size_t *Length, GSM_WAPBookmark *bookmark)
GSM_MultiPartSMSEntry Entries[GSM_MAX_MULTI_SMS]
#define ALCATELTDD_ANIMATION
unsigned char GSM_EncodeNokiaRTTLRingtone(GSM_Ringtone *ringtone, unsigned char *package, size_t *maxlength)
int AlignSegmentForContent(GSM_Debug_Info *di, size_t *Copy, char *Buffer, size_t BufferLen)
#define GSM_MAX_SMS_LENGTH
#define GSM_MAX_8BIT_SMS_LENGTH
GSM_NoteRingtone NoteTone
void GSM_Find_Free_Used_SMS2(GSM_Debug_Info *di, GSM_Coding_Type Coding, GSM_SMSMessage *SMS, size_t *UsedText, size_t *FreeText, size_t *FreeBytes)
void NOKIA_CopyBitmap(GSM_Phone_Bitmap_Types Type, GSM_Bitmap *Bitmap, char *Buffer, size_t *Length)
gboolean GSM_DecodeSiemensOTASMS(GSM_Debug_Info *di, GSM_SiemensOTASMSInfo *Info, GSM_SMSMessage *SMS)
void NOKIA_DecodeNetworkCode(const unsigned char *buffer, char *output)
void GSM_MakeMultiPartSMS(GSM_Debug_Info *di, GSM_MultiSMSMessage *SMS, unsigned char *MessageBuffer, size_t MessageLength, GSM_UDH UDHType, GSM_Coding_Type Coding, int Class, unsigned char ReplaceMessage)
#define GSM_SMS_OTHER_NUMBERS
void GSM_PrintBitmap(FILE *file, GSM_Bitmap *bitmap)
void GSM_ClearMultiPartSMSInfo(GSM_MultiPartSMSInfo *Info)
void GSM_FreeMultiPartSMSInfo(GSM_MultiPartSMSInfo *Info)
void EncodeUnicode(unsigned char *dest, const char *src, size_t len)
GSM_Error GSM_EncodeVTODO(char *Buffer, const size_t buff_len, size_t *Length, const GSM_ToDoEntry *note, const gboolean header, const GSM_VToDoVersion Version)
gboolean GSM_DecodeEMSMultiPartSMS(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS)
int AlignIfCombinedCharacter(GSM_Debug_Info *di, size_t *Copy, char *Buffer, size_t BufferLen)
GSM_WAPBookmark * Bookmark
GSM_SMSMessage SMS[GSM_MAX_MULTI_SMS]
GSM_Error GSM_EncodeMultiPartSMS(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS)
GSM_Bitmap Bitmap[GSM_MAX_MULTI_BITMAP]
void GSM_EncodeWAPIndicatorSMSText(unsigned char *Buffer, size_t *Length, char *Text, char *URL)
#define GSM_MAX_MULTI_SMS
void NOKIA_EncodeNetworkCode(unsigned char *buffer, const char *input)
GSM_Error GSM_DecodeNokiaRTTLRingtone(GSM_Ringtone *ringtone, unsigned char *package, size_t maxlength UNUSED)
int AlignIfSurrogatePair(GSM_Debug_Info *di, size_t *Copy, char *Buffer, size_t BufferLen)
void GSM_GetCurrentDateTime(GSM_DateTime *Date)
int smfprintf(GSM_Debug_Info *d, const char *format,...)
#define ALCATELTDD_SMSTEMPLATE
void GSM_EncodeUDHHeader(GSM_Debug_Info *di, GSM_UDHHeader *UDH)
unsigned char GSM_MakeSMSIDFromTime(void)
unsigned char Text[2 *(GSM_BITMAP_TEXT_LENGTH+1)]
GSM_CalendarEntry * Calendar
gboolean GSM_DecodeNokiaProfile(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS)
#define ALCATELTDD_PICTURE
GSM_Error GSM_LinkSMS(GSM_Debug_Info *di, GSM_MultiSMSMessage **InputMessages, GSM_MultiSMSMessage **OutputMessages, gboolean ems)
void EncodeDefault(unsigned char *dest, const unsigned char *src, size_t *len, gboolean UseExtensions, unsigned char *ExtraAlphabet)
GSM_Error GSM_EncodeAlcatelMultiPartSMS(GSM_Debug_Info *di, GSM_MultiSMSMessage *SMS, unsigned char *Data, size_t Len, unsigned char *Name, size_t Type)
static void GSM_EncodeSMS30MultiPartSMS(GSM_MultiPartSMSInfo *Info, char *Buffer, size_t *Length)
gboolean GSM_DecodeLinkedText(GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS)
unsigned char DataType[10]