Gammu API  1.38.0
gammu-message.h File Reference
#include <gammu-limits.h>
#include <gammu-memory.h>
#include <gammu-datetime.h>
#include <gammu-ringtone.h>
#include <gammu-bitmap.h>
#include <gammu-wap.h>
#include <gammu-calendar.h>
#include <gammu-file.h>
#include <gammu-debug.h>

Go to the source code of this file.

Data Structures

struct  GSM_MMSIndicator
 
struct  GSM_CBMessage
 
struct  GSM_USSDMessage
 
struct  GSM_SMSMemoryStatus
 
struct  GSM_SMSValidity
 
struct  GSM_SMSC
 
struct  GSM_UDHHeader
 
struct  GSM_SMSMessage
 
struct  GSM_SMSMessageLayout
 
struct  GSM_OneSMSFolder
 
struct  GSM_SMSFolders
 
struct  GSM_SiemensOTASMSInfo
 
struct  GSM_MultiSMSMessage
 
struct  GSM_OneMMSFolder
 
struct  GSM_MMSFolders
 
struct  GSM_MultiPartSMSEntry
 
struct  GSM_MultiPartSMSInfo
 
struct  GSM_EncodedMultiPartMMSEntry
 
struct  GSM_EncodedMultiPartMMSInfo
 

Enumerations

enum  GSM_MMS_Class {
  GSM_MMS_None = 0, GSM_MMS_Personal = 1, GSM_MMS_Advertisement, GSM_MMS_Info,
  GSM_MMS_Auto, GSM_MMS_INVALID
}
 
enum  GSM_USSDStatus {
  USSD_Unknown = 1, USSD_NoActionNeeded, USSD_ActionNeeded, USSD_Terminated,
  USSD_AnotherClient, USSD_NotSupported, USSD_Timeout
}
 
enum  GSM_SMSFormat { SMS_FORMAT_Pager = 1, SMS_FORMAT_Fax, SMS_FORMAT_Email, SMS_FORMAT_Text }
 
enum  GSM_ValidityPeriod {
  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
}
 
enum  GSM_ValidityPeriodFormat { SMS_Validity_NotAvailable = 1, SMS_Validity_RelativeFormat }
 
enum  GSM_SMS_State { SMS_Sent = 1, SMS_UnSent, SMS_Read, SMS_UnRead }
 
enum  GSM_Coding_Type {
  SMS_Coding_Unicode_No_Compression = 1, SMS_Coding_Unicode_Compression, SMS_Coding_Default_No_Compression, SMS_Coding_Default_Compression,
  SMS_Coding_8bit
}
 
enum  GSM_UDH {
  UDH_NoUDH = 1, UDH_ConcatenatedMessages, UDH_ConcatenatedMessages16bit, 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
}
 
enum  GSM_SMSMessageType { SMS_Deliver = 1, SMS_Status_Report, SMS_Submit }
 
enum  EncodeMultiPartSMSID {
  SMS_Text = 1, SMS_ConcatenatedTextLong, SMS_ConcatenatedAutoTextLong, SMS_ConcatenatedTextLong16bit,
  SMS_ConcatenatedAutoTextLong16bit, SMS_NokiaProfileLong, SMS_NokiaPictureImageLong, SMS_NokiaScreenSaverLong,
  SMS_NokiaRingtone, SMS_NokiaRingtoneLong, SMS_NokiaOperatorLogo, SMS_NokiaOperatorLogoLong,
  SMS_NokiaCallerLogo, SMS_NokiaWAPBookmarkLong, SMS_NokiaWAPSettingsLong, SMS_NokiaMMSSettingsLong,
  SMS_NokiaVCARD10Long, SMS_NokiaVCARD21Long, SMS_NokiaVCALENDAR10Long, SMS_NokiaVTODOLong,
  SMS_VCARD10Long, SMS_VCARD21Long, SMS_DisableVoice, SMS_DisableFax,
  SMS_DisableEmail, SMS_EnableVoice, SMS_EnableFax, SMS_EnableEmail,
  SMS_VoidSMS, SMS_EMSSound10, SMS_EMSSound12, SMS_EMSSonyEricssonSound,
  SMS_EMSSound10Long, SMS_EMSSound12Long, SMS_EMSSonyEricssonSoundLong, SMS_EMSPredefinedSound,
  SMS_EMSPredefinedAnimation, SMS_EMSAnimation, SMS_EMSFixedBitmap, SMS_EMSVariableBitmap,
  SMS_EMSVariableBitmapLong, SMS_MMSIndicatorLong, SMS_WAPIndicatorLong, SMS_AlcatelMonoBitmapLong,
  SMS_AlcatelMonoAnimationLong, SMS_AlcatelSMSTemplateName, SMS_SiemensFile
}
 
enum  MMSAddressType { MMSADDRESS_PHONE, MMSADDRESS_UNKNOWN }
 

Functions

const char * GSM_SMSCodingToString (GSM_Coding_Type type)
 
GSM_Coding_Type GSM_StringToSMSCoding (const char *s)
 
GSM_Error GSM_DecodePDUFrame (GSM_Debug_Info *di, GSM_SMSMessage *SMS, const unsigned char *buffer, size_t length, size_t *final_pos, gboolean SMSC)
 
GSM_Error GSM_DecodeSMSFrame (GSM_Debug_Info *di, GSM_SMSMessage *SMS, unsigned char *buffer, GSM_SMSMessageLayout Layout)
 
GSM_Coding_Type GSM_GetMessageCoding (GSM_Debug_Info *di, const char TPDCS)
 
GSM_Error GSM_EncodeSMSFrame (GSM_Debug_Info *di, GSM_SMSMessage *SMS, unsigned char *buffer, GSM_SMSMessageLayout Layout, int *length, gboolean clear)
 
GSM_Error GSM_DecodeSMSFrameStatusReportData (GSM_Debug_Info *di, GSM_SMSMessage *SMS, unsigned char *buffer, GSM_SMSMessageLayout Layout)
 
GSM_Error GSM_DecodeSMSFrameText (GSM_Debug_Info *di, GSM_SMSMessage *SMS, unsigned char *buffer, GSM_SMSMessageLayout Layout)
 
void GSM_DecodeUDHHeader (GSM_Debug_Info *di, GSM_UDHHeader *UDH)
 
void GSM_EncodeUDHHeader (GSM_Debug_Info *di, GSM_UDHHeader *UDH)
 
void GSM_SetDefaultReceivedSMSData (GSM_SMSMessage *SMS)
 
void GSM_SetDefaultSMSData (GSM_SMSMessage *SMS)
 
gboolean GSM_DecodeSiemensOTASMS (GSM_Debug_Info *di, GSM_SiemensOTASMSInfo *Info, GSM_SMSMessage *SMS)
 
GSM_Error PHONE_EncodeSMSFrame (GSM_StateMachine *s, GSM_SMSMessage *SMS, unsigned char *buffer, GSM_SMSMessageLayout Layout, int *length, gboolean clear)
 
GSM_Error GSM_EncodeMultiPartSMS (GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS)
 
gboolean GSM_DecodeMultiPartSMS (GSM_Debug_Info *di, GSM_MultiPartSMSInfo *Info, GSM_MultiSMSMessage *SMS, gboolean ems)
 
void GSM_ClearMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info)
 
void GSM_FreeMultiPartSMSInfo (GSM_MultiPartSMSInfo *Info)
 
GSM_Error GSM_LinkSMS (GSM_Debug_Info *di, GSM_MultiSMSMessage **INPUT, GSM_MultiSMSMessage **OUTPUT, gboolean ems)
 
GSM_Error GSM_DecodeMMSFileToMultiPart (GSM_Debug_Info *di, GSM_File *file, GSM_EncodedMultiPartMMSInfo *info)
 
GSM_Error GSM_ClearMMSMultiPart (GSM_EncodedMultiPartMMSInfo *info)
 
GSM_Error GSM_GetSMSC (GSM_StateMachine *s, GSM_SMSC *smsc)
 
GSM_Error GSM_SetSMSC (GSM_StateMachine *s, GSM_SMSC *smsc)
 
GSM_Error GSM_GetSMSStatus (GSM_StateMachine *s, GSM_SMSMemoryStatus *status)
 
GSM_Error GSM_GetSMS (GSM_StateMachine *s, GSM_MultiSMSMessage *sms)
 
GSM_Error GSM_GetNextSMS (GSM_StateMachine *s, GSM_MultiSMSMessage *sms, gboolean start)
 
GSM_Error GSM_SetSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_AddSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_DeleteSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_SendSMS (GSM_StateMachine *s, GSM_SMSMessage *sms)
 
GSM_Error GSM_SendSavedSMS (GSM_StateMachine *s, int Folder, int Location)
 
GSM_Error GSM_SetFastSMSSending (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SetIncomingSMS (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_SetIncomingCB (GSM_StateMachine *s, gboolean enable)
 
GSM_Error GSM_GetSMSFolders (GSM_StateMachine *s, GSM_SMSFolders *folders)
 
GSM_Error GSM_AddSMSFolder (GSM_StateMachine *s, unsigned char *name)
 
GSM_Error GSM_DeleteSMSFolder (GSM_StateMachine *s, int ID)
 
GSM_Error GSM_GetMMSFolders (GSM_StateMachine *s, GSM_MMSFolders *folders)
 
GSM_Error GSM_GetNextMMSFileInfo (GSM_StateMachine *s, unsigned char *FileID, int *MMSFolder, gboolean start)
 
GSM_Error GSM_SetIncomingUSSD (GSM_StateMachine *s, gboolean enable)
 
void GSM_SMSCounter (GSM_Debug_Info *di, unsigned char *MessageBuffer, GSM_UDH UDHType, GSM_Coding_Type Coding, int *SMSNum, size_t *CharsLeft)
 

Variables

GSM_SMSMessageLayout PHONE_SMSSubmit
 
GSM_SMSMessageLayout PHONE_SMSDeliver
 
GSM_SMSMessageLayout PHONE_SMSStatusReport
 

Detailed Description

Author
Michal Čihař

Message data and functions.

Definition in file gammu-message.h.

Enumeration Type Documentation

§ GSM_MMS_Class

MMS message class.

Enumerator
GSM_MMS_None 

None class specified.

GSM_MMS_Personal 

Personal message.

GSM_MMS_Advertisement 

Advertisement message.

GSM_MMS_Info 

Informational message.

GSM_MMS_Auto 

Automatic message class.

GSM_MMS_INVALID 

Definition at line 56 of file gammu-message.h.

Function Documentation

§ GSM_GetMessageCoding()

GSM_Coding_Type GSM_GetMessageCoding ( GSM_Debug_Info di,
const char  TPDCS 
)

Finds out coding type based on TPDCS header byte as defined by GSM 03.38.

§ GSM_SMSCodingToString()

const char* GSM_SMSCodingToString ( GSM_Coding_Type  type)

Converts SMS coding to string.

Returns
Pointer to static string, NULL on failure.

§ GSM_StringToSMSCoding()

GSM_Coding_Type GSM_StringToSMSCoding ( const char *  s)

Converts SMS coding to type.