libUPnP  1.6.17
statcodes.h
00001 /*******************************************************************************
00002  *
00003  * Copyright (c) 2000-2003 Intel Corporation
00004  * All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are met:
00008  *
00009  * - Redistributions of source code must retain the above copyright notice,
00010  * this list of conditions and the following disclaimer.
00011  * - Redistributions in binary form must reproduce the above copyright notice,
00012  * this list of conditions and the following disclaimer in the documentation
00013  * and/or other materials provided with the distribution.
00014  * - Neither name of Intel Corporation nor the names of its contributors
00015  * may be used to endorse or promote products derived from this software
00016  * without specific prior written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00019  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00020  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00021  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
00022  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00024  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00025  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00026  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00027  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00028  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029  *
00030  ******************************************************************************/
00031 
00032 #ifndef GENLIB_NET_HTTP_STATCODES_H
00033 #define GENLIB_NET_HTTP_STATCODES_H
00034 
00035 /* HTTP response status codes */
00036 
00037 #define HTTP_CONTINUE                       100
00038 #define HTTP_SWITCHING_PROCOTOLS            101
00039 
00040 #define HTTP_OK                             200
00041 #define HTTP_CREATED                        201
00042 #define HTTP_ACCEPTED                       202
00043 #define HTTP_NON_AUTHORATATIVE              203
00044 #define HTTP_NO_CONTENT                     204
00045 #define HTTP_RESET_CONTENT                  205
00046 #define HTTP_PARTIAL_CONTENT                206
00047 
00048 #define HTTP_MULTIPLE_CHOICES               300
00049 #define HTTP_MOVED_PERMANENTLY              301
00050 #define HTTP_FOUND                          302
00051 #define HTTP_SEE_OTHER                      303
00052 #define HTTP_NOT_MODIFIED                   304
00053 #define HTTP_USE_PROXY                      305
00054 #define HTTP_UNUSED_3XX                     306
00055 #define HTTP_TEMPORARY_REDIRECT             307
00056 
00057 #define HTTP_BAD_REQUEST                    400
00058 #define HTTP_UNAUTHORIZED                   401
00059 #define HTTP_PAYMENT_REQD                   402
00060 #define HTTP_FORBIDDEN                      403
00061 #define HTTP_NOT_FOUND                      404
00062 #define HTTP_METHOD_NOT_ALLOWED             405
00063 #define HTTP_NOT_ACCEPTABLE                 406
00064 #define HTTP_PROXY_AUTH_REQD                407
00065 #define HTTP_REQUEST_TIMEOUT                408
00066 #define HTTP_CONFLICT                       409
00067 #define HTTP_GONE                           410
00068 #define HTTP_LENGTH_REQUIRED                411
00069 #define HTTP_PRECONDITION_FAILED            412
00070 #define HTTP_REQ_ENTITY_TOO_LARGE           413
00071 #define HTTP_REQ_URI_TOO_LONG               414
00072 #define HTTP_UNSUPPORTED_MEDIA_TYPE         415
00073 #define HTTP_REQUEST_RANGE_NOT_SATISFIABLE  416
00074 #define HTTP_EXPECTATION_FAILED             417
00075 
00076 #define HTTP_INTERNAL_SERVER_ERROR          500
00077 #define HTTP_NOT_IMPLEMENTED                501
00078 #define HTTP_BAD_GATEWAY                    502
00079 #define HTTP_SERVICE_UNAVAILABLE            503
00080 #define HTTP_GATEWAY_TIMEOUT                504
00081 #define HTTP_HTTP_VERSION_NOT_SUPPORTED     505
00082 
00083 /* HTTP lib error codes */
00084 
00085 #define HTTP_E_OUT_OF_MEMORY    -2
00086 #define HTTP_E_BAD_MSG_FORMAT   -3
00087 #define HTTP_E_TIMEDOUT         -4
00088 #define HTTP_E_FILE_READ        -5
00089 
00090 #ifdef __cplusplus
00091 extern "C" {
00092 #endif
00093 
00094 /************************************************************************
00095 * Function: http_get_code_text                                                                                  
00096 *                                                                                                                                               
00097 * Parameters:                                                                                                                   
00098 *       int statusCode ; Status code based on which the status table and 
00099 *                                       status message is returned                                                      
00100 *                                                                                                                                               
00101 * Description: Return the right status message based on the passed in   
00102 *       int statusCode input parameter                                                                          
00103 *                                                                                                                                               
00104 * Returns:                                                                                                                              
00105 *        const char* ptr - pointer to the status message string                         
00106 ************************************************************************/
00107 const char* http_get_code_text( int statusCode );
00108 
00109 #ifdef __cplusplus
00110 } /* extern C */
00111 #endif
00112 
00113 #endif /* GENLIB_NET_HTTP_STATCODES_H */
00114