Decodes PDU data.
Parameters:
- 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.
Decodes SMS frame.
Finds out coding type based on TPDCS header byte as defined by GSM 03.38.
Encodes SMS frame.
Decodes SMS frame for status report.
Decodes SMS frame in textual representation.
Decodes UDH header.
Encodes UDH header.
Sets default content for SMS except for changing locations. Use this for clearing structure while keeping location of message.
Parameters:
- SMS -
Pointer to structure which should be cleaned up.
Sets default content for SMS. Use this for clearing structure.
Parameters:
- SMS -
Pointer to structure which should be cleaned up.
Decodes Siemens OTA data.
Encodes SMS frame according to layout.
Return: Error code.
Encodes multi part SMS from “readable” format.
Return: Error code.
Decodes multi part SMS to “readable” format.
Clears GSM_MultiPartSMSInfo to default values.
Frees any allocated structures inside GSM_MultiPartSMSInfo.
Links SMS messages according to IDs.
Return: Error code.
Decodes MMS data.
Clears MMS data, used to initialize structure.
Gets SMS Service Center number and SMS settings.
Parameters:
- s -
State machine pointer.
- smsc -
SMSC structure, should contain location.
Return: Error code.
Sets SMS Service Center number and SMS settings.
Parameters:
- s -
State machine pointer.
- smsc -
SMSC structure.
Return: Error code.
Gets information about SMS memory (read/unread/size of memory for both SIM and phone).
Parameters:
- s -
State machine pointer.
- status -
Pointer to SMS status structure.
Return: Error code.
Reads SMS message.
Parameters:
- s -
State machine pointer.
- sms -
SMS message data read from phone, location and folder should be set.
Return: Error code.
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.
Parameters:
- s -
State machine pointer.
- sms -
SMS message data read from phone, for subsequent reads, location and folder might be used by phone driver to determine reading state.
- start -
Whether we start reading from beginning.
Return: Error code.
Sets SMS.
Parameters:
- s -
State machine pointer.
- sms -
SMS message data.
Return: Error code.
Adds SMS to specified folder.
Parameters:
- s -
State machine pointer.
- sms -
SMS message data, location will be updated.
Return: Error code.
Deletes SMS.
Parameters:
- s -
State machine pointer.
- sms -
SMS structure with SMS location and folder.
Return: Error code.
Sends SMS.
Parameters:
- s -
State machine pointer.
- sms -
SMS structure with SMS data to send.
Return: Error code.
Sends SMS already saved in phone.
Parameters:
- s -
State machine pointer.
- Folder -
Folder, where message is stored.
- Location -
Location, where message is stored.
Return: Error code.
Configures fast SMS sending.
Parameters:
- s -
State machine pointer.
- enable -
Whether to enable notifications.
Return: Error code.
Enable/disable notification on incoming SMS.
Parameters:
- s -
State machine pointer.
- enable -
Whether to enable notifications.
Return: Error code.
Gets network information from phone.
Parameters:
- s -
State machine pointer.
- enable -
Whether to enable notifications.
Return: Error code.
Returns SMS folders information.
Parameters:
- s -
State machine pointer.
- folders -
folders Pointer to folders structure, which will be filled in.
Return: Error code.
Creates SMS folder.
Parameters:
- s -
State machine pointer.
- name -
Name of SMS folder which should be created.
Return: Error code.
Deletes SMS folder.
Parameters:
- s -
State machine pointer.
- ID -
ID of SMS folder to delete.
Return: Error code.
Lists MMS folders.
Parameters:
- s -
State machine pointer.
- folders -
Pointer to structure, whehe folder information will be stored.
Return: Error code.
Retrieves next part of MMS file information.
Parameters:
- s -
State machine pointer.
- FileID -
File ID will be stored here, might be used for consequent reads.
- MMSFolder -
MMS folder ID will be stored here, might be used for consequent reads.
- start -
Whether to start reading.
Return: Error code.
Activates/deactivates noticing about incoming USSDs (UnStructured Supplementary Services).
Parameters:
- s -
State machine pointer.
- enable -
Whether to enable notifications.
Return: Error code.
Calculates number of messages and free chars needed for text.
Parameters:
- di -
Debug settings.
- MessageBuffer -
Actual message text in unicode.
- UDHType -
UDH type.
- Coding -
GSM Encoding type.
- SMSNum -
Number of messages needed to store the text.
- CharsLeft -
Number of free chars in the message.
GSM_MMS_Class enum
MMS message class.
Values:
- GSM_MMS_None = 0 -
None class specified.
- GSM_MMS_Personal = 1 -
Personal message.
- GSM_MMS_Advertisement -
Advertisement message.
- GSM_MMS_Info -
Informational message.
- GSM_MMS_Auto -
Automatic message class.
MMS indicator data.
Public Memberschar Address[500]
Message address (URL for download).
char Title[200]
Message title (subject).
char Sender[200]
Message sender.
size_t MessageSize
Message size, if 0 it won’t be decoded or was not decoded.
GSM_MMS_Class Class
Class of a message.
Structure for Cell Broadcast messages.
Public Membersint Channel
Channel number.
char Text[300]
Message text.
GSM_USSDStatus enum
Status of USSD message.
Values:
- USSD_Unknown = 1 -
Unknown status
- USSD_NoActionNeeded -
No action is needed, maybe network initiated USSD
- USSD_ActionNeeded -
Reply is expected
- USSD_Terminated -
USSD dialog terminated
- USSD_AnotherClient -
Another client replied
- USSD_NotSupported -
Operation not supported
- USSD_Timeout -
Network timeout
Structure for USSD messages.
Public Members
Status of SMS memory.
Public Membersint SIMUnRead
Number of unread messages on SIM.
int SIMUsed
Number of all saved messages (including unread) on SIM.
int SIMSize
Number of all possible messages on SIM.
int TemplatesUsed
Number of used templates (62xx/63xx/7110/etc.).
int PhoneUnRead
Number of unread messages in phone.
int PhoneUsed
Number of all saved messages in phone.
int PhoneSize
Number of all possible messages on phone.
GSM_SMSFormat enum
Enum defines format of SMS messages. See GSM 03.40 section 9.2.3.9
Values:
- SMS_FORMAT_Pager = 1 -
- SMS_FORMAT_Fax -
- SMS_FORMAT_Email -
- SMS_FORMAT_Text -
GSM_ValidityPeriod enum
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.
Values:
- SMS_VALID_1_Hour = 0x0b -
- SMS_VALID_6_Hours = 0x47 -
- SMS_VALID_1_Day = 0xa7 -
- SMS_VALID_3_Days = 0xa9 -
- SMS_VALID_1_Week = 0xad -
- SMS_VALID_Max_Time = 0xff -
GSM_ValidityPeriodFormat enum
Enum defines format of validity period for SMS messages. See GSM 03.40 section 9.2.3.12
Values:
- SMS_Validity_NotAvailable = 1 -
- SMS_Validity_RelativeFormat -
Structure for validity of SMS messages
Public MembersGSM_ValidityPeriodFormat Format
GSM_ValidityPeriod Relative
Value defines period for relative format
Structure for SMSC (SMS Center) information.
Public Membersint Location
Number of the SMSC on SIM
unsigned char Name[(GSM_MAX_SMSC_NAME_LENGTH+1)*2]
Name of the SMSC
unsigned char Number[(GSM_MAX_NUMBER_LENGTH+1)*2]
SMSC phone number.
GSM_SMSValidity Validity
Validity of SMS messages.
GSM_SMSFormat Format
Format of sent SMS messages.
unsigned char DefaultNumber[(GSM_MAX_NUMBER_LENGTH+1)*2]
Default recipient number. In old DCT3 ignored
GSM_SMS_State enum
Status of SMS message.
Values:
- SMS_Sent = 1 -
- SMS_UnSent -
- SMS_Read -
- SMS_UnRead -
GSM_Coding_Type enum
Coding type of SMS.
Values:
- SMS_Coding_Unicode_No_Compression = 1 -
Unicode
- SMS_Coding_Unicode_Compression -
- SMS_Coding_Default_No_Compression -
Default GSM alphabet.
- SMS_Coding_Default_Compression -
- SMS_Coding_8bit -
8-bit.
GSM_UDH enum
Types of UDH (User Data Header).
Values:
- UDH_NoUDH = 1 -
- UDH_ConcatenatedMessages -
Linked SMS.
- UDH_ConcatenatedMessages16bit -
Linked SMS with 16 bit reference.
- UDH_DisableVoice -
- UDH_DisableFax -
- UDH_DisableEmail -
- UDH_EnableVoice -
- UDH_EnableFax -
- UDH_EnableEmail -
- UDH_VoidSMS -
- UDH_NokiaRingtone -
- UDH_NokiaRingtoneLong -
- UDH_NokiaOperatorLogo -
- UDH_NokiaOperatorLogoLong -
- UDH_NokiaCallerLogo -
- UDH_NokiaWAP -
- UDH_NokiaWAPLong -
- UDH_NokiaCalendarLong -
- UDH_NokiaProfileLong -
- UDH_NokiaPhonebookLong -
- UDH_UserUDH -
- UDH_MMSIndicatorLong -
Structure for User Data Header.
Public MembersGSM_UDH Type
UDH type.
int Length
UDH length.
unsigned char Text[GSM_MAX_UDH_LENGTH]
UDH text.
int ID8bit
8-bit ID, when required (-1 otherwise).
int ID16bit
16-bit ID, when required (-1 otherwise).
int PartNumber
Number of current part.
int AllParts
Total number of parts.
GSM_SMSMessageType enum
TP-Message-Type-Indicator. See GSM 03.40 section 9.2.3.1.
Values:
- SMS_Deliver = 1 -
SMS in Inbox.
- SMS_Status_Report -
Delivery Report
- SMS_Submit -
SMS for sending or in Outbox
SMS message data.
Public Membersunsigned char ReplaceMessage
Message to be replaced.
gboolean RejectDuplicates
Whether to reject duplicates.
GSM_UDHHeader UDH
UDH (User Data Header)
unsigned char Number[(GSM_MAX_NUMBER_LENGTH+1)*2]
Sender or recipient number.
unsigned char OtherNumbers[GSM_SMS_OTHER_NUMBERS][(GSM_MAX_NUMBER_LENGTH+1)*2]
int OtherNumbersNum
GSM_SMSC SMSC
SMSC (SMS Center)
GSM_MemoryType Memory
For saved SMS: where exactly it’s saved (SIM/phone)
int Location
For saved SMS: location of SMS in memory.
int Folder
For saved SMS: number of folder, where SMS is saved
gboolean InboxFolder
For saved SMS: whether SMS is really in Inbox.
int Length
Length of the SMS message.
GSM_SMS_State State
Status (read/unread/...) of SMS message.
unsigned char Name[(GSM_MAX_SMS_NAME_LENGTH+1)*2]
Name in Nokia with SMS memory (6210/7110, etc.) Ignored in other.
unsigned char Text[(GSM_MAX_SMS_LENGTH+1)*2]
Text for SMS.
Type of message.
GSM_Coding_Type Coding
Type of coding.
GSM_DateTime DateTime
Date and time, when SMS was saved or sent
GSM_DateTime SMSCTime
Date of SMSC response in DeliveryReport messages.
unsigned char DeliveryStatus
In delivery reports: status.
gboolean ReplyViaSameSMSC
Indicates whether “Reply via same center” is set.
signed char Class
SMS class (0 is flash SMS, 1 is normal one).
unsigned char MessageReference
Message reference.
Public Membersunsigned char Text
TP-User-Data. GSM 03.40 section 9.2.3.24.
unsigned char Number
unsigned char SMSCNumber
SMSC number
unsigned char TPDCS
TP-Data-Coding-Scheme. GSM 03.40 section 9.2.3.10. Contains alphabet type, SMS class (and some others)
unsigned char DateTime
unsigned char SMSCTime
TP-Service-Centre-Time-Stamp in SMS-Status-Report. GSM 03.40 section 9.2.3.11.
unsigned char TPStatus
TP-Status in SMS-Status-Report. GSM 03.40 section 9.2.3.15.
unsigned char TPUDL
TP-User-Data-Length. GSM 03.40 section 9.2.3.16.
unsigned char TPVP
TP-Validity Period in SMS-Submit. GSM 03.40 section 9.2.3.12.
unsigned char firstbyte
Byte contains in SMS-Deliver:
Byte contains in SMS-Submit:
unsigned char TPMR
TP-Message Reference in SMS-Submit. GSM 03.40 section 9.2.3.6
unsigned char TPPID
TP-Protocol-Identifier. GSM 03.40 section 9.2.3.9
Information about SMS folder.
Public Membersgboolean InboxFolder
Whether it is inbox.
gboolean OutboxFolder
Whether it is outbox.
GSM_MemoryType Memory
Where exactly it’s saved.
unsigned char Name[(GSM_MAX_SMS_FOLDER_NAME_LEN+1)*2]
Name of the folder
List of SMS folders.
Public MembersGSM_OneSMSFolder Folder[GSM_MAX_SMS_FOLDERS]
Array of structures holding information about each folder.
int Number
Number of SMS folders.
Siemens OTA data.
Public Membersunsigned long SequenceID
unsigned int PacketsNum
unsigned int PacketNum
unsigned long AllDataLen
unsigned char DataType[10]
unsigned char DataName[40]
unsigned int DataLen
unsigned char Data[140]
Multiple SMS messages, used for Smart Messaging 3.0/EMS.
Public Members
Information about MMS folder.
Public Membersgboolean InboxFolder
Whether it is really inbox.
char Name[(GSM_MAX_MMS_FOLDER_NAME_LEN+1)*2]
Name for MMS folder.
List of MMS folders.
Public Membersunsigned char Number
Number of MMS folders.
GSM_OneMMSFolder Folder[GSM_MAX_MMS_FOLDERS]
Array of structures holding information about each folder.
EncodeMultiPartSMSID enum
ID during packing SMS for Smart Messaging 3.0, EMS and other
Values:
- SMS_Text = 1 -
1 text SMS.
- SMS_ConcatenatedTextLong -
Contacenated SMS, when longer than 1 SMS.
- SMS_ConcatenatedAutoTextLong -
Contacenated SMS, auto Default/Unicode coding.
- SMS_ConcatenatedTextLong16bit -
- SMS_ConcatenatedAutoTextLong16bit -
- SMS_NokiaProfileLong -
Nokia profile = Name, Ringtone, ScreenSaver
- SMS_NokiaPictureImageLong -
Nokia Picture Image + (text)
- SMS_NokiaScreenSaverLong -
Nokia screen saver + (text)
- SMS_NokiaRingtone -
Nokia ringtone - old SM2.0 format, 1 SMS
- SMS_NokiaRingtoneLong -
Nokia ringtone contacenated, when very long
- SMS_NokiaOperatorLogo -
Nokia 72x14 operator logo, 1 SMS
- SMS_NokiaOperatorLogoLong -
Nokia 72x14 op logo or 78x21 in 2 SMS
- SMS_NokiaCallerLogo -
Nokia 72x14 caller logo, 1 SMS
- SMS_NokiaWAPBookmarkLong -
Nokia WAP bookmark in 1 or 2 SMS
- SMS_NokiaWAPSettingsLong -
Nokia WAP settings in 2 SMS
- SMS_NokiaMMSSettingsLong -
Nokia MMS settings in 2 SMS
- SMS_NokiaVCARD10Long -
Nokia VCARD 1.0 - only name and default number
- SMS_NokiaVCARD21Long -
Nokia VCARD 2.1 - all numbers + text
- SMS_NokiaVCALENDAR10Long -
Nokia VCALENDAR 1.0 - can be in few sms
- SMS_NokiaVTODOLong -
- SMS_VCARD10Long -
- SMS_VCARD21Long -
- SMS_DisableVoice -
- SMS_DisableFax -
- SMS_DisableEmail -
- SMS_EnableVoice -
- SMS_EnableFax -
- SMS_EnableEmail -
- SMS_VoidSMS -
- SMS_EMSSound10 -
IMelody 1.0
- SMS_EMSSound12 -
IMelody 1.2
- SMS_EMSSonyEricssonSound -
IMelody without header - SonyEricsson extension
- SMS_EMSSound10Long -
IMelody 1.0 with UPI.
- SMS_EMSSound12Long -
IMelody 1.2 with UPI.
- SMS_EMSSonyEricssonSoundLong -
IMelody without header with UPI.
- SMS_EMSPredefinedSound -
- SMS_EMSPredefinedAnimation -
- SMS_EMSAnimation -
- SMS_EMSFixedBitmap -
Fixed bitmap of size 16x16 or 32x32.
- SMS_EMSVariableBitmap -
- SMS_EMSVariableBitmapLong -
- SMS_MMSIndicatorLong -
MMS message indicator.
- SMS_WAPIndicatorLong -
- SMS_AlcatelMonoBitmapLong -
Variable bitmap with black and white colors
- SMS_AlcatelMonoAnimationLong -
Variable animation with black and white colors
- SMS_AlcatelSMSTemplateName -
- SMS_SiemensFile -
Siemens OTA
Entry of multipart SMS.
Public Membersint Number
GSM_Ringtone * Ringtone
GSM_MultiBitmap * Bitmap
GSM_WAPBookmark * Bookmark
GSM_WAPSettings * Settings
GSM_MMSIndicator * MMSIndicator
GSM_MemoryEntry * Phonebook
GSM_CalendarEntry * Calendar
GSM_ToDoEntry * ToDo
GSM_File * File
gboolean Protected
unsigned char * Buffer
gboolean Left
gboolean Right
gboolean Center
gboolean Large
gboolean Small
gboolean Bold
gboolean Italic
gboolean Underlined
gboolean Strikethrough
int RingtoneNotes
Multipart SMS information.
Public Membersint EntriesNum
gboolean UnicodeCoding
int Class
unsigned char ReplaceMessage
gboolean Unknown
GSM_MultiPartSMSEntry Entries[GSM_MAX_MULTI_SMS]
MMSAddressType enum
MMS address type.
Values:
- MMSADDRESS_PHONE -
- MMSADDRESS_UNKNOWN -
MMS entry.
Public MembersGSM_File File
unsigned char ContentType[400]
CT in Unicode
unsigned char SMIL[400]
Smil ID in Unicode
MMS part.
Public Membersint EntriesNum
unsigned char Source[200]
in Unicode
MMSAddressType SourceType
unsigned char Destination[200]
in Unicode
MMSAddressType DestinationType
unsigned char CC[200]
in Unicode
MMSAddressType CCType
unsigned char Subject[200]
in Unicode
unsigned char ContentType[400]
CT in Unicode
unsigned char MSGType[50]
no Unicode
gboolean DateTimeAvailable
GSM_DateTime DateTime
gboolean MMSReportAvailable
gboolean MMSReport
GSM_EncodedMultiPartMMSEntry Entries[GSM_MAX_MULTI_MMS]
Subparts.