1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/wappdef.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,223 @@
1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Definitions of WBXML message tokens for use in the Wap Parser, WAPP
1.18 +//
1.19 +//
1.20 +
1.21 +#if !defined (__WAPPDEF_H__)
1.22 +#define __WAPPDEF_H__
1.23 +
1.24 +// ********* GENERAL WBXML TOKENS ***************
1.25 +// WBXML global tokens - applicable to all messages
1.26 +// See WAP Binary XML Content Format, 16-Jun-99, p16.
1.27 +// These and our message specific tokens define our DTD
1.28 +
1.29 +// As our DTD is hard coded into the app, we don't use the following -
1.30 +// SWITCH_PAGE - not defined as we only have 1 page
1.31 +// EXT_I_0, EXT_I_1, EXT_I_2
1.32 +// PI - don't define processing inline - all hard coded
1.33 +// LITERAL,LITERAL_C,LITERAL_A,LITERAL_AC - not using literals, don't define elements inline
1.34 +// EXT_T_0,EXT_T_1,EXT_T_2, EXT_0, EXT_1, EXT_2 - not using document extensions
1.35 +// OPAQUE - not using opaque data
1.36 +
1.37 +#define KWAPP_STR_TERM 0x00 // Basically the NULL terminator character for a string
1.38 +#define KWAPP_END_TAG 0x01 // Code for the end of an element
1.39 +#define KWAPP_ENTITY 0x02 // indicates the start of a character entity number
1.40 +#define KWAPP_STR_I 0x03 // indicates the start of an inline string,
1.41 + // terminated by '\0', OR STR_TERMINATOR
1.42 +#define KWAPP_STR_T 0X83 // a reference to the string table follows. Token is followed
1.43 + // by multi byte Int32 referencing an offset in the string table
1.44 +
1.45 +#define KWAPP_TAG_CONTENT 0x40 // Bit 6 of the Wap Tag is set when a element has content
1.46 +#define KWAPP_TAG_ATTRIBUTES 0x80 // Bit 7 of Tag is set when the element has attributes
1.47 +#define KWAPP_TAG_ATTRIBUTES_CONTENT 0XC0 // Bits 6 & 7 are set - attributes and content
1.48 +#define KWAPP_MB_INT32_CONTINUATION 0x80 // Continuation Bit of an octet of a Multibyte 32 bit int is set.
1.49 +// Binary encoding for remote configuration of WAP browser settings
1.50 +// same as for the Nokia 7110
1.51 +
1.52 +// ********** APPLICATION SPECIFIC CODE LEVEL TAG TOKENS *************
1.53 +#define KWAPP_CHAR_LIST 0x05 // Code level tag (CLT), indicates start
1.54 + // of a characteristic list element
1.55 +#define KWAPP_CHARACTERISTIC 0x06 // code level tag (CLT), indicates start
1.56 + // of a characteristic element
1.57 +#define KWAPP_PARM 0x07 // CLT indicating start of a
1.58 + // attribute element of a characteristic
1.59 +
1.60 +// *************** ATTRIBUTE TOKENS *****************************
1.61 +#define KWAPP_TYPE 0x05 // Undocumented token which indicates the
1.62 + // start of a TYPE attribute i.e. "TYPE="
1.63 +#define KWAPP_ADDR_TYPE 0x06 // Characteristic type = ADDRESS
1.64 +#define KWAPP_URL_TYPE 0x07 // Characteristic type = URL
1.65 +#define KWAPP_NAME_TYPE 0x08 // Characteristic Type = NAME
1.66 +#define KWAPP_ID 0x7D // Characteristic Type = ID
1.67 +#define KWAPP_BOOKMARK 0x7F // Characteristic Type = BOOKMARK
1.68 +
1.69 +#define KWAPP_NAME_ATTRIB 0x10 // A NAME attribute follows, i.e "NAME="
1.70 +#define KWAPP_VALUE_ATTRIB 0x11 // A VALUE attribute follows, i.e "VALUE"
1.71 +
1.72 +// *************** PARM TYPES and VALUES ***************************
1.73 +#define KWAPP_BEARER 0x12 // This is a BEARER element
1.74 +#define KWAPP_PROXY 0x13 // This is a PROXY
1.75 +#define KWAPP_PORT 0x14 // PORT element
1.76 +#define KWAPP_NAME 0x15 // This is a NAME element
1.77 +
1.78 +// IMPORTANT tag 0x16 had different meanings for different versions of the OTA settings
1.79 +// Not in Ver 4.0, = ICON token in Version 4.3 but 4.3 NOT SUPPORTED!!
1.80 +
1.81 +#define KWAPP_PROXYTYPE 0x16 // PROXY_TYPE in Settings specification version 5.0!
1.82 +
1.83 +#define KWAPP_URL 0x17 // Not defined for Version 4.0
1.84 + // Start of a URL, i.e. "TYPE=URL" for Version 5.0
1.85 +#define KWAPP_PROXY_AUTHNAME 0x18 // Not defined for Ver. 4.0 - website uses Proxy token and inline string "AUTHNAME"
1.86 + // Version 5.0 - proxy name follows
1.87 +#define KWAPP_PROXY_AUTHSECRET 0x19 // Not defined for Version 4.0 - use Proxy token and inline string
1.88 + // Versions 5.0 - the password for the proxy follows
1.89 +#define KWAPP_SMS_SMSC_ADDR 0x1A // Service centre address for SMS service
1.90 +#define KWAPP_USSD_SERV_CODE 0x1B // Service centre address for USSD service
1.91 +#define KWAPP_ACCESS_POINT_NAME 0x1C // GPRS access point
1.92 +#define KWAPP_PPP_LOGIN_TYPE 0x1D
1.93 +#define KWAPP_PROXY_LOGIN_TYPE 0x1E
1.94 +#define KWAPP_CSD_DIALSTRING 0x21 // Dialing sting for CSD gateway
1.95 +#define KWAPP_PPP_AUTHTYPE 0x22 // type of authentification
1.96 +#define KWAPP_PPP_AUTHNAME 0x23 // authentification name
1.97 +#define KWAPP_PPP_AUTHSECRET 0x24 // authentification password
1.98 +#define KWAPP_PPP_LOGINTYPE 0x25 // authentification password
1.99 +#define KWAPP_CSD_CALLTYPE 0x28 // CSD calltype
1.100 +#define KWAPP_CSD_CALLSPEED 0x29 // CSD callspeed
1.101 +
1.102 +#define KWAPP_GSM_SMS_OLD 0x41 // Defined as GSM\SMS in Nokia Spec version 4.0,but not 5.0
1.103 + // Distinguish it's Ver 4.0 by WAP Version ( = 1.0 )
1.104 + // For versions 5.0 the WAP XML version = 1.1, & token = 0x46
1.105 +
1.106 +#define KWAPP_GSM_CSD 0x45 // GSM CSD service
1.107 +
1.108 +// IMPORTANT tag 0x46 has multiple meaning across different versions of the Over the Air settings
1.109 +#define KWAPP_GSM_SMS_NEW 0x46 // Not defined for Version 4.0
1.110 + // GSM SMS Nokia spec version 5.0
1.111 +
1.112 +#define KWAPP_GSM_USSD 0x47 // Unstructured Short Service Data service
1.113 + // Not defined for version 4.0
1.114 +
1.115 +//IMPORTANT tag 0x48 has different meanings in different versions of the Over the Air Settings specs
1.116 +#define KWAPP_IS136 0x48 // Not defined for Version 4.0
1.117 + // IS-136/CSD service in Nokia spec version 5.0
1.118 +
1.119 +#define KWAPP_GPRS 0x49 // GSM/GPRS service - added in OTA v6.0
1.120 +
1.121 +
1.122 +#define KWAPP_PORT_9200 0x60 // Port 9200 - non continuous and not secure
1.123 +#define KWAPP_PORT_9201 0x61 // Port 9201 - continuous but not secure
1.124 +#define KWAPP_PORT_9202 0x62 // Indicates port 9202 - secure but non continuous conection
1.125 +#define KWAPP_PORT_9203 0x63 // Indicates port 9203 - secure and continuous
1.126 +#define KWAPP_AUTOMATIC 0x64
1.127 +#define KWAPP_MANUAL 0x65
1.128 +#define KWAPP_SPEED_AUTO 0x6A // Use auto selection of speed
1.129 +#define KWAPP_SPEED_9600 0x6B // Indicates comm speed is 9600
1.130 +#define KWAPP_SPEED_14400 0x6C // Indicates comm speed is 14400
1.131 +#define KWAPP_SPEED_19200 0x6D // Comm speed is 19200
1.132 +#define KWAPP_SPEED_28800 0x6E // Comms speed is 28800
1.133 +#define KWAPP_SPEED_38400 0x6F // Comms speed is 38400
1.134 +#define KWAPP_PAP 0x70 // Interface protocol = PAP
1.135 +#define KWAPP_CHAP 0x71 // Interface protocol = CHAP
1.136 +#define KWAPP_ANALOGUE 0x72 // Analogue connection
1.137 +#define KWAPP_ISDN 0x73 // Digital ISDN connection
1.138 +#define KWAPP_SPEED_43200 0x74 // Communication speed of 42K
1.139 +#define KWAPP_SPEED_56700 0x75 // Comm speed of 56k
1.140 +#define KWAPP_MSISDN_NO 0x76 // Proxy type is MSISDN number (relevant for USSD)
1.141 +#define KWAPP_IPV4 0x77 // Proxy type is an IP address (relevant for USSD)
1.142 +#define KWAPP_MSCHAP 0x78 // Interface protocol = CHAP
1.143 +#define KWAPP_NAME_ISP 0X7E // Start of Internet Service Provider follows
1.144 +#define KWAPP_MMS_URL 0x7C // Address of Multi Media Service Centre -added in OTA v7.0
1.145 +
1.146 +
1.147 +// Labels for use in array of ParsedFields - application specific not Nokia
1.148 +
1.149 +// CHARACTERISTIC DELIMITORS
1.150 +_LIT(KWappCharAddress, "CHAR-ADDRESS"); // Start of an Address Characteristic
1.151 +_LIT(KWappCharName, "CHAR-NAME"); // Start of a Name Characteristic
1.152 +_LIT(KWappCharURL, "CHAR-URL"); // Start of a URL Characteristic
1.153 +_LIT(KWappCharMMSURL, "CHAR-MMSURL"); // Start of a URL Characteristic
1.154 +_LIT(KWappCharBookmark, "CHAR-BOOKMARK");// Start of a Bookmark Characteristic
1.155 +_LIT(KWappCharID, "CHAR-ID"); // Start of an ID characteristic
1.156 +
1.157 +_LIT(KWappXMLversion,"VERSIONx10");
1.158 +_LIT(KWappPublicID, "PUBLICID");
1.159 +_LIT(KWappCharacterSet, "CHARSET");
1.160 +
1.161 +//XML Document Characteristic Tags
1.162 +_LIT(KWappAddr, "ADDRESS");
1.163 +_LIT(KWappURL, "URL");
1.164 +_LIT(KWappMMSURL, "MMSURL"); // Added in v6.6 of Nokia OTA Spec
1.165 +_LIT(KWappName, "NAME");
1.166 +_LIT(KWappBookmark, "BOOKMARK");
1.167 +_LIT(KWappID, "ID");
1.168 +
1.169 +
1.170 +// General tags
1.171 +_LIT(KWappBearer, "BEARER");
1.172 +_LIT(KWappProxy, "PROXY");
1.173 +_LIT(KWappPort, "PORT");
1.174 +_LIT(KWappProxyType, "PROXY_TYPE");
1.175 +
1.176 +_LIT(KWappProxyAuthName, "PROXY_AUTHNAME");
1.177 +_LIT(KWappProxyAuthSecret, "PROXY_AUTHSECRET");
1.178 +_LIT(KWappProxyLoginType, "PROXY_LOGINTYPE");
1.179 +_LIT(KWappSMSCAddress, "SMS_SMSC_ADDRESS");
1.180 +_LIT(KWappUSSDCode, "USSD_SERVICE_CODE");
1.181 +_LIT(KWappISP, "ISP_NAME");
1.182 +_LIT(KWappAccessPointName, "ACCESS_POINT_NAME");
1.183 +
1.184 +_LIT(KWappCsdDial, "CSD_DIALSTRING");
1.185 +_LIT(KWappPPPAuthType, "PPP_AUTHTYPE");
1.186 +_LIT(KWappPPPAuthName, "PPP_AUTHNAME");
1.187 +_LIT(KWappPPPAuthSecret, "PPP_AUTHSECRET");
1.188 +_LIT(KWappPPPLoginType, "PPP_LOGINTYPE");
1.189 +_LIT(KWappCsdCallType, "CSD_CALLTYPE");
1.190 +_LIT(KWappCsdCallSpeed, "CSD_CALLSPEED");
1.191 +
1.192 +_LIT(KWappGsmCsd, "GSM/CSD");
1.193 +_LIT(KWappGsmSms, "GSM/SMS");
1.194 +_LIT(KWappGsmUssd, "GSM/USSD");
1.195 +_LIT(KWappIS136Csd, "IS136/CSD");
1.196 +_LIT(KWappGprs, "GPRS"); // Added in OTA v6.0
1.197 +
1.198 +_LIT(KWappPort9200, "9200");
1.199 +_LIT(KWappPort9201, "9201");
1.200 +_LIT(KWappPort9202, "9202");
1.201 +_LIT(KWappPort9203, "9203");
1.202 +
1.203 +_LIT(KWappSpeedAuto, "AUTO");
1.204 +_LIT(KWappSpeed9600, "9600");
1.205 +_LIT(KWappSpeed14400, "14400");
1.206 +// Additional speeds added in Version 5.0
1.207 +_LIT(KWappSpeed19200, "19200");
1.208 +_LIT(KWappSpeed28800, "28800");
1.209 +_LIT(KWappSpeed38400, "38400");
1.210 +_LIT(KWappSpeed43200, "43200");
1.211 +_LIT(KWappSpeed56700, "57600");
1.212 +
1.213 +_LIT(KWappPAP, "PAP");
1.214 +_LIT(KWappCHAP, "CHAP");
1.215 +_LIT(KWappMSCHAP, "MSCHAP");
1.216 +_LIT(KWappAnalogue, "ANALOGUE");
1.217 +_LIT(KWappISDN, "ISDN");
1.218 +
1.219 +_LIT(KWappAuthAutomatic, "AUTOMATIC");
1.220 +_LIT(KWappAuthManual, "MANUAL");
1.221 +
1.222 +_LIT(KWappMsisdnNo, "MSISDN_NO");
1.223 +_LIT(KWappIpv4, "IPV4");
1.224 +
1.225 +
1.226 +#endif