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