epoc32/include/uriutilscommon.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 uriutilscommon.h
     1 // Copyright (c) 2001-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // 
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file UriUtilsCommon.h
       
    22  @publishedAll
       
    23  @released
       
    24 */
       
    25 
       
    26 #ifndef __URIUTILSCOMMON_H__
       
    27 #define __URIUTILSCOMMON_H__
       
    28 
       
    29 // System includes
       
    30 //
       
    31 #include <e32base.h>
       
    32 
       
    33 /** Error Base value */
       
    34 const TInt KUriUtilsErrorBase		= -5000;
       
    35 
       
    36 /**	
       
    37 enum TUriError
       
    38 Enum defining the error and panic codes used in the UriUtils components.
       
    39 @publishedAll
       
    40 @released
       
    41 @since 6.0
       
    42 */
       
    43 enum TUriUtilsError
       
    44 	{
       
    45 	/** Error specifying the use of an invalid component index */
       
    46 	KUriUtilsErrBadComponentIndex			= KUriUtilsErrorBase,
       
    47 	/** Error specifying the use of a base uri path is not absolute and not empty */
       
    48 	KUriUtilsErrBadBasePath					= KUriUtilsErrorBase - 1,
       
    49 	/** Error specifying that a buffer is not big enough to append a component and delimiters */
       
    50 	KUriUtilsErrBufferOverflow				= KUriUtilsErrorBase - 2,
       
    51 	/** Error specifying the use of an supported parsing mode */
       
    52 	KUriUtilsErrBadDelimitedParserMode		= KUriUtilsErrorBase - 3,
       
    53 	/** Error specifying that the delimiting character is not set */
       
    54 	KUriUtilsErrNoDelimiter					= KUriUtilsErrorBase - 4,
       
    55 	/** Error specifying that the data has not been parsed */
       
    56 	KUriUtilsErrNotParsed					= KUriUtilsErrorBase - 5,
       
    57 	/** Error specifying that a 16-bit character was found in data to be escape encode */
       
    58 	KUriUtilsErr16BitChar					= KUriUtilsErrorBase - 6,
       
    59 	/** Error specifying that a badly formed escape triple was found in data being escape decoded */
       
    60 	KUriUtilsErrBadEscapeTriple				= KUriUtilsErrorBase - 7,
       
    61 	/** Error specifying that charconv was unable to convert the input data */
       
    62 	KUriUtilsCannotConvert					= KUriUtilsErrorBase - 8,
       
    63 	/** Error specifying that there	was empty data */
       
    64 	KUriUtilsErrEmptyData					= KUriUtilsErrorBase - 9,
       
    65 	/** Error specifying that there is no character representation of an integer */
       
    66 	KUriUtilsErrNoIntegerInData			= KUriUtilsErrorBase - 10,
       
    67 	/** Error code specifying an invalid uri */
       
    68 	KUriUtilsErrInvalidUri					= KUriUtilsErrorBase - 11,
       
    69 	/** Error code for unsupported escaping mode */
       
    70 	KUriUtilsErrBadEscapeMode				= KUriUtilsErrorBase - 12,
       
    71 	/** Error code for unsupported text whitespace removal mode */
       
    72 	KUriUtilsErrBadTextRemoveMode			= KUriUtilsErrorBase - 13,
       
    73 	/**	Quoted string could not be decoded as it is malformed. */
       
    74 	KUriUtilsErrDecodeMalformedQuotedString	= KUriUtilsErrorBase - 14,
       
    75 	/** Error code specifying an invalid scheme */
       
    76 	KUriUtilsErrInvalidScheme				= KUriUtilsErrorBase - 15,
       
    77 	/** Error code specifying an invalid username and/or password */
       
    78 	KUriUtilsErrInvalidUserInfo				= KUriUtilsErrorBase - 16,
       
    79 	/** Error code specifying an invalid host */
       
    80 	KUriUtilsErrInvalidHost					= KUriUtilsErrorBase - 17,
       
    81 	/** Error code specifying an invalid port */
       
    82 	KUriUtilsErrInvalidPort					= KUriUtilsErrorBase - 18,
       
    83 	/** Error code specifying an invalid path */
       
    84 	KUriUtilsErrInvalidPath					= KUriUtilsErrorBase - 19,
       
    85 	/** Error code specifying an invalid sip parameter */
       
    86 	KUriUtilsErrInvalidParam				= KUriUtilsErrorBase - 20,
       
    87 	/** Error code specifying an invalid query */
       
    88 	KUriUtilsErrInvalidQuery				= KUriUtilsErrorBase - 21,
       
    89 	/** Error code specifying an invalid sip headers */
       
    90 	KUriUtilsErrInvalidHeaders				= KUriUtilsErrorBase - 22,
       
    91 	/** Error code specifying an invalid fragment */
       
    92 	KUriUtilsErrInvalidFragment				= KUriUtilsErrorBase - 23,
       
    93 	/** Error code specifying that schemes are not equivalent */
       
    94 	KUriUtilsErrDifferentScheme				= KUriUtilsErrorBase - 24, 
       
    95 	/** Error code specifying that usernames and passwords are not equivalent */
       
    96 	KUriUtilsErrDifferentUserInfo			= KUriUtilsErrorBase - 25,
       
    97 	/** Error code specifying that hosts are not equivalent */
       
    98 	KUriUtilsErrDifferentHost				= KUriUtilsErrorBase - 26,
       
    99 	/** Error code specifying that ports are not equivalent */
       
   100 	KUriUtilsErrDifferentPort				= KUriUtilsErrorBase - 27,
       
   101 	/** Error code specifying that paths are not equivalent */
       
   102 	KUriUtilsErrDifferentPath				= KUriUtilsErrorBase - 28,
       
   103 	/** Error code specifying that queries are not equivalent */
       
   104 	KUriUtilsErrDifferentQuery				= KUriUtilsErrorBase - 30,
       
   105 	/** Error code specifying that fragments are not equivalent */
       
   106     KUriUtilsErrDifferentFragment			= KUriUtilsErrorBase - 32,
       
   107 	/** Error code specifying that a non-numeric character was found in data */
       
   108     KUriUtilsErrMalformedInteger			= KUriUtilsErrorBase - 33
       
   109 	};
       
   110 
       
   111 // Constants
       
   112 //
       
   113 /** Scheme Delimiter */
       
   114 const TInt KSchemeDelimiter		= ':';
       
   115 /** Userinfo Delimiter */
       
   116 const TInt KUserinfoDelimiter	= '@';
       
   117 /** Equals Separator */
       
   118 const TInt KUserPwdSeparator	= ':';
       
   119 /** close Brace */
       
   120 const TInt KEqualsSeparator		= '=';
       
   121 /** Slash Delimiter */
       
   122 const TInt KPortDelimiter		= ':';
       
   123 /** close Brace */
       
   124 const TInt KSlashDelimiter		= '/';
       
   125 /** Fragment Delimiter */
       
   126 const TInt KQueryDelimiter		= '?';
       
   127 /** close Brace */
       
   128 const TInt KFragmentDelimiter	= '#';
       
   129 /** param delimiter */
       
   130 const TInt KParamDelimiter		= ';';
       
   131 /** open Brace */
       
   132 const TInt KIPv6UriOpenBrace	= '[';
       
   133 /** close Brace */
       
   134 const TInt KIPv6UriCloseBrace	= ']';
       
   135 
       
   136 #endif	// __URIUTILSCOMMON_H__