messagingfw/biomsgfw/wappinc/wappdef.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Definitions of WBXML message tokens for use in the Wap  Parser, WAPP
       
    15 // 
       
    16 //
       
    17 
       
    18 #if !defined (__WAPPDEF_H__)
       
    19 #define __WAPPDEF_H__
       
    20 
       
    21 // *********      GENERAL WBXML TOKENS       ***************
       
    22 // WBXML global tokens - applicable to all messages
       
    23 // See WAP Binary XML Content Format, 16-Jun-99, p16.  
       
    24 // These and our message specific tokens define our DTD
       
    25 
       
    26 // As our DTD is hard coded into the app, we don't use the following - 
       
    27 //		SWITCH_PAGE - not defined as we only have 1 page
       
    28 //		EXT_I_0, EXT_I_1, EXT_I_2
       
    29 //		PI - don't define processing inline - all hard coded
       
    30 //		LITERAL,LITERAL_C,LITERAL_A,LITERAL_AC  - not using literals, don't define elements inline
       
    31 //		EXT_T_0,EXT_T_1,EXT_T_2, EXT_0, EXT_1, EXT_2  - not using document extensions
       
    32 //		OPAQUE - not using opaque data
       
    33 
       
    34 #define KWAPP_STR_TERM  0x00	// Basically the NULL terminator character for a string
       
    35 #define KWAPP_END_TAG	0x01    // Code for the end of an element
       
    36 #define KWAPP_ENTITY	0x02    // indicates the start of a character entity number
       
    37 #define KWAPP_STR_I		0x03    // indicates the start of an inline string,
       
    38 								// terminated by '\0', OR STR_TERMINATOR
       
    39 #define	KWAPP_STR_T		0X83    // a reference to the string table follows. Token is followed
       
    40 								// by multi byte Int32 referencing an offset in the string table
       
    41 
       
    42 #define KWAPP_TAG_CONTENT		0x40 // Bit 6 of the Wap Tag is set when a element has content
       
    43 #define KWAPP_TAG_ATTRIBUTES	0x80 // Bit 7 of Tag is set when the element has attributes
       
    44 #define KWAPP_TAG_ATTRIBUTES_CONTENT 0XC0  // Bits 6 & 7 are set - attributes and content
       
    45 #define KWAPP_MB_INT32_CONTINUATION  0x80  // Continuation Bit of an octet of a Multibyte 32 bit int is set.
       
    46 // Binary encoding for remote configuration of WAP browser settings
       
    47 // same as for the Nokia 7110 
       
    48 
       
    49 // **********    APPLICATION SPECIFIC CODE LEVEL TAG TOKENS    *************
       
    50 #define	KWAPP_CHAR_LIST		  0x05	// Code level tag (CLT), indicates start 
       
    51 									// of a characteristic list element
       
    52 #define KWAPP_CHARACTERISTIC  0x06	// code level tag (CLT), indicates start 
       
    53 									// of a characteristic element
       
    54 #define KWAPP_PARM			  0x07	// CLT  indicating start of a 
       
    55 									// attribute element of a characteristic
       
    56 
       
    57 // ***************	 ATTRIBUTE TOKENS    *****************************
       
    58 #define KWAPP_TYPE				0x05 // Undocumented token which indicates the 
       
    59 								  	 // start of a TYPE attribute i.e. "TYPE="
       
    60 #define KWAPP_ADDR_TYPE			0x06 // Characteristic type  = ADDRESS
       
    61 #define KWAPP_URL_TYPE			0x07 // Characteristic type = URL 
       
    62 #define KWAPP_NAME_TYPE			0x08 // Characteristic Type = NAME 
       
    63 #define KWAPP_ID				0x7D // Characteristic Type = ID 
       
    64 #define KWAPP_BOOKMARK			0x7F // Characteristic Type = BOOKMARK
       
    65 
       
    66 #define KWAPP_NAME_ATTRIB		0x10 // A NAME attribute follows, i.e "NAME="
       
    67 #define KWAPP_VALUE_ATTRIB		0x11 // A VALUE attribute follows, i.e "VALUE"
       
    68 
       
    69 // ***************   PARM TYPES and VALUES  ***************************
       
    70 #define KWAPP_BEARER			0x12 // This is a BEARER element 
       
    71 #define KWAPP_PROXY				0x13 // This is a PROXY 
       
    72 #define KWAPP_PORT				0x14 // PORT element
       
    73 #define KWAPP_NAME				0x15 // This is a NAME element 
       
    74 
       
    75 // IMPORTANT tag 0x16 had different meanings for different versions of the OTA settings 
       
    76 // Not in Ver 4.0, = ICON token in Version 4.3 but 4.3 NOT SUPPORTED!!
       
    77 
       
    78 #define KWAPP_PROXYTYPE			0x16 // PROXY_TYPE in Settings specification version 5.0!
       
    79 
       
    80 #define KWAPP_URL				0x17 // Not defined for Version 4.0
       
    81 									 // Start of a URL, i.e. "TYPE=URL" for Version 5.0 
       
    82 #define KWAPP_PROXY_AUTHNAME	0x18 // Not defined for Ver. 4.0 - website uses Proxy token and inline string "AUTHNAME"
       
    83 									 // Version 5.0 - proxy name follows
       
    84 #define KWAPP_PROXY_AUTHSECRET	0x19 // Not defined for Version 4.0 - use Proxy token and inline string
       
    85 									 // Versions 5.0 - the password for the proxy follows
       
    86 #define KWAPP_SMS_SMSC_ADDR		0x1A // Service centre address for SMS service
       
    87 #define KWAPP_USSD_SERV_CODE	0x1B // Service centre address for USSD service
       
    88 #define KWAPP_ACCESS_POINT_NAME	0x1C // GPRS access point
       
    89 #define KWAPP_PPP_LOGIN_TYPE	0x1D 
       
    90 #define KWAPP_PROXY_LOGIN_TYPE	0x1E 
       
    91 #define KWAPP_CSD_DIALSTRING	0x21 // Dialing sting for CSD gateway
       
    92 #define KWAPP_PPP_AUTHTYPE		0x22 // type of authentification
       
    93 #define KWAPP_PPP_AUTHNAME		0x23 // authentification name
       
    94 #define KWAPP_PPP_AUTHSECRET	0x24 // authentification password
       
    95 #define KWAPP_PPP_LOGINTYPE		0x25 // authentification password
       
    96 #define	KWAPP_CSD_CALLTYPE		0x28 // CSD calltype 
       
    97 #define KWAPP_CSD_CALLSPEED		0x29 // CSD callspeed
       
    98 
       
    99 #define KWAPP_GSM_SMS_OLD		0x41 // Defined as GSM\SMS in Nokia Spec version 4.0,but not 5.0
       
   100 									 // Distinguish it's Ver 4.0 by WAP Version ( = 1.0 )
       
   101 									 // For versions 5.0 the WAP  XML version = 1.1, & token = 0x46 
       
   102 
       
   103 #define KWAPP_GSM_CSD			0x45 // GSM CSD service 
       
   104 
       
   105 // IMPORTANT tag 0x46 has multiple meaning across different versions of the Over the Air settings
       
   106 #define KWAPP_GSM_SMS_NEW		0x46 // Not defined for Version 4.0
       
   107 									 //  GSM SMS  Nokia spec version 5.0
       
   108 
       
   109 #define KWAPP_GSM_USSD			0x47 //  Unstructured Short Service Data service 
       
   110 									 //  Not defined for version 4.0  
       
   111 
       
   112 //IMPORTANT tag 0x48 has different meanings in different versions of the Over the Air Settings specs
       
   113 #define KWAPP_IS136				0x48 // Not defined for Version 4.0
       
   114 									 // IS-136/CSD service in Nokia spec version 5.0
       
   115 
       
   116 #define KWAPP_GPRS				0x49 // GSM/GPRS service  - added in OTA v6.0
       
   117 
       
   118 
       
   119 #define KWAPP_PORT_9200			0x60 // Port 9200 - non continuous and not secure
       
   120 #define KWAPP_PORT_9201			0x61 // Port 9201 - continuous but not secure
       
   121 #define KWAPP_PORT_9202			0x62 // Indicates port 9202 - secure but non continuous conection
       
   122 #define KWAPP_PORT_9203			0x63 // Indicates port 9203 - secure and continuous 
       
   123 #define KWAPP_AUTOMATIC			0x64 
       
   124 #define KWAPP_MANUAL			0x65 
       
   125 #define KWAPP_SPEED_AUTO		0x6A // Use auto selection of speed
       
   126 #define KWAPP_SPEED_9600		0x6B // Indicates comm speed is 9600
       
   127 #define KWAPP_SPEED_14400		0x6C // Indicates comm speed is 14400
       
   128 #define	KWAPP_SPEED_19200		0x6D // Comm speed is 19200
       
   129 #define KWAPP_SPEED_28800		0x6E // Comms speed is 28800
       
   130 #define KWAPP_SPEED_38400		0x6F // Comms speed is 38400
       
   131 #define KWAPP_PAP				0x70 // Interface protocol = PAP
       
   132 #define KWAPP_CHAP				0x71 // Interface protocol = CHAP
       
   133 #define KWAPP_ANALOGUE			0x72 // Analogue connection
       
   134 #define KWAPP_ISDN				0x73 // Digital ISDN connection
       
   135 #define KWAPP_SPEED_43200		0x74 // Communication speed of 42K
       
   136 #define KWAPP_SPEED_56700		0x75 // Comm speed of 56k
       
   137 #define KWAPP_MSISDN_NO			0x76 // Proxy type is MSISDN number (relevant for USSD)
       
   138 #define KWAPP_IPV4				0x77 // Proxy type is an IP address (relevant for USSD)
       
   139 #define KWAPP_MSCHAP			0x78 // Interface protocol = CHAP
       
   140 #define KWAPP_NAME_ISP			0X7E // Start of Internet Service Provider follows
       
   141 #define KWAPP_MMS_URL			0x7C // Address of Multi Media Service Centre -added in OTA v7.0
       
   142 
       
   143 
       
   144 // Labels for use in array of ParsedFields - application specific not Nokia 
       
   145 
       
   146 // CHARACTERISTIC DELIMITORS
       
   147 _LIT(KWappCharAddress,	"CHAR-ADDRESS"); // Start of an Address Characteristic
       
   148 _LIT(KWappCharName,		"CHAR-NAME");	 // Start of a Name Characteristic
       
   149 _LIT(KWappCharURL,		"CHAR-URL");	 // Start of a URL Characteristic	
       
   150 _LIT(KWappCharMMSURL,	"CHAR-MMSURL");	 // Start of a URL Characteristic	
       
   151 _LIT(KWappCharBookmark, "CHAR-BOOKMARK");// Start of a Bookmark Characteristic
       
   152 _LIT(KWappCharID,		"CHAR-ID");		 // Start of an ID characteristic
       
   153 
       
   154 _LIT(KWappXMLversion,"VERSIONx10");
       
   155 _LIT(KWappPublicID, "PUBLICID");
       
   156 _LIT(KWappCharacterSet, "CHARSET");
       
   157 
       
   158 //XML Document Characteristic Tags
       
   159 _LIT(KWappAddr, "ADDRESS");  
       
   160 _LIT(KWappURL, "URL");
       
   161 _LIT(KWappMMSURL, "MMSURL"); // Added in v6.6 of Nokia OTA Spec
       
   162 _LIT(KWappName, "NAME");  
       
   163 _LIT(KWappBookmark, "BOOKMARK");
       
   164 _LIT(KWappID, "ID");
       
   165 
       
   166 
       
   167 // General tags
       
   168 _LIT(KWappBearer, "BEARER");
       
   169 _LIT(KWappProxy, "PROXY");
       
   170 _LIT(KWappPort, "PORT");
       
   171 _LIT(KWappProxyType, "PROXY_TYPE");
       
   172 
       
   173 _LIT(KWappProxyAuthName, "PROXY_AUTHNAME");
       
   174 _LIT(KWappProxyAuthSecret, "PROXY_AUTHSECRET");
       
   175 _LIT(KWappProxyLoginType, "PROXY_LOGINTYPE");
       
   176 _LIT(KWappSMSCAddress, "SMS_SMSC_ADDRESS");
       
   177 _LIT(KWappUSSDCode, "USSD_SERVICE_CODE");
       
   178 _LIT(KWappISP, "ISP_NAME");
       
   179 _LIT(KWappAccessPointName, "ACCESS_POINT_NAME");
       
   180 
       
   181 _LIT(KWappCsdDial, "CSD_DIALSTRING");
       
   182 _LIT(KWappPPPAuthType, "PPP_AUTHTYPE");
       
   183 _LIT(KWappPPPAuthName, "PPP_AUTHNAME");
       
   184 _LIT(KWappPPPAuthSecret, "PPP_AUTHSECRET");
       
   185 _LIT(KWappPPPLoginType, "PPP_LOGINTYPE");
       
   186 _LIT(KWappCsdCallType, "CSD_CALLTYPE");
       
   187 _LIT(KWappCsdCallSpeed, "CSD_CALLSPEED");
       
   188 
       
   189 _LIT(KWappGsmCsd, "GSM/CSD");
       
   190 _LIT(KWappGsmSms, "GSM/SMS");
       
   191 _LIT(KWappGsmUssd, "GSM/USSD");
       
   192 _LIT(KWappIS136Csd, "IS136/CSD");
       
   193 _LIT(KWappGprs, "GPRS");   // Added in OTA v6.0
       
   194 
       
   195 _LIT(KWappPort9200, "9200");
       
   196 _LIT(KWappPort9201, "9201");
       
   197 _LIT(KWappPort9202, "9202");
       
   198 _LIT(KWappPort9203, "9203");
       
   199 
       
   200 _LIT(KWappSpeedAuto, "AUTO");
       
   201 _LIT(KWappSpeed9600, "9600");
       
   202 _LIT(KWappSpeed14400, "14400");
       
   203 // Additional speeds added in Version 5.0
       
   204 _LIT(KWappSpeed19200, "19200");
       
   205 _LIT(KWappSpeed28800, "28800");
       
   206 _LIT(KWappSpeed38400, "38400");
       
   207 _LIT(KWappSpeed43200, "43200");
       
   208 _LIT(KWappSpeed56700, "57600");
       
   209 
       
   210 _LIT(KWappPAP, "PAP");
       
   211 _LIT(KWappCHAP, "CHAP");
       
   212 _LIT(KWappMSCHAP, "MSCHAP");
       
   213 _LIT(KWappAnalogue, "ANALOGUE");
       
   214 _LIT(KWappISDN, "ISDN");
       
   215 
       
   216 _LIT(KWappAuthAutomatic, "AUTOMATIC");
       
   217 _LIT(KWappAuthManual, "MANUAL");
       
   218 
       
   219 _LIT(KWappMsisdnNo, "MSISDN_NO");
       
   220 _LIT(KWappIpv4, "IPV4");
       
   221 
       
   222 
       
   223 #endif