Include file for SMS library.
$Log$
- Revision 1.1.1.1 2001/11/25 21:59:21 short
- :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
-
- 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.1.6 2002/04/03 00:08:20 short
+ Found in "gnokii-working" directory, some November-patches version
Revision 1.1 2001/11/08 16:23:20 pkot
New version of libsms. Not functional yet, but it reasonably stable API.
SMS_FaxMessage = 0x06,
SMS_EmailMessage = 0x07,
SMS_OtherMessage = 0x08,
- SMS_BusinessCard = 0x09,
- SMS_UnknownUDH = 0x0a
+ SMS_UnknownUDH = 0x09
} SMS_UDHType;
typedef struct {
} SMS_MessageValidity;
-/* This data-type is used to specify the type of the number. See the official
- GSM specification 03.40, version 6.1.0, section 9.1.2.5, page 35-37. */
-typedef enum {
- SMS_Unknown = 0x81, /* Unknown number */
- SMS_International = 0x91, /* International number */
- SMS_National = 0xa1, /* National number */
- SMS_Network = 0xb1, /* Network specific number */
- SMS_Subscriber = 0xc1, /* Subscriber number */
- SMS_Alphanumeric = 0xd0, /* Alphanumeric number */
- SMS_Abbreviated = 0xe1 /* Abbreviated number */
-} SMS_NumberType;
-
/*** MESSAGE CENTER ***/
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_ValidityPeriod Validity; /* Validity of SMS Message. */
char Recipient[GSM_MAX_SMS_CENTER_LENGTH]; /* Number of the default recipient. */
} SMS_MessageCenter;
+
/*** SHORT MESSAGE CORE ***/
+/* This data-type is used to specify the type of the number. See the official
+ GSM specification 03.40, version 6.1.0, section 9.1.2.5, page 35-37. */
+typedef enum {
+ SMS_Unknown = 0x81, /* Unknown number */
+ SMS_International = 0x91, /* International number */
+ SMS_National = 0xa1, /* National number */
+ SMS_Network = 0xb1, /* Network specific number */
+ SMS_Subscriber = 0xc1, /* Subscriber number */
+ SMS_Alphanumeric = 0xd0, /* Alphanumeric number */
+ SMS_Abbreviated = 0xe1 /* Abbreviated number */
+} SMS_NumberType;
+
typedef struct {
SMS_NumberType type;
char number[SMS_MAX_ADDRESS_LENGTH];
SMS_Submit_Report = 0x03, /* 01 1 */
SMS_Command = 0x04, /* 10 0 mark a report */
SMS_Status_Report = 0x05, /* 10 1 Section 9.2.3.1; 3rd digit is to */
- SMS_Picture = 0x07 /* Looks like Happy N*kia Engineers (TM) invention */
} SMS_MessageType;
typedef enum {
SMS_Unsent = 0x07
} SMS_MessageStatus;
-/* In contrast to GSM_MemoryType, SMS_MemoryType is phone dependant */
typedef enum {
- GMT_IN = 0x08, /* Inbox in 6210/7110 */
- GMT_OU = 0x10, /* Outbox in 6210/7110 */
- GMT_AR = 0x18, /* Archive in 6210/6110 */
- GMT_TE = 0x20, /* Templates in 6210/7110 */
- GMT_F1 = 0x29, /* 1st CUSTOM FOLDER in 6210/7110*/
- GMT_F2 = 0x31,
- GMT_F3 = 0x39,
- GMT_F4 = 0x41,
- GMT_F5 = 0x49,
- GMT_F6 = 0x51,
- GMT_F7 = 0x59,
- GMT_F8 = 0x61,
- GMT_F9 = 0x69,
- GMT_F10 = 0x71,
- GMT_F11 = 0x79,
- GMT_F12 = 0x81,
- GMT_F13 = 0x89,
- GMT_F14 = 0x91,
- GMT_F15 = 0x99,
- GMT_F16 = 0xA1,
- GMT_F17 = 0xA9,
- GMT_F18 = 0xB1,
- GMT_F19 = 0xB9,
- GMT_F20 = 0xC1 /* 20th CUSTOM FOLDER in 6210/7110 */
+ SMS_XXX = 0x01
} SMS_MemoryType;
/* Define datatype for SMS messages, describes precisely GSM Spec 03.40 */
SMS_MessageValidity Validity; /* Validity Period Format & Validity Period (9.2.3.3 & 9.2.3.12) - `Message validity' in the phone */
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_DateTime SMSCTime; /* Service Centre Time Stamp (9.2.3.11) */
// unsigned char Parameter[???]; /* Parameter Indicator (9.2.3.27); FIXME: how to use it??? */
} GSM_SMSMessage;
+extern GSM_Error EncodePDUSMS(GSM_SMSMessage *SMS, char *frame);
+extern GSM_Error DecodePDUSMS(unsigned char *message, GSM_SMSMessage *SMS, int MessageLength);
+extern GSM_Error EncodeTextSMS();
+extern GSM_Error DecodeTextSMS(unsigned char *message, GSM_SMSMessage *SMS);
+
/*** FOLDERS ***/
/* Maximal number of SMS folders */
typedef struct {
SMS_Folder Folder[MAX_SMS_FOLDERS];
- u8 FolderID[MAX_SMS_FOLDERS]; /* ID specific for this folder and phone. */
+ u8 FoldersID[MAX_SMS_FOLDERS]; /* ID specific for this folder and phone. */
/* Used in internal functions. Do not use it. */
u8 number; /* number of SMS folders */
} SMS_FolderList;
int New;
} GSM_CBMessage;
-extern int EncodePDUSMS(GSM_SMSMessage *SMS, char *frame);
-extern GSM_Error DecodePDUSMS(unsigned char *message, GSM_SMSMessage *SMS, int MessageLength);
-/* Do not use these yet */
-extern GSM_Error EncodeTextSMS();
-extern GSM_Error DecodeTextSMS(unsigned char *message, GSM_SMSMessage *SMS);
-
-/* FIXME: make this static */
-extern char *GetBCDNumber(u8 *Number);
-
#endif /* __gnokii_sms_h_ */