Gammu internals
1.38.0
|
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <gammu-unicode.h>
#include <gammu-debug.h>
#include "gsmmulti.h"
#include "../gsmring.h"
#include "../gsmlogo.h"
#include "../../misc/coding/coding.h"
#include "../../debug.h"
#include "gsmems.h"
#include "../gsmdata.h"
#include "../gsmnet.h"
Go to the source code of this file.
int AlignIfCombinedCharacter | ( | GSM_Debug_Info * | di, |
size_t * | Copy, | ||
char * | Buffer, | ||
size_t | BufferLen | ||
) |
Definition at line 115 of file gsmmulti.c.
References ReassembleCharacter().
Referenced by AlignSegmentForContent().
int AlignIfCombinedSurrogate | ( | GSM_Debug_Info * | di, |
size_t * | Copy, | ||
char * | Buffer, | ||
size_t | BufferLen | ||
) |
Definition at line 157 of file gsmmulti.c.
References ReassembleCharacter().
Referenced by AlignSegmentForContent().
int AlignIfSurrogatePair | ( | GSM_Debug_Info * | di, |
size_t * | Copy, | ||
char * | Buffer, | ||
size_t | BufferLen | ||
) |
Definition at line 81 of file gsmmulti.c.
References ReassembleCharacter().
Referenced by AlignSegmentForContent().
int AlignSegmentForContent | ( | GSM_Debug_Info * | di, |
size_t * | Copy, | ||
char * | Buffer, | ||
size_t | BufferLen | ||
) |
Definition at line 197 of file gsmmulti.c.
References AlignIfCombinedCharacter(), AlignIfCombinedSurrogate(), and AlignIfSurrogatePair().
Referenced by GSM_AddSMS_Text_UDH().
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 | ||
) |
Definition at line 212 of file gsmmulti.c.
References AlignSegmentForContent(), ERR_NONE, FindDefaultAlphabetLen(), GSM_Find_Free_Used_SMS2(), GSM_UDHHeader::Length, GSM_SMSMessage::Length, GSM_MultiSMSMessage::Number, smfprintf(), GSM_MultiSMSMessage::SMS, SMS_Coding_8bit, SMS_Coding_Default_No_Compression, SMS_Coding_Unicode_No_Compression, GSM_UDHHeader::Text, GSM_SMSMessage::Text, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_UserUDH, and UnicodeLength().
Referenced by GSM_EncodeEMSMultiPartSMS(), and GSM_MakeMultiPartSMS().
gboolean GSM_DecodeLinkedText | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS | ||
) |
Decodes long linked text SMS.
Definition at line 1229 of file gsmmulti.c.
References GSM_MultiPartSMSEntry::Buffer, GSM_SMSMessage::Coding, GSM_MultiPartSMSInfo::Entries, GSM_MultiPartSMSInfo::EntriesNum, FALSE, GSM_MultiPartSMSEntry::ID, GSM_SMSMessage::Length, GSM_MultiSMSMessage::Number, GSM_MultiSMSMessage::SMS, SMS_Coding_8bit, SMS_Coding_Default_No_Compression, SMS_Coding_Unicode_No_Compression, SMS_ConcatenatedAutoTextLong, SMS_ConcatenatedAutoTextLong16bit, SMS_ConcatenatedTextLong, SMS_ConcatenatedTextLong16bit, GSM_SMSMessage::Text, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_ConcatenatedMessages16bit, and UnicodeLength().
Referenced by GSM_DecodeMultiPartSMS().
gboolean GSM_DecodeMMSIndication | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS | ||
) |
Decodes long MMS notification SMS.
Definition at line 981 of file gsmmulti.c.
References GSM_MMSIndicator::Address, GSM_MMSIndicator::Class, dbgprintf, DumpMessage(), GSM_MultiPartSMSInfo::Entries, GSM_MultiPartSMSInfo::EntriesNum, FALSE, GSM_MAX_MULTI_SMS, GSM_MAX_SMS_LENGTH, GSM_MMS_Advertisement, GSM_MMS_Auto, GSM_MMS_Info, GSM_MMS_None, GSM_MMS_Personal, GSM_MultiPartSMSEntry::ID, GSM_SMSMessage::Length, GSM_MMSIndicator::MessageSize, GSM_MultiPartSMSEntry::MMSIndicator, GSM_MultiSMSMessage::Number, GSM_MMSIndicator::Sender, GSM_MultiSMSMessage::SMS, SMS_MMSIndicatorLong, GSM_UDHHeader::Text, GSM_SMSMessage::Text, GSM_MMSIndicator::Title, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_MMSIndicatorLong, and UDH_UserUDH.
Referenced by GSM_DecodeEMSMultiPartSMS(), and GSM_DecodeMultiPartSMS().
gboolean GSM_DecodeNokiaProfile | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS | ||
) |
Decodes long Nokia profile SMS.
Definition at line 1126 of file gsmmulti.c.
References GSM_MultiBitmap::Bitmap, GSM_MultiPartSMSEntry::Bitmap, DecodeUnicodeString(), _GSM_Debug_Info::df, _GSM_Debug_Info::dl, DL_TEXTALL, DL_TEXTALLDATE, EncodeUnicode(), GSM_MultiPartSMSInfo::Entries, GSM_MultiPartSMSInfo::EntriesNum, FALSE, GSM_MAX_MULTI_SMS, GSM_MAX_SMS_LENGTH, GSM_NokiaPictureImage, GSM_PrintBitmap(), GSM_MultiPartSMSEntry::ID, GSM_SMSMessage::Length, GSM_MultiBitmap::Number, GSM_MultiSMSMessage::Number, PHONE_DecodeBitmap(), SM30_ISOTEXT, SM30_OTA, SM30_PROFILENAME, SM30_RINGTONE, SM30_SCREENSAVER, SM30_UNICODETEXT, smfprintf(), GSM_MultiSMSMessage::SMS, SMS_NokiaPictureImageLong, SMS_NokiaProfileLong, SMS_NokiaScreenSaverLong, GSM_Bitmap::Text, GSM_UDHHeader::Text, GSM_SMSMessage::Text, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_NokiaProfileLong, and GSM_MultiPartSMSInfo::Unknown.
Referenced by GSM_DecodeMultiPartSMS().
GSM_Error GSM_EncodeAlcatelMultiPartSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiSMSMessage * | SMS, | ||
unsigned char * | Data, | ||
size_t | Len, | ||
unsigned char * | Name, | ||
size_t | Type | ||
) |
Definition at line 438 of file gsmmulti.c.
References GSM_SMSMessage::Class, GSM_SMSMessage::Coding, EncodeDefault(), ERR_NONE, GSM_EncodeUDHHeader(), GSM_MakeSMSIDFromTime(), GSM_MAX_MULTI_SMS, GSM_PackSevenBitsToEight(), GSM_SetDefaultSMSData(), GSM_UDHHeader::Length, GSM_SMSMessage::Length, GSM_MultiSMSMessage::Number, GSM_MultiSMSMessage::SMS, SMS_Coding_8bit, GSM_UDHHeader::Text, GSM_SMSMessage::Text, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_ConcatenatedMessages, UDH_UserUDH, and UnicodeLength().
Referenced by GSM_EncodeMultiPartSMS().
|
static |
Definition at line 375 of file gsmmulti.c.
References GSM_MultiBitmap::Bitmap, GSM_MultiPartSMSEntry::Bitmap, GSM_MultiPartSMSEntry::Buffer, CopyUnicodeString(), DecodeUnicodeString(), GSM_MultiPartSMSInfo::Entries, GSM_EncodeNokiaRTTLRingtone(), GSM_NokiaPictureImage, GSM_MultiPartSMSEntry::ID, NOKIA_CopyBitmap(), GSM_MultiPartSMSEntry::Ringtone, GSM_MultiPartSMSEntry::RingtoneNotes, SM30_ISOTEXT, SM30_OTA, SM30_PROFILENAME, SM30_RINGTONE, SM30_SCREENSAVER, SM30_UNICODETEXT, SMS_NokiaPictureImageLong, SMS_NokiaProfileLong, GSM_Bitmap::Text, GSM_MultiPartSMSInfo::UnicodeCoding, and UnicodeLength().
Referenced by GSM_EncodeMultiPartSMS().
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 | ||
) |
Definition at line 37 of file gsmmulti.c.
References FindDefaultAlphabetLen(), GSM_MAX_8BIT_SMS_LENGTH, GSM_UDHHeader::Length, GSM_SMSMessage::Length, smfprintf(), SMS_Coding_8bit, SMS_Coding_Default_No_Compression, SMS_Coding_Unicode_No_Compression, GSM_SMSMessage::Text, GSM_SMSMessage::UDH, and UnicodeLength().
Referenced by GSM_AddSMS_Text_UDH(), GSM_EncodeEMSMultiPartSMS(), and GSM_SMSCounter().
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 | ||
) |
Definition at line 305 of file gsmmulti.c.
References GSM_UDHHeader::AllParts, GSM_SMSMessage::Class, GSM_SMSMessage::Coding, FALSE, GSM_AddSMS_Text_UDH(), GSM_EncodeUDHHeader(), GSM_GetCurrentDateTime(), GSM_MakeSMSIDFromTime(), GSM_MAX_MULTI_SMS, GSM_SetDefaultSMSData(), GSM_DateTime::Hour, GSM_UDHHeader::ID16bit, GSM_UDHHeader::ID8bit, GSM_MultiSMSMessage::Number, GSM_UDHHeader::PartNumber, GSM_SMSMessage::ReplaceMessage, smfprintf(), GSM_MultiSMSMessage::SMS, SMS_Coding_8bit, GSM_UDHHeader::Type, and GSM_SMSMessage::UDH.
Referenced by GSM_EncodeMultiPartSMS(), and GSM_SMSCounter().
unsigned char GSM_MakeSMSIDFromTime | ( | void | ) |
Definition at line 21 of file gsmmulti.c.
References GSM_GetCurrentDateTime(), GSM_DateTime::Minute, and GSM_DateTime::Second.
Referenced by GSM_EncodeAlcatelMultiPartSMS(), GSM_EncodeEMSMultiPartSMS(), and GSM_MakeMultiPartSMS().
unsigned int ReassembleCharacter | ( | char * | Buffer, |
size_t | character_index | ||
) |
Definition at line 71 of file gsmmulti.c.
Referenced by AlignIfCombinedCharacter(), AlignIfCombinedSurrogate(), and AlignIfSurrogatePair().