Gammu internals
1.38.0
|
Data Structures | |
struct | GSM_SMSMemoryStatus |
struct | GSM_SMSValidity |
struct | GSM_SMSC |
struct | GSM_UDHHeader |
struct | GSM_SMSMessage |
struct | GSM_OneSMSFolder |
struct | GSM_SMSFolders |
struct | GSM_SiemensOTASMSInfo |
struct | GSM_MultiSMSMessage |
struct | GSM_MultiPartSMSEntry |
struct | GSM_MultiPartSMSInfo |
Variables | |
GSM_SMSMessageLayout | PHONE_SMSSubmit |
GSM_SMSMessageLayout | PHONE_SMSDeliver |
GSM_SMSMessageLayout | PHONE_SMSStatusReport |
SMS messages manipulations.
enum EncodeMultiPartSMSID |
ID during packing SMS for Smart Messaging 3.0, EMS and other
Definition at line 840 of file gammu-message.h.
enum GSM_Coding_Type |
Coding type of SMS.
Enumerator | |
---|---|
SMS_Coding_Unicode_No_Compression | Unicode |
SMS_Coding_Unicode_Compression | |
SMS_Coding_Default_No_Compression | Default GSM alphabet. |
SMS_Coding_Default_Compression | |
SMS_Coding_8bit | 8-bit. |
Definition at line 316 of file gammu-message.h.
enum GSM_SMS_State |
Status of SMS message.
Enumerator | |
---|---|
SMS_Sent | |
SMS_UnSent | |
SMS_Read | |
SMS_UnRead |
Definition at line 304 of file gammu-message.h.
enum GSM_SMSFormat |
Enum defines format of SMS messages. See GSM 03.40 section 9.2.3.9
Enumerator | |
---|---|
SMS_FORMAT_Pager | |
SMS_FORMAT_Fax | |
SMS_FORMAT_Email | |
SMS_FORMAT_Text |
Definition at line 218 of file gammu-message.h.
enum GSM_SMSMessageType |
TP-Message-Type-Indicator. See GSM 03.40 section 9.2.3.1.
Enumerator | |
---|---|
SMS_Deliver | SMS in Inbox. |
SMS_Status_Report | Delivery Report |
SMS_Submit | SMS for sending or in Outbox |
Definition at line 422 of file gammu-message.h.
enum GSM_UDH |
Types of UDH (User Data Header).
Definition at line 350 of file gammu-message.h.
enum GSM_ValidityPeriod |
Enum defines some the most often used validity lengths for SMS messages for relative validity format. See GSM 03.40 section 9.2.3.12.1 - it gives more values.
Enumerator | |
---|---|
SMS_VALID_1_Hour | |
SMS_VALID_6_Hours | |
SMS_VALID_1_Day | |
SMS_VALID_3_Days | |
SMS_VALID_1_Week | |
SMS_VALID_Max_Time |
Definition at line 233 of file gammu-message.h.
Enum defines format of validity period for SMS messages. See GSM 03.40 section 9.2.3.12
Enumerator | |
---|---|
SMS_Validity_NotAvailable | |
SMS_Validity_RelativeFormat |
Definition at line 248 of file gammu-message.h.
GSM_Error GSM_AddSMS | ( | GSM_StateMachine * | s, |
GSM_SMSMessage * | sms | ||
) |
Adds SMS to specified folder.
s | State machine pointer. | |
[in,out] | sms | SMS message data, location will be updated. |
Adds SMS to specified folder.
Definition at line 712 of file api.c.
References GSM_Phone_Functions::AddSMS, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_SMS_INFO.
GSM_Error GSM_AddSMSFolder | ( | GSM_StateMachine * | s, |
unsigned char * | name | ||
) |
Creates SMS folder.
s | State machine pointer. | |
[in] | name | Name of SMS folder which should be created. |
Creates SMS folder.
Definition at line 819 of file api.c.
References GSM_Phone_Functions::AddSMSFolder, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
void GSM_ClearMultiPartSMSInfo | ( | GSM_MultiPartSMSInfo * | Info | ) |
Clears GSM_MultiPartSMSInfo to default values.
Definition at line 915 of file gsmmulti.c.
References GSM_MultiPartSMSEntry::Bitmap, GSM_MultiPartSMSEntry::Bold, GSM_MultiPartSMSEntry::Bookmark, GSM_MultiPartSMSEntry::Buffer, GSM_MultiPartSMSEntry::Calendar, GSM_MultiPartSMSEntry::Center, GSM_MultiPartSMSInfo::Class, GSM_MultiPartSMSInfo::Entries, GSM_MultiPartSMSInfo::EntriesNum, FALSE, GSM_MultiPartSMSEntry::File, GSM_MAX_MULTI_SMS, GSM_MultiPartSMSEntry::Italic, GSM_MultiPartSMSEntry::Large, GSM_MultiPartSMSEntry::Left, GSM_MultiPartSMSEntry::MMSIndicator, GSM_MultiPartSMSEntry::Number, GSM_MultiPartSMSEntry::Phonebook, GSM_MultiPartSMSEntry::Protected, GSM_MultiPartSMSInfo::ReplaceMessage, GSM_MultiPartSMSEntry::Right, GSM_MultiPartSMSEntry::Ringtone, GSM_MultiPartSMSEntry::RingtoneNotes, GSM_MultiPartSMSEntry::Settings, GSM_MultiPartSMSEntry::Small, GSM_MultiPartSMSEntry::Strikethrough, GSM_MultiPartSMSEntry::ToDo, GSM_MultiPartSMSEntry::Underlined, GSM_MultiPartSMSInfo::UnicodeCoding, and GSM_MultiPartSMSInfo::Unknown.
Referenced by GSM_DecodeMultiPartSMS().
gboolean GSM_DecodeMultiPartSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS, | ||
gboolean | ems | ||
) |
Decodes multi part SMS to "readable" format.
Definition at line 1275 of file gsmmulti.c.
References GSM_SiemensOTASMSInfo::AllDataLen, GSM_MultiBitmap::Bitmap, GSM_MultiPartSMSEntry::Bitmap, GSM_File::Buffer, GSM_SiemensOTASMSInfo::Data, GSM_SiemensOTASMSInfo::DataLen, GSM_SiemensOTASMSInfo::DataName, _GSM_Debug_Info::df, _GSM_Debug_Info::dl, DL_TEXTALL, DL_TEXTALLDATE, EncodeUnicode(), GSM_MultiPartSMSInfo::Entries, GSM_MultiPartSMSInfo::EntriesNum, ERR_NONE, FALSE, GSM_MultiPartSMSEntry::File, GSM_ClearMultiPartSMSInfo(), GSM_DecodeEMSMultiPartSMS(), GSM_DecodeLinkedText(), GSM_DecodeMMSIndication(), GSM_DecodeNokiaProfile(), GSM_DecodeNokiaRTTLRingtone(), GSM_DecodeSiemensOTASMS(), GSM_NokiaCallerLogo, GSM_NokiaOperatorLogo, GSM_PrintBitmap(), GSM_MultiPartSMSEntry::ID, GSM_SMSMessage::Length, GSM_File::Name, GSM_Bitmap::NetworkCode, NOKIA_DecodeNetworkCode(), GSM_MultiBitmap::Number, GSM_MultiSMSMessage::Number, PHONE_DecodeBitmap(), GSM_MultiPartSMSEntry::Ringtone, GSM_MultiSMSMessage::SMS, SMS_NokiaCallerLogo, SMS_NokiaOperatorLogo, SMS_NokiaRingtone, SMS_NokiaVCALENDAR10Long, SMS_NokiaVCARD10Long, SMS_SiemensFile, GSM_SMSMessage::Text, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_ConcatenatedMessages, UDH_ConcatenatedMessages16bit, UDH_MMSIndicatorLong, UDH_NokiaCalendarLong, UDH_NokiaCallerLogo, UDH_NokiaOperatorLogo, UDH_NokiaPhonebookLong, UDH_NokiaProfileLong, UDH_NokiaRingtone, UDH_UserUDH, and GSM_File::Used.
GSM_Error GSM_DecodePDUFrame | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
const unsigned char * | buffer, | ||
size_t | length, | ||
size_t * | final_pos, | ||
gboolean | SMSC | ||
) |
Decodes PDU data.
di | Debug information structure. |
SMS | Pointer where to store parsed message. |
buffer | PDU data. |
length | Length of PDU data. |
final_pos | Optional pointer where end position will be stored. |
SMSC | Whether PDU includes SMSC data. |
Definition at line 508 of file gsmsms.c.
References GSM_SMSMessage::Class, GSM_SMSMessage::Coding, GSM_SMSMessage::DateTime, DecodeDefault(), DecodeUnicodeSpecialNOKIAChars(), DecodeUnicodeString(), DumpMessageText(), ERR_CORRUPTED, ERR_NONE, ERR_NOTSUPPORTED, ERR_UNKNOWN, FALSE, GSM_SMSValidity::Format, GSM_DecodeSMSDateTime(), GSM_DecodeSMSStatusReportData(), GSM_DecodeUDHHeader(), GSM_GetMessageCoding(), GSM_SetDefaultReceivedSMSData(), GSM_UnpackEightBitsToSeven(), GSM_UnpackSemiOctetNumber(), GSM_UDHHeader::Length, GSM_SMSMessage::Length, GSM_SMSMessage::MessageReference, GSM_SMSC::Number, GSM_SMSMessage::Number, GSM_SMSMessage::PDU, GSM_SMSValidity::Relative, GSM_SMSMessage::ReplaceMessage, smfprintf(), SMS_Coding_8bit, SMS_Coding_Default_Compression, SMS_Coding_Default_No_Compression, SMS_Coding_Unicode_Compression, SMS_Coding_Unicode_No_Compression, SMS_Deliver, SMS_Status_Report, SMS_Submit, SMS_Validity_RelativeFormat, GSM_SMSMessage::SMSC, GSM_SMSMessage::SMSCTime, GSM_UDHHeader::Text, GSM_SMSMessage::Text, TRUE, GSM_SMSMessage::UDH, and GSM_SMSC::Validity.
gboolean GSM_DecodeSiemensOTASMS | ( | GSM_Debug_Info * | di, |
GSM_SiemensOTASMSInfo * | Info, | ||
GSM_SMSMessage * | SMS | ||
) |
Decodes Siemens OTA data.
Definition at line 1202 of file gsmsms.c.
References GSM_SiemensOTASMSInfo::AllDataLen, GSM_SMSMessage::Class, GSM_SMSMessage::Coding, GSM_SiemensOTASMSInfo::Data, GSM_SiemensOTASMSInfo::DataLen, GSM_SiemensOTASMSInfo::DataName, GSM_SiemensOTASMSInfo::DataType, FALSE, GSM_SMSMessage::Length, GSM_SiemensOTASMSInfo::PacketNum, GSM_SiemensOTASMSInfo::PacketsNum, GSM_SMSMessage::PDU, GSM_SiemensOTASMSInfo::SequenceID, smfprintf(), SMS_Coding_8bit, SMS_Deliver, GSM_SMSMessage::Text, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, and UDH_NoUDH.
Referenced by GSM_DecodeMultiPartSMS(), and GSM_LinkSMS().
GSM_Error GSM_DecodeSMSFrame | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout | ||
) |
Decodes SMS frame.
Definition at line 807 of file gsmsms.c.
References GSM_SMSMessage::Class, GSM_SMSMessage::Coding, GSM_SMSMessage::DateTime, GSM_SMSMessageLayout::DateTime, DecodeUnicodeString(), ERR_NONE, ERR_UNKNOWN, FALSE, GSM_SMSMessageLayout::firstbyte, GSM_DecodeSMSDateTime(), GSM_DecodeSMSFrameStatusReportData(), GSM_DecodeSMSFrameText(), GSM_GetMessageCoding(), GSM_SetDefaultReceivedSMSData(), GSM_UnpackSemiOctetNumber(), GSM_SMSMessage::MessageReference, GSM_SMSC::Number, GSM_SMSMessage::Number, GSM_SMSMessageLayout::Number, GSM_SMSMessage::RejectDuplicates, GSM_SMSMessage::ReplaceMessage, GSM_SMSMessage::ReplyViaSameSMSC, smfprintf(), GSM_SMSMessage::SMSC, GSM_SMSMessageLayout::SMSCNumber, GSM_SMSMessage::SMSCTime, GSM_SMSMessageLayout::SMSCTime, GSM_SMSMessageLayout::Text, GSM_SMSMessageLayout::TPDCS, GSM_SMSMessageLayout::TPMR, GSM_SMSMessageLayout::TPPID, GSM_SMSMessageLayout::TPStatus, GSM_SMSMessageLayout::TPUDL, and TRUE.
GSM_Error GSM_DecodeSMSFrameStatusReportData | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout | ||
) |
Decodes SMS frame for status report.
Definition at line 503 of file gsmsms.c.
References GSM_DecodeSMSStatusReportData(), and GSM_SMSMessageLayout::TPStatus.
Referenced by GSM_DecodeSMSFrame().
GSM_Error GSM_DecodeSMSFrameText | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout | ||
) |
Decodes SMS frame in textual representation.
Definition at line 316 of file gsmsms.c.
References GSM_SMSMessage::Coding, DecodeDefault(), DecodeUnicodeSpecialNOKIAChars(), DecodeUnicodeString(), DumpMessageText(), ERR_CORRUPTED, ERR_NONE, GSM_SMSMessageLayout::firstbyte, GSM_DecodeUDHHeader(), GSM_UnpackEightBitsToSeven(), GSM_UDHHeader::Length, GSM_SMSMessage::Length, smfprintf(), SMS_Coding_8bit, SMS_Coding_Default_No_Compression, SMS_Coding_Unicode_No_Compression, GSM_UDHHeader::Text, GSM_SMSMessage::Text, GSM_SMSMessageLayout::Text, GSM_SMSMessageLayout::TPUDL, TRUE, and GSM_SMSMessage::UDH.
Referenced by GSM_DecodeSMSFrame().
void GSM_DecodeUDHHeader | ( | GSM_Debug_Info * | di, |
GSM_UDHHeader * | UDH | ||
) |
Decodes UDH header.
Definition at line 121 of file gsmsms.c.
References GSM_UDHHeader::AllParts, DumpMessageText(), FALSE, GSM_UDHHeader::ID16bit, GSM_UDHHeader::ID8bit, GSM_UDHHeader::Length, GSM_UDHHeader::PartNumber, smfprintf(), GSM_UDHHeader::Text, TRUE, GSM_UDHHeader::Type, UDH_ConcatenatedMessages, UDH_ConcatenatedMessages16bit, UDH_DisableEmail, UDH_DisableFax, UDH_DisableVoice, UDH_EnableEmail, UDH_EnableFax, UDH_EnableVoice, UDH_MMSIndicatorLong, UDH_NokiaCalendarLong, UDH_NokiaCallerLogo, UDH_NokiaOperatorLogo, UDH_NokiaOperatorLogoLong, UDH_NokiaPhonebookLong, UDH_NokiaProfileLong, UDH_NokiaRingtone, UDH_NokiaRingtoneLong, UDH_NokiaWAP, UDH_NokiaWAPLong, UDH_NoUDH, UDH_UserUDH, and UDH_VoidSMS.
Referenced by GSM_DecodePDUFrame(), and GSM_DecodeSMSFrameText().
GSM_Error GSM_DeleteSMS | ( | GSM_StateMachine * | s, |
GSM_SMSMessage * | sms | ||
) |
Deletes SMS.
s | State machine pointer. | |
[in] | sms | SMS structure with SMS location and folder. |
Deletes SMS.
Definition at line 726 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteSMS, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_SMS_INFO.
GSM_Error GSM_DeleteSMSFolder | ( | GSM_StateMachine * | s, |
int | ID | ||
) |
Deletes SMS folder.
s | State machine pointer. | |
[in] | ID | ID of SMS folder to delete. |
Deletes SMS folder.
Definition at line 832 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteSMSFolder, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_EncodeMultiPartSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS | ||
) |
Encodes multi part SMS from "readable" format.
Definition at line 500 of file gsmmulti.c.
References GSM_MMSIndicator::Address, ALCATELTDD_ANIMATION, ALCATELTDD_PICTURE, ALCATELTDD_SMSTEMPLATE, GSM_MultiBitmap::Bitmap, GSM_MultiPartSMSEntry::Bitmap, GSM_Bitmap::BitmapHeight, GSM_Bitmap::BitmapWidth, GSM_MultiPartSMSEntry::Bold, GSM_MultiPartSMSEntry::Bookmark, GSM_MultiPartSMSEntry::Buffer, GSM_MultiPartSMSEntry::Calendar, GSM_MultiPartSMSEntry::Center, GSM_MultiPartSMSInfo::Class, DecodeDefault(), _GSM_Debug_Info::dl, DL_TEXTALL, DL_TEXTALLDATE, DumpMessage(), EncodeDefault(), EncodeUnicode(), GSM_MultiPartSMSInfo::Entries, GSM_MultiPartSMSInfo::EntriesNum, ERR_EMPTY, ERR_MOREMEMORY, ERR_NONE, ERR_UNKNOWN, FALSE, FindDefaultAlphabetLen(), GSM_AlcatelBMMIPicture, GSM_EncodeAlcatelMultiPartSMS(), GSM_EncodeEMSMultiPartSMS(), GSM_EncodeMMSIndicatorSMSText(), GSM_EncodeNokiaRTTLRingtone(), GSM_EncodeSMS30MultiPartSMS(), GSM_EncodeUDHHeader(), GSM_EncodeVCALENDAR(), GSM_EncodeVCARD(), GSM_EncodeVTODO(), GSM_EncodeWAPIndicatorSMSText(), GSM_MakeMultiPartSMS(), GSM_MAX_8BIT_SMS_LENGTH, GSM_MAX_MULTI_SMS, GSM_MAX_SMS_CHARS_LENGTH, GSM_MAX_SMS_LENGTH, GSM_Nokia7110OperatorLogo, GSM_NokiaCallerLogo, GSM_NokiaOperatorLogo, GSM_PackSevenBitsToEight(), GSM_MultiPartSMSEntry::ID, GSM_MultiPartSMSEntry::Italic, GSM_MultiPartSMSEntry::Large, GSM_MultiPartSMSEntry::Left, GSM_UDHHeader::Length, GSM_MultiPartSMSEntry::MMSIndicator, GSM_Bitmap::NetworkCode, NOKIA_CopyBitmap(), NOKIA_EncodeNetworkCode(), NOKIA_EncodeWAPBookmarkSMSText(), NOKIA_EncodeWAPMMSSettingsSMSText(), Nokia_VCalendar, Nokia_VCard10, Nokia_VCard21, Nokia_VToDo, GSM_Ringtone::NoteTone, GSM_NoteRingtone::NrCommands, GSM_MultiBitmap::Number, GSM_MultiSMSMessage::Number, GSM_MultiPartSMSEntry::Number, PHONE_EncodeBitmap(), PHONE_GetBitmapSize(), GSM_MultiPartSMSEntry::Phonebook, GSM_MultiPartSMSInfo::ReplaceMessage, GSM_MultiPartSMSEntry::Right, GSM_MultiPartSMSEntry::Ringtone, GSM_MultiPartSMSEntry::RingtoneNotes, GSM_MultiPartSMSEntry::Settings, GSM_MultiPartSMSEntry::Small, smfprintf(), SMS_AlcatelMonoAnimationLong, SMS_AlcatelMonoBitmapLong, SMS_AlcatelSMSTemplateName, SMS_Coding_8bit, SMS_Coding_Default_No_Compression, SMS_Coding_Unicode_No_Compression, SMS_ConcatenatedAutoTextLong, SMS_ConcatenatedAutoTextLong16bit, SMS_ConcatenatedTextLong, SMS_ConcatenatedTextLong16bit, SMS_DisableEmail, SMS_DisableFax, SMS_DisableVoice, SMS_EMSAnimation, SMS_EMSFixedBitmap, SMS_EMSPredefinedAnimation, SMS_EMSPredefinedSound, SMS_EMSSonyEricssonSound, SMS_EMSSonyEricssonSoundLong, SMS_EMSSound10, SMS_EMSSound10Long, SMS_EMSSound12, SMS_EMSSound12Long, SMS_EMSVariableBitmap, SMS_EMSVariableBitmapLong, SMS_EnableEmail, SMS_EnableFax, SMS_EnableVoice, SMS_MMSIndicatorLong, SMS_NokiaCallerLogo, SMS_NokiaMMSSettingsLong, SMS_NokiaOperatorLogo, SMS_NokiaOperatorLogoLong, SMS_NokiaPictureImageLong, SMS_NokiaProfileLong, SMS_NokiaRingtone, SMS_NokiaRingtoneLong, SMS_NokiaScreenSaverLong, SMS_NokiaVCALENDAR10Long, SMS_NokiaVCARD10Long, SMS_NokiaVCARD21Long, SMS_NokiaVTODOLong, SMS_NokiaWAPBookmarkLong, SMS_NokiaWAPSettingsLong, SMS_Text, SMS_VCARD10Long, SMS_VCARD21Long, SMS_VoidSMS, SMS_WAPIndicatorLong, GSM_MultiPartSMSEntry::Strikethrough, GSM_Bitmap::Text, GSM_MMSIndicator::Title, GSM_MultiPartSMSEntry::ToDo, TRUE, GSM_UDHHeader::Type, UDH_ConcatenatedMessages, UDH_ConcatenatedMessages16bit, UDH_DisableEmail, UDH_DisableFax, UDH_DisableVoice, UDH_EnableEmail, UDH_EnableFax, UDH_EnableVoice, UDH_MMSIndicatorLong, UDH_NokiaCalendarLong, UDH_NokiaCallerLogo, UDH_NokiaOperatorLogo, UDH_NokiaOperatorLogoLong, UDH_NokiaPhonebookLong, UDH_NokiaProfileLong, UDH_NokiaRingtone, UDH_NokiaRingtoneLong, UDH_NokiaWAP, UDH_NokiaWAPLong, UDH_NoUDH, UDH_VoidSMS, GSM_MultiPartSMSEntry::Underlined, GSM_MultiPartSMSInfo::UnicodeCoding, and UnicodeLength().
GSM_Error GSM_EncodeSMSFrame | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout, | ||
int * | length, | ||
gboolean | clear | ||
) |
Encodes SMS frame.
Definition at line 1008 of file gsmsms.c.
References GSM_SMSMessage::Class, GSM_SMSMessage::DateTime, GSM_SMSMessageLayout::DateTime, DecodeUnicodeString(), ERR_NONE, FALSE, GSM_SMSMessageLayout::firstbyte, GSM_EncodeSMSDateTime(), GSM_EncodeSMSFrameText(), GSM_PackSemiOctetNumber(), GSM_SMSMessage::MessageReference, GSM_SMSC::Number, GSM_SMSMessage::Number, GSM_SMSMessageLayout::Number, GSM_SMSMessage::PDU, GSM_SMSMessage::RejectDuplicates, GSM_SMSValidity::Relative, GSM_SMSMessage::ReplaceMessage, GSM_SMSMessage::ReplyViaSameSMSC, smfprintf(), SMS_Deliver, SMS_Status_Report, SMS_Submit, GSM_SMSMessage::SMSC, GSM_SMSMessageLayout::SMSCNumber, GSM_SMSMessageLayout::Text, GSM_SMSMessageLayout::TPDCS, GSM_SMSMessageLayout::TPMR, GSM_SMSMessageLayout::TPPID, GSM_SMSMessageLayout::TPVP, TRUE, and GSM_SMSC::Validity.
Referenced by PHONE_EncodeSMSFrame().
void GSM_EncodeUDHHeader | ( | GSM_Debug_Info * | di, |
GSM_UDHHeader * | UDH | ||
) |
Encodes UDH header.
GSM 03.40 section 9.2.3.24
Definition at line 1151 of file gsmsms.c.
References GSM_UDHHeader::AllParts, GSM_UDHHeader::ID16bit, GSM_UDHHeader::ID8bit, GSM_UDHHeader::Length, GSM_UDHHeader::PartNumber, smfprintf(), GSM_UDHHeader::Text, TRUE, GSM_UDHHeader::Type, UDH_NoUDH, and UDH_UserUDH.
Referenced by GSM_EncodeAlcatelMultiPartSMS(), GSM_EncodeEMSMultiPartSMS(), GSM_EncodeMultiPartSMS(), and GSM_MakeMultiPartSMS().
void GSM_FreeMultiPartSMSInfo | ( | GSM_MultiPartSMSInfo * | Info | ) |
Frees any allocated structures inside GSM_MultiPartSMSInfo.
Definition at line 952 of file gsmmulti.c.
References GSM_MultiPartSMSEntry::Bitmap, GSM_MultiPartSMSEntry::Bookmark, GSM_MultiPartSMSEntry::Buffer, GSM_MultiPartSMSEntry::Calendar, GSM_MultiPartSMSInfo::Entries, GSM_MAX_MULTI_SMS, GSM_MultiPartSMSEntry::MMSIndicator, GSM_MultiPartSMSEntry::Phonebook, GSM_MultiPartSMSEntry::Ringtone, GSM_MultiPartSMSEntry::Settings, and GSM_MultiPartSMSEntry::ToDo.
GSM_Error GSM_GetNextSMS | ( | GSM_StateMachine * | s, |
GSM_MultiSMSMessage * | sms, | ||
gboolean | start | ||
) |
Reads next (or first if start set) SMS message. This might be faster for some phones than using GSM_GetSMS for each message.
Please note that this commend does not have to mark message as read in phone. To do so, you have to call GSM_GetSMS.
s | State machine pointer. | |
[in,out] | sms | SMS message data read from phone, for subsequent reads, location and folder might be used by phone driver to determine reading state. |
[in] | start | Whether we start reading from beginning. |
Reads next (or first if start set) SMS message. This might be faster for some phones than using GSM_GetSMS for each message.
Definition at line 683 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetNextSMS, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, PRINT_MSMS_INFO, and PRINT_START.
GSM_Error GSM_GetSMS | ( | GSM_StateMachine * | s, |
GSM_MultiSMSMessage * | sms | ||
) |
Reads SMS message.
s | State machine pointer. | |
[in,out] | sms | SMS message data read from phone, location and folder should be set. |
Reads SMS message.
Definition at line 668 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetSMS, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_MSMS_INFO.
GSM_Error GSM_GetSMSC | ( | GSM_StateMachine * | s, |
GSM_SMSC * | smsc | ||
) |
Gets SMS Service Center number and SMS settings.
s | State machine pointer. | |
[in,out] | smsc | SMSC structure, should contain location. |
Gets SMS Service Center number and SMS settings.
Definition at line 628 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetSMSC, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_GetSMSFolders | ( | GSM_StateMachine * | s, |
GSM_SMSFolders * | folders | ||
) |
Returns SMS folders information.
s | State machine pointer. | |
[out] | folders | folders Pointer to folders structure, which will be filled in. |
Returns SMS folders information.
Definition at line 806 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetSMSFolders, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_GetSMSStatus | ( | GSM_StateMachine * | s, |
GSM_SMSMemoryStatus * | status | ||
) |
Gets information about SMS memory (read/unread/size of memory for both SIM and phone).
s | State machine pointer. | |
[out] | status | Pointer to SMS status structure. |
Gets information about SMS memory (read/unread/size of memory for both SIM and phone).
Definition at line 655 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetSMSStatus, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_LinkSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiSMSMessage ** | INPUT, | ||
GSM_MultiSMSMessage ** | OUTPUT, | ||
gboolean | ems | ||
) |
Links SMS messages according to IDs.
Definition at line 1395 of file gsmmulti.c.
References GSM_UDHHeader::AllParts, GSM_SiemensOTASMSInfo::DataName, GSM_SiemensOTASMSInfo::DataType, GSM_SMSMessage::DateTime, GSM_DateTime::Day, DecodeUnicodeString(), ERR_MOREMEMORY, ERR_NONE, FALSE, GSM_DecodeSiemensOTASMS(), GSM_SMS_OTHER_NUMBERS, GSM_DateTime::Hour, GSM_UDHHeader::ID16bit, GSM_UDHHeader::ID8bit, GSM_DateTime::Minute, GSM_DateTime::Month, GSM_MultiSMSMessage::Number, GSM_SMSMessage::OtherNumbersNum, GSM_SiemensOTASMSInfo::PacketNum, GSM_SiemensOTASMSInfo::PacketsNum, GSM_UDHHeader::PartNumber, GSM_DateTime::Second, GSM_SiemensOTASMSInfo::SequenceID, smfprintf(), GSM_MultiSMSMessage::SMS, SMS_Deliver, GSM_UDHHeader::Text, TRUE, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_ConcatenatedMessages, UDH_ConcatenatedMessages16bit, UDH_NoUDH, UDH_UserUDH, UnicodeLength(), and GSM_DateTime::Year.
GSM_Error GSM_SendSavedSMS | ( | GSM_StateMachine * | s, |
int | Folder, | ||
int | Location | ||
) |
Sends SMS already saved in phone.
s | State machine pointer. | |
[in] | Folder | Folder, where message is stored. |
[in] | Location | Location, where message is stored. |
Sends SMS already saved in phone.
Definition at line 753 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, GSM_Phone_Functions::SendSavedSMS, and smprintf().
GSM_Error GSM_SendSMS | ( | GSM_StateMachine * | s, |
GSM_SMSMessage * | sms | ||
) |
Sends SMS.
s | State machine pointer. | |
[in] | sms | SMS structure with SMS data to send. |
Sends SMS.
Definition at line 740 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SendSMS.
void GSM_SetDefaultReceivedSMSData | ( | GSM_SMSMessage * | SMS | ) |
Sets default content for SMS except for changing locations. Use this for clearing structure while keeping location of message.
SMS | Pointer to structure which should be cleaned up. |
Definition at line 1092 of file gsmsms.c.
References GSM_UDHHeader::AllParts, GSM_SMSMessage::Class, GSM_SMSMessage::Coding, GSM_SMSMessage::DateTime, GSM_SMSC::DefaultNumber, GSM_SMSMessage::DeliveryStatus, FALSE, GSM_SMSValidity::Format, GSM_SMSC::Format, GSM_UDHHeader::ID16bit, GSM_UDHHeader::ID8bit, GSM_UDHHeader::Length, GSM_SMSMessage::Length, GSM_SMSC::Location, GSM_SMSMessage::MessageReference, GSM_SMSC::Name, GSM_SMSMessage::Name, GSM_SMSC::Number, GSM_SMSMessage::Number, GSM_SMSMessage::OtherNumbersNum, GSM_UDHHeader::PartNumber, GSM_SMSMessage::RejectDuplicates, GSM_SMSValidity::Relative, GSM_SMSMessage::ReplaceMessage, GSM_SMSMessage::ReplyViaSameSMSC, SMS_Coding_8bit, SMS_FORMAT_Text, SMS_VALID_Max_Time, SMS_Validity_NotAvailable, GSM_SMSMessage::SMSC, GSM_UDHHeader::Text, GSM_SMSMessage::Text, GSM_UDHHeader::Type, GSM_SMSMessage::UDH, UDH_NoUDH, GSM_SMSC::Validity, and GSM_DateTime::Year.
Referenced by GSM_DecodePDUFrame(), GSM_DecodeSMSFrame(), and GSM_SetDefaultSMSData().
void GSM_SetDefaultSMSData | ( | GSM_SMSMessage * | SMS | ) |
Sets default content for SMS. Use this for clearing structure.
SMS | Pointer to structure which should be cleaned up. |
Definition at line 1129 of file gsmsms.c.
References GSM_SMSMessage::DateTime, FALSE, GSM_SMSMessage::Folder, GSM_SMSValidity::Format, GSM_GetCurrentDateTime(), GSM_SetDefaultReceivedSMSData(), GSM_SMSMessage::InboxFolder, GSM_SMSC::Location, GSM_SMSMessage::Location, GSM_SMSMessage::Memory, GSM_SMSMessage::PDU, GSM_SMSValidity::Relative, SMS_Submit, SMS_UnSent, SMS_VALID_Max_Time, SMS_Validity_RelativeFormat, GSM_SMSMessage::SMSC, GSM_SMSMessage::SMSCTime, GSM_SMSMessage::State, and GSM_SMSC::Validity.
Referenced by GSM_EncodeAlcatelMultiPartSMS(), GSM_EncodeEMSMultiPartSMS(), and GSM_MakeMultiPartSMS().
GSM_Error GSM_SetFastSMSSending | ( | GSM_StateMachine * | s, |
gboolean | enable | ||
) |
Configures fast SMS sending.
s | State machine pointer. | |
[in] | enable | Whether to enable notifications. |
Configures fast SMS sending.
Definition at line 767 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetFastSMSSending.
GSM_Error GSM_SetIncomingSMS | ( | GSM_StateMachine * | s, |
gboolean | enable | ||
) |
Enable/disable notification on incoming SMS.
s | State machine pointer. | |
[in] | enable | Whether to enable notifications. |
Enable/disable notification on incoming SMS.
Definition at line 780 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetIncomingSMS.
GSM_Error GSM_SetSMS | ( | GSM_StateMachine * | s, |
GSM_SMSMessage * | sms | ||
) |
Sets SMS.
s | State machine pointer. | |
[in] | sms | SMS message data. |
Sets SMS.
Definition at line 698 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, PRINT_SMS_INFO, and GSM_Phone_Functions::SetSMS.
GSM_Error GSM_SetSMSC | ( | GSM_StateMachine * | s, |
GSM_SMSC * | smsc | ||
) |
Sets SMS Service Center number and SMS settings.
s | State machine pointer. | |
[in] | smsc | SMSC structure. |
Sets SMS Service Center number and SMS settings.
Definition at line 641 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetSMSC.
void GSM_SMSCounter | ( | GSM_Debug_Info * | di, |
unsigned char * | MessageBuffer, | ||
GSM_UDH | UDHType, | ||
GSM_Coding_Type | Coding, | ||
int * | SMSNum, | ||
size_t * | CharsLeft | ||
) |
Calculates number of messages and free chars needed for text.
di | Debug settings. | |
[in] | MessageBuffer | Actual message text in unicode. |
[in] | UDHType | UDH type. |
[in] | Coding | GSM Encoding type. |
[out] | SMSNum | Number of messages needed to store the text. |
[out] | CharsLeft | Number of free chars in the message. |
Definition at line 355 of file gsmmulti.c.
References FALSE, GSM_Find_Free_Used_SMS2(), GSM_MakeMultiPartSMS(), GSM_MultiSMSMessage::Number, GSM_MultiSMSMessage::SMS, and UnicodeLength().
GSM_Error PHONE_EncodeSMSFrame | ( | GSM_StateMachine * | s, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout, | ||
int * | length, | ||
gboolean | clear | ||
) |
Encodes SMS frame according to layout.
Definition at line 58 of file pfunc.c.
References ERR_EMPTYSMSC, ERR_GETTING_SMSC, ERR_NONE, GSM_Phone::Functions, GSM_Phone_Functions::GetSMSC, GSM_EncodeSMSFrame(), GSM_GetDI(), GSM_SMSC::Location, GSM_SMSC::Number, GSM_SMSMessage::PDU, _GSM_StateMachine::Phone, smprintf(), SMS_Deliver, and GSM_SMSMessage::SMSC.
Referenced by DUMMY_SendSMS().
GSM_SMSMessageLayout PHONE_SMSDeliver |
GSM_SMSMessageLayout PHONE_SMSStatusReport |
GSM_SMSMessageLayout PHONE_SMSSubmit |