upnp/upnpstack_plat/upnp_common_api/inc/upnperrors.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 /** @file
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies  this distribution, and is available 
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declares UPnP and Http error codes 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_UPNPERRORS_H
       
    20 #define C_UPNPERRORS_H
       
    21 
       
    22 #include <e32base.h> 
       
    23 
       
    24 	enum THttpStatusCode {
       
    25 
       
    26 		// Informational 1xx
       
    27 		EHttpContinue		    =	100,
       
    28 		EHttpSwitchingProtocols =   101,
       
    29 
       
    30 		// Successful 2xx
       
    31 		EHttp200Ok			    =	200,
       
    32 		EHttpCreated		    =	201,
       
    33 		EHttpAccepted		    =	202,
       
    34 		EHttpNonAuthoritative	=	203,
       
    35 		EHttpNoContent			=	204,
       
    36 		EHttpResetContent		=	205,
       
    37 		EHttpPartialContent		=	206,
       
    38 
       
    39 		// Redirection 3xx	
       
    40 		EHttpMultipleChoises	=	300,
       
    41 		EHttpMovedPermanently	=	301,
       
    42 		EHttpFound				=	302,
       
    43 		EHttpSeeOther			=	303,
       
    44 		EHttpNotModified		=	304,
       
    45 		EHttpUseProxy			=	305,
       
    46 	    //	Unused				=	306,
       
    47 		EHttpTemporaryRedirect	=	307,
       
    48 
       
    49 		// Client error 4xx
       
    50 		EHttpBadRequest		    =	400,
       
    51 		EHttpUnAuthorized		=	401,
       
    52 		EHttpPaymentRequired	=	402,
       
    53 		EHttpForbidden			=	403,
       
    54 		EHttpNotFound			=	404,
       
    55 		EHttpMethodNotAllowed	=	405,
       
    56 		EHttpNotAcceptable		=	406,
       
    57 		EHttpProxyAuthenticationRequired	=	407,
       
    58 		EHttpRequestTimeout		=	408,
       
    59 		EHttpConflict			=	409,
       
    60 		EHttpGone				=	410,
       
    61 		EHttpLengthRequired		=	411,
       
    62 		EHttpPreconditionFailed	=	412,
       
    63 		EHttpEntityTooLarge		=	413,
       
    64 		EHttpUriTooLong			=	414,
       
    65 		EHttpUnsupportedMediaType=	415,
       
    66 		EHttpRequestedRangeNotSatisfiable   =   416,
       
    67 		EHttpExpectationFailed	=	417,
       
    68 		
       
    69 		// Server Error 5xx
       
    70 		EHttpInternalServerError=	500,
       
    71 		EHttpNotImplemented		=	501,
       
    72 		EHttpBadGateway			=	502,
       
    73 		EHttpServiceUnavailable	=	503,
       
    74 		EHttpGatewayTimeout		=	504,
       
    75 		EHttpVersionNotSupported=	505,
       
    76 		EHttpInsufficientStorage=	507 
       
    77 
       
    78 	};
       
    79 
       
    80 	// Informational 1xx
       
    81 	_LIT8( KHttpContinue,           "Continue" );	                // 100
       
    82 	_LIT8( KHttpSwitchingProtocols, "Switching Protocols" );        // 101
       
    83 
       
    84           
       
    85 	// Successful 2xx		
       
    86 	_LIT8( KHttpCreated,            "Created" );                    // 201
       
    87 	_LIT8( KHttpAccepted,           "Accepted" );                   // 202
       
    88 	_LIT8( KHttpNonAutohorative,    "Non-Authoritative Information" );// 203
       
    89 	_LIT8( KHttpNoContent,          "No Content" );                 // 204
       
    90 	_LIT8( KHttpResetContent,       "Reset Content" );              // 205
       
    91 	_LIT8( KHttpPartialContent,     "Partial Content" );            // 206
       
    92 
       
    93 	// Redirection 3xx	
       
    94 	_LIT8( KHttpMultipleChoises,    "Multiple Choices" );           // 300
       
    95 	_LIT8( KHttpMovedPermanently,   "Moved Permanently" );          // 301
       
    96 	_LIT8( KHttpFound,              "Found" );                      // 302
       
    97 	_LIT8( KHttpSeeOther,           " See Other" );                 // 303
       
    98 	_LIT8( KHttpNotModified,        "Not Modified" );               // 304
       
    99 	_LIT8( KHttpUseProxy,           "Use Proxy" );                  // 305
       
   100 	_LIT8( KHttpTemporaryRedirect,  "Temporary Redirect" );	        // 307
       
   101 
       
   102 	// Client error 4xx
       
   103 	_LIT8( KHttpBadRequest,         "Bad Request" );                 // 400
       
   104 	_LIT8( KHttpUnauthorized,       "Unauthorized" );                // 401
       
   105 	_LIT8( KHttpPaymentRequired,    "Payment Required" );            // 402
       
   106 	_LIT8( KHttpForbidden,          "Forbidden" );                   // 403
       
   107 	_LIT8( KHttpNotFound,           "Not Found" );                   // 404
       
   108 	_LIT8( KHttpMethodNotAllowed,   "Method Not Allowed" );          // 405
       
   109 	_LIT8( KHttpNotAcceptable,      "Not Acceptable" );              // 406
       
   110 	_LIT8( KHttpProxyAuthenticationRequired, "Proxy Authentication Required");//407
       
   111 	_LIT8( KHttpRequestTimeout,     "Request Timeout" );            // 408
       
   112 	_LIT8( KHttpConflict,           "Conflict" );                    // 409
       
   113 	_LIT8( KHttpGone,               "Gone" );                        // 410
       
   114 	_LIT8( KHttpLengthRequired,     "Length Required" );             // 411
       
   115 	_LIT8( KHttpPreconditionFailed, "Precondition Failed" );         // 412
       
   116 	_LIT8( KHttpEntityTooLarge,     "Request Entity Too Large" );    // 413
       
   117 	_LIT8( KHttpUriTooLarge,        "Request-URI Too Large" );       // 414
       
   118 	_LIT8( KHttpUnsupprotedMediaType, "Unsupported Media Type" );    // 415
       
   119 	_LIT8( KHttpRequestedRangeNotSatisfiable, "Requested range not satisfiable" );// 416
       
   120 	_LIT8( KHttpExpectationFailed,  "Expectation Failed" );          // 417
       
   121 
       
   122 		// Server Error 5xx
       
   123 	_LIT8( KHttpInternalServerError,"Internal Server Error" );	    // 500
       
   124 	_LIT8( KHttpNotImplemented,     "Not Implemented" );            // 501
       
   125 	_LIT8( KHttpBadGateway,         "Bad Gateway" );                // 502
       
   126 	_LIT8( KHttpServiceUnavailable, "Service Unavailable" );        // 503
       
   127 	_LIT8( KHttpGatewayTimeout,     "Gateway Time-out" );           // 504
       
   128 	_LIT8( KHttpVersionNotSupported,"HTTP Version not supported" );	// 505
       
   129 	
       
   130 	_LIT8( KHttpInsufficientStorage,"Insufficient Storage" );	// 507
       
   131 
       
   132 	enum TUpnpErrorCode {
       
   133 		EUpnpOk			=	0,
       
   134 		EUpnpUndefined	=	-1,
       
   135 
       
   136 		EHttpOk			=	200,
       
   137 
       
   138 		EBadRequest		=	400,
       
   139 		EInvalidAction	=	401,
       
   140 		EInvalidArgs	=	402,
       
   141 		EInvalidVar		=	404,
       
   142 		EPreconditionFailed=412,
       
   143 
       
   144 		EInternalServerError=500,
       
   145 		EActionFailed	=	501,
       
   146 
       
   147 		// 600-699 Common action errors
       
   148 		EArgumentValue	=	600,
       
   149 		EArgumentRange	=	601,
       
   150 		ENotImplemented	=	602,
       
   151 		EOutOfMemory	=	603,
       
   152 		EHumanIntervention=	604,
       
   153 		EStringTooLong	=	605,
       
   154 		ENotAuthorized	=	606,
       
   155 		ESignatureFailure =	607,
       
   156 		ESignatureMissing =	608,
       
   157 		ENotEncrypted	=	609,
       
   158 		EInvalidSequence =	610,
       
   159 		EInvalidUrl		=	611,
       
   160 		ENoSession		=	612,
       
   161 
       
   162 		// 700-799 Action specific errors
       
   163 		ENoSuchObject	=	701,
       
   164 		EInvalidCurrentTag= 702,
       
   165 		EInvalidNewTag	=	703,
       
   166 		ERequiredTag	=	704,
       
   167 		EReadOnlyTag	=	705,
       
   168 		EParameterMismatch = 706,
       
   169 		EInvalidSearch	=	708,
       
   170 		EInvalidSort	=	709,
       
   171 		ENoContainer	=	710,
       
   172 		ERestrictedObject=  711,
       
   173 		EBadMetadata	=	712,
       
   174 		ERestrictedParentObject=713,
       
   175 		ENoSourceResource = 714,
       
   176 		ESourceAccess	=	715,
       
   177 		ETransferBusy	=	716,
       
   178 		ENoFileTransfer	=	717,
       
   179 		ENoDestinationResource=718,
       
   180 		EDestinationAccess= 719,
       
   181 		ECannotProcess	=	720,
       
   182 
       
   183 		// 800-899 Action specific errors. Defined by vendor.
       
   184 		EUndefined		=	808
       
   185 		};
       
   186 	
       
   187 
       
   188 	_LIT8( KHttpOk, "OK" );	                                    /// 200
       
   189 		
       
   190 	_LIT8( KBadRequest,         "Bad Request" );	            /// 400
       
   191 	_LIT8( KInvalidAction,      "Invalid Action" );	            /// 401
       
   192 	_LIT8( KInvalidArgs,        "Invalid Args" );	            /// 402
       
   193 	_LIT8( KInvalidVar,         "Invalid Var" );	            /// 404
       
   194 	_LIT8( KPreconditionFailed, "Precondition Failed" );	    /// 412
       
   195 		
       
   196 	_LIT8( KInternalServerError,"Internal Server Error" );	    /// 500
       
   197 	_LIT8( KActionFailed,       "Action Failed" );	            /// 501
       
   198 		
       
   199 	// 600-699 Common action errors	
       
   200 	_LIT8( KArgumentValue,      "Argument Value Invalid" );	    /// 600
       
   201 	_LIT8( KArgumentRange,      "Argument Value Out of Range" );/// 601
       
   202 	_LIT8( KNotImplemented,     "Optional Action Not Implemented" );/// 602
       
   203 	_LIT8( KOutOfMemory,        "Out of Memory" );	            /// 603
       
   204 	_LIT8( KHumanIntervention,  "Human Intervention Required" );/// 604
       
   205 	_LIT8( KStringTooLong,      "String Argument Too Long" );   /// 605
       
   206 	_LIT8( KNotAuthorized,      "Action not authorized" );	    /// 606
       
   207 	_LIT8( KSignatureFailure,   "Signature failure" );	        /// 607
       
   208 	_LIT8( KSignatureMissing,   "Signature missing" );	        /// 608
       
   209 	_LIT8( KNotEncrypted,       "Not encrypted" );	            /// 609
       
   210 	_LIT8( KInvalidSequence,    "Invalid sequence" );	        /// 610
       
   211 	_LIT8( KInvalidUrl,         "Invalid control URL" );        /// 611
       
   212 	_LIT8( KNoSession,          "No such session" );	        /// 612
       
   213 		
       
   214 	// 700-799 Action specific errors	
       
   215 	_LIT8( KNoSuchObject,       "No such object" );	            /// 701
       
   216 	_LIT8( KInvalidCurrentTag,  "Invalid CurrentTagValue" );   	/// 702
       
   217 	_LIT8( KInvalidNewTag,      "Invalid NewTagValue" );	    /// 703
       
   218 	_LIT8( KRequiredTag,        "Required tag" );	            /// 704
       
   219 	_LIT8( KReadOnlyTag,        "Read only tag" );              /// 705
       
   220 	_LIT8( KInvalidConnectionReference,  "Invalid Connection Reference" );        	/// 706
       
   221 	_LIT8( KParameterMismatch,  "Parameter Mismatch" );        	/// 706
       
   222 	_LIT8( KInvalidSearch,      "Unsupported or invalid search criteria" );	/// 708
       
   223 	_LIT8( KInvalidSort,	    "Unsupported or invalid sort criteria" );	/// 709
       
   224 	_LIT8( KNoContainer,        "No such container" );	        /// 710
       
   225 	_LIT8( KRestrictedObject,   "Restricted object" );	        /// 711
       
   226 	_LIT8( KBadMetadata,        "Bad metadata" );	            /// 712
       
   227 	_LIT8( KRestrictedParentObject, "Restricted parent object" ); /// 713
       
   228 	_LIT8( KNoSourceResource,   "No such source resource" );	/// 714
       
   229 	_LIT8( KSourceAccess,       "Source resource access denied" ); /// 715
       
   230 	_LIT8( KTransferBusy,       "Transfer busy" );	            /// 716
       
   231 	_LIT8( KNoFileTransfer,     "No such file transfer" );	    /// 717
       
   232 	_LIT8( KNoDestinationResource,"No such destination resource" );	/// 718
       
   233 	_LIT8( KDestinationAccess,  "Destination resource access denied" );	/// 719
       
   234 	_LIT8( KCannotProcess,      "Cannot process the request" );	/// 720
       
   235 	
       
   236 
       
   237 
       
   238 #endif	// C_UPNPERRORS_H
       
   239 
       
   240 // End Of File