X-Git-Url: https://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=include%2Fgsm-sms.h;h=e99344a93857bb630f885a04b7b6a9647f7ea404;hp=29621568d48032bcfa63330dd2318b874bb81821;hb=24e1c79324b43b4f376f823da8406b777b6094c8;hpb=82ded122795dc5e6d93f2fc33e2d5f96ba6615b8 diff --git a/include/gsm-sms.h b/include/gsm-sms.h index 2962156..e99344a 100644 --- a/include/gsm-sms.h +++ b/include/gsm-sms.h @@ -12,38 +12,6 @@ Include file for SMS library. - $Log$ - Revision 1.1.1.1.2.1 2001/11/27 22:48:37 short - Update: orig2001_11_27_05_17 -> orig2001_11_27_22_58 - - Revision 1.1.1.2 2001/11/27 22:01:27 short - :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Tue Nov 27 22:58 CET 2001 - - Revision 1.7 2001/11/27 12:19:01 pkot - Cleanup, indentation, ANSI complaint preprocesor symbols (Jan Kratochvil, me) - - Revision 1.6 2001/11/22 17:56:53 pkot - smslib update. sms sending - - Revision 1.5 2001/11/20 16:22:23 pkot - First attempt to read Picture Messages. They should appear when you enable DEBUG. Nokia seems to break own standards. :/ (Markus Plail) - - Revision 1.4 2001/11/19 13:09:40 pkot - Begin work on sms sending - - Revision 1.3 2001/11/18 00:54:32 pkot - Bugfixes. I18n of the user responses. UDH support in libsms. Business Card UDH Type - - Revision 1.2 2001/11/13 16:12:21 pkot - Preparing libsms to get to work. 6210/7110 SMS and SMS Folder updates - - Revision 1.1 2001/11/08 16:23:20 pkot - New version of libsms. Not functional yet, but it reasonably stable API. - - Revision 1.1 2001/07/09 23:06:26 pkot - Moved sms.* files from my hard disk to CVS - - */ #ifndef __gnokii_sms_h_ @@ -68,8 +36,7 @@ #define SMS_MAX_ADDRESS_LENGTH (40) /* FIXME: what value should be here? (Pawel Kot) */ -//#define GSM_MAX_USER_DATA_HEADER_LENGTH (10) -#define SMS_MAX_UDH_HEADER_NUMBER 10 +#define SMS_MAX_UDH_NUMBER 10 /*** MEMORY INFO ***/ @@ -239,11 +206,22 @@ typedef enum { /*** MESSAGE CENTER ***/ +typedef enum { + SMS_FText = 0x00, /* Plain text message. */ + SMS_FFax = 0x22, /* Fax message. */ + SMS_FVoice = 0x24, /* Voice mail message. */ + SMS_FERMES = 0x25, /* ERMES message. */ + SMS_FPaging = 0x26, /* Paging. */ + SMS_FUCI = 0x2d, /* Email message in 8110i. */ + SMS_FEmail = 0x32, /* Email message. */ + SMS_FX400 = 0x31 /* X.400 message. */ +} SMS_MessageFormat; + typedef struct { int No; /* Number of the SMSC in the phone memory. */ SMS_NumberType Type; char Name[GSM_MAX_SMS_CENTER_NAME_LENGTH]; /* Name of the SMSC. */ - SMS_IndicationType Format; /* SMS is sent as text/fax/paging/email. */ + SMS_MessageFormat Format; /* SMS is sent as text/fax/paging/email. */ SMS_ValidityPeriod Validity; /* Validity of SMS Message. */ char Number[GSM_MAX_SMS_CENTER_LENGTH]; /* Number of the SMSC. */ char Recipient[GSM_MAX_SMS_CENTER_LENGTH]; /* Number of the default recipient. */ @@ -336,7 +314,7 @@ typedef struct { unsigned short UDH_No; /* Number of presend UDHs */ unsigned int UDH_Length; /* Length of the whole UDH */ - SMS_UDHInfo UDH[SMS_MAX_UDH_HEADER_NUMBER]; /* User Data Header Indicator & User Data Header (9.2.3.23 & 9.2.3.24) */ + SMS_UDHInfo UDH[SMS_MAX_UDH_NUMBER]; /* User Data Header Indicator & User Data Header (9.2.3.23 & 9.2.3.24) */ SMS_DateTime SMSCTime; /* Service Centre Time Stamp (9.2.3.11) */ SMS_DateTime Time; /* Discharge Time (9.2.3.13) */ @@ -349,6 +327,44 @@ typedef struct { // unsigned char Parameter[???]; /* Parameter Indicator (9.2.3.27); FIXME: how to use it??? */ } GSM_SMSMessage; +/* Define the layout of the SMS message header */ +typedef struct { + bool IsSupported; + short MoreMessages; + short ReplyViaSameSMSC; + short RejectDuplicates; + short Report; + short Number; + short Reference; + short PID; + short ReportStatus; + short Length; + short DataCodingScheme; + short Validity; + short UserDataHeader; + short MessageCenter; + bool IsMessageCenterCoded; + short RemoteNumber; + bool IsRemoteNumberCoded; + short SMSCTime; + short Time; + short MemoryType; + short Status; + short UserData; + bool IsUserDataCoded; +} SMSMessage_Layout; + +/* Define set of SMS Headers for the phone series */ +typedef struct { + unsigned short Type; + SMSMessage_Layout Deliver; + SMSMessage_Layout Submit; + SMSMessage_Layout DeliveryReport; + SMSMessage_Layout Picture; +} SMSMessage_PhoneLayout; + +extern SMSMessage_PhoneLayout layout; + /*** FOLDERS ***/ /* Maximal number of SMS folders */