Gammu API
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. |
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. |
void GSM_ClearMultiPartSMSInfo | ( | GSM_MultiPartSMSInfo * | Info | ) |
Clears GSM_MultiPartSMSInfo to default values.
gboolean GSM_DecodeMultiPartSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS, | ||
gboolean | ems | ||
) |
Decodes multi part SMS to "readable" format.
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. |
gboolean GSM_DecodeSiemensOTASMS | ( | GSM_Debug_Info * | di, |
GSM_SiemensOTASMSInfo * | Info, | ||
GSM_SMSMessage * | SMS | ||
) |
Decodes Siemens OTA data.
GSM_Error GSM_DecodeSMSFrame | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout | ||
) |
Decodes SMS frame.
GSM_Error GSM_DecodeSMSFrameStatusReportData | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout | ||
) |
Decodes SMS frame for status report.
GSM_Error GSM_DecodeSMSFrameText | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout | ||
) |
Decodes SMS frame in textual representation.
void GSM_DecodeUDHHeader | ( | GSM_Debug_Info * | di, |
GSM_UDHHeader * | UDH | ||
) |
Decodes UDH header.
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. |
GSM_Error GSM_DeleteSMSFolder | ( | GSM_StateMachine * | s, |
int | ID | ||
) |
Deletes SMS folder.
s | State machine pointer. | |
[in] | ID | ID of SMS folder to delete. |
GSM_Error GSM_EncodeMultiPartSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiPartSMSInfo * | Info, | ||
GSM_MultiSMSMessage * | SMS | ||
) |
Encodes multi part SMS from "readable" format.
GSM_Error GSM_EncodeSMSFrame | ( | GSM_Debug_Info * | di, |
GSM_SMSMessage * | SMS, | ||
unsigned char * | buffer, | ||
GSM_SMSMessageLayout | Layout, | ||
int * | length, | ||
gboolean | clear | ||
) |
Encodes SMS frame.
void GSM_EncodeUDHHeader | ( | GSM_Debug_Info * | di, |
GSM_UDHHeader * | UDH | ||
) |
Encodes UDH header.
void GSM_FreeMultiPartSMSInfo | ( | GSM_MultiPartSMSInfo * | Info | ) |
Frees any allocated structures inside GSM_MultiPartSMSInfo.
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. |
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. |
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. |
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. |
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. |
GSM_Error GSM_LinkSMS | ( | GSM_Debug_Info * | di, |
GSM_MultiSMSMessage ** | INPUT, | ||
GSM_MultiSMSMessage ** | OUTPUT, | ||
gboolean | ems | ||
) |
Links SMS messages according to IDs.
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. |
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. |
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. |
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. |
GSM_Error GSM_SetFastSMSSending | ( | GSM_StateMachine * | s, |
gboolean | enable | ||
) |
Configures fast SMS sending.
s | State machine pointer. | |
[in] | enable | Whether to enable notifications. |
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. |
GSM_Error GSM_SetSMS | ( | GSM_StateMachine * | s, |
GSM_SMSMessage * | sms | ||
) |
Sets SMS.
s | State machine pointer. | |
[in] | sms | SMS message data. |
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. |
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. |
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.
GSM_SMSMessageLayout PHONE_SMSDeliver |
Layout for deliver message.
GSM_SMSMessageLayout PHONE_SMSStatusReport |
Layout for status report message.
GSM_SMSMessageLayout PHONE_SMSSubmit |
Layout for submit message.