Gammu API  1.32.90
gammu-message.h
Go to the documentation of this file.
1 
7 #ifndef __gammu_message_h
8 #define __gammu_message_h
9 
10 #include <gammu-limits.h>
11 #include <gammu-memory.h>
12 #include <gammu-datetime.h>
13 #include <gammu-ringtone.h>
14 #include <gammu-bitmap.h>
15 #include <gammu-wap.h>
16 #include <gammu-calendar.h>
17 #include <gammu-file.h>
18 #include <gammu-debug.h>
19 
52 typedef enum {
74 
80 typedef struct {
84  char Address[500];
88  char Title[200];
92  char Sender[200];
96  size_t MessageSize;
102 
108 typedef struct {
112  int Channel;
116  char Text[300];
117 } GSM_CBMessage;
118 
124 typedef enum {
154 
160 typedef struct {
164  unsigned char Text[2 * (GSM_MAX_USSD_LENGTH + 1)];
170 
176 typedef struct {
184  int SIMUsed;
188  int SIMSize;
206 
212 typedef enum {
217  /* Some values not handled here */
218 } GSM_SMSFormat;
219 
227 typedef enum {
235 
242 typedef enum {
245  /* Specification gives also other possibilities */
247 
253 typedef struct {
260 
266 typedef struct {
270  int Location;
274  unsigned char Name[(GSM_MAX_SMSC_NAME_LENGTH + 1) * 2];
278  unsigned char Number[(GSM_MAX_NUMBER_LENGTH + 1) * 2];
290  unsigned char DefaultNumber[(GSM_MAX_NUMBER_LENGTH + 1) * 2];
291 } GSM_SMSC;
292 
298 typedef enum {
299  SMS_Sent = 1,
303 } GSM_SMS_State;
304 
310 typedef enum {
326 
332 const char *GSM_SMSCodingToString(GSM_Coding_Type type);
333 
338 
344 typedef enum {
373 } GSM_UDH;
374 
380 typedef struct {
388  int Length;
392  unsigned char Text[GSM_MAX_UDH_LENGTH];
396  int ID8bit;
400  int ID16bit;
408  int AllParts;
409 } GSM_UDHHeader;
410 
416 typedef enum {
429  /* specification gives more */
431 
437 typedef struct {
441  unsigned char ReplaceMessage;
453  unsigned char Number[(GSM_MAX_NUMBER_LENGTH + 1) * 2];
454 
455  unsigned char
458 
470  int Location;
474  int Folder;
482  int Length;
490  unsigned char Name[(GSM_MAX_SMS_NAME_LENGTH + 1) * 2];
494  unsigned char Text[(GSM_MAX_SMS_LENGTH + 1) * 2];
514  unsigned char DeliveryStatus;
522  signed char Class;
526  unsigned char MessageReference;
528 
529 /* In layouts are saved locations for some SMS part. Below are listed
530  * specs, which describe them
531  *
532  * \ingroup SMS
533  */
534 typedef struct {
538  unsigned char Text;
544  unsigned char Number;
548  unsigned char SMSCNumber;
553  unsigned char TPDCS;
558  unsigned char DateTime;
562  unsigned char SMSCTime;
566  unsigned char TPStatus;
570  unsigned char TPUDL;
574  unsigned char TPVP;
591  unsigned char firstbyte;
595  unsigned char TPMR;
599  unsigned char TPPID;
601 
615  const unsigned char *buffer, size_t length,
616  size_t *final_pos, gboolean SMSC);
617 
624  unsigned char *buffer,
625  GSM_SMSMessageLayout Layout);
626 
631 GSM_Coding_Type GSM_GetMessageCoding(GSM_Debug_Info * di, const char TPDCS);
632 
639  unsigned char *buffer, GSM_SMSMessageLayout Layout,
640  int *length, gboolean clear);
641 
648  GSM_SMSMessage * SMS,
649  unsigned char *buffer,
650  GSM_SMSMessageLayout Layout);
651 
658  unsigned char *buffer,
659  GSM_SMSMessageLayout Layout);
660 
667 
674 
684 
693 
699 typedef struct {
715  unsigned char Name[(GSM_MAX_SMS_FOLDER_NAME_LEN + 1) * 2];
717 
723 typedef struct {
731  int Number;
733 
739 typedef struct {
740  unsigned long SequenceID;
741  unsigned int PacketsNum;
742  unsigned int PacketNum;
743  unsigned long AllDataLen;
744 
745  unsigned char DataType[10];
746  unsigned char DataName[40];
747  unsigned int DataLen;
748  unsigned char Data[140];
750 
757  GSM_SiemensOTASMSInfo * Info,
758  GSM_SMSMessage * SMS);
759 
765 typedef struct {
769  int Number;
775 
781 typedef struct {
789  char Name[(GSM_MAX_MMS_FOLDER_NAME_LEN + 1) * 2];
791 
797 typedef struct {
801  unsigned char Number;
807 
814 
821 
828 
834 typedef enum {
838  SMS_Text = 1,
967 
973 typedef struct {
975 
976  int Number;
987 
988  unsigned char *Buffer;
998 
999  /* Return values */
1002 
1008 typedef struct {
1011  int Class;
1012  unsigned char ReplaceMessage;
1016 
1025  unsigned char *buffer,
1026  GSM_SMSMessageLayout Layout, int *length,
1027  gboolean clear);
1028 
1037  GSM_MultiPartSMSInfo * Info,
1038  GSM_MultiSMSMessage * SMS);
1039 
1046  GSM_MultiPartSMSInfo * Info,
1047  GSM_MultiSMSMessage * SMS, gboolean ems);
1048 
1055 
1062 
1071  GSM_MultiSMSMessage ** INPUT,
1072  GSM_MultiSMSMessage ** OUTPUT, gboolean ems);
1073 
1079 typedef enum {
1082 } MMSAddressType;
1083 
1089 typedef struct {
1094  unsigned char ContentType[400];
1098  unsigned char SMIL[400];
1100 
1106 typedef struct {
1108 
1112  unsigned char Source[200];
1117  unsigned char Destination[200];
1122  unsigned char CC[200];
1124 
1128  unsigned char Subject[200];
1132  unsigned char ContentType[400];
1136  unsigned char MSGType[50];
1137 
1140 
1148 
1156 
1163 
1175 
1187 
1200 
1213 
1232  gboolean start);
1244 
1256 
1268 
1280 
1292 GSM_Error GSM_SendSavedSMS(GSM_StateMachine * s, int Folder, int Location);
1293 
1305 
1317 
1329 
1342 
1353 GSM_Error GSM_AddSMSFolder(GSM_StateMachine * s, unsigned char *name);
1354 
1366 
1379 
1394 GSM_Error GSM_GetNextMMSFileInfo(GSM_StateMachine * s, unsigned char *FileID,
1395  int *MMSFolder, gboolean start);
1407 
1420 void GSM_SMSCounter(GSM_Debug_Info *di, unsigned char *MessageBuffer,
1421  GSM_UDH UDHType, GSM_Coding_Type Coding, int *SMSNum, size_t *CharsLeft);
1422 
1423 #endif
1424 
1425 /* Editor configuration
1426  * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
1427  */