C++ common classes
General purpose classes for use across projects (Apache license)
rtminet.h
Go to the documentation of this file.
00001 /*
00002    Copyright [2010] [Richard Bross]
00003 
00004    Licensed under the Apache License, Version 2.0 (the "License");
00005    you may not use this file except in compliance with the License.
00006    You may obtain a copy of the License at
00007 
00008        http://www.apache.org/licenses/LICENSE-2.0
00009 
00010    Unless required by applicable law or agreed to in writing, software
00011    distributed under the License is distributed on an "AS IS" BASIS,
00012    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013    See the License for the specific language governing permissions and
00014    limitations under the License.
00015 */
00016 #if !defined(_RTMINET_)
00017 #define _RTMINET_
00018 
00019 #define INTERNET_MAX_HOST_NAME_LENGTH   256
00020 #define INTERNET_MAX_USER_NAME_LENGTH   128
00021 #define INTERNET_MAX_PASSWORD_LENGTH    128
00022 #define INTERNET_MAX_PORT_NUMBER_LENGTH 5           // INTERNET_PORT is unsigned short
00023 #define INTERNET_MAX_PORT_NUMBER_VALUE  65535       // maximum unsigned short value
00024 #define INTERNET_MAX_PATH_LENGTH        2048
00025 #define INTERNET_MAX_PROTOCOL_NAME      "gopher"    // longest protocol name
00026 #define INTERNET_MAX_URL_LENGTH_RTM     ((sizeof(INTERNET_MAX_PROTOCOL_NAME) - 1) \
00027                                         + sizeof("://") \
00028                                         + INTERNET_MAX_PATH_LENGTH)
00029                                         
00030 //
00031 // HTTP Response Status Codes:
00032 //
00033 
00034 #define HTTP_STATUS_OK              200     // request completed
00035 #define HTTP_STATUS_CREATED         201     // object created, reason = new URI
00036 #define HTTP_STATUS_ACCEPTED        202     // async completion (TBS)
00037 #define HTTP_STATUS_PARTIAL         203     // partial completion
00038 #define HTTP_STATUS_NO_CONTENT      204     // no info to return
00039 
00040 #define HTTP_STATUS_AMBIGUOUS       300     // server couldn't decide what to return
00041 #define HTTP_STATUS_MOVED           301     // object permanently moved
00042 #define HTTP_STATUS_REDIRECT        302     // object temporarily moved
00043 #define HTTP_STATUS_REDIRECT_METHOD 303     // redirection w/ new access method
00044 #define HTTP_STATUS_NOT_MODIFIED    304     // if-modified-since was not modified
00045 
00046 #define HTTP_STATUS_BAD_REQUEST     400     // invalid syntax
00047 #define HTTP_STATUS_DENIED          401     // access denied
00048 #define HTTP_STATUS_PAYMENT_REQ     402     // payment required
00049 #define HTTP_STATUS_FORBIDDEN       403     // request forbidden
00050 #define HTTP_STATUS_NOT_FOUND       404     // object not found
00051 #define HTTP_STATUS_BAD_METHOD      405     // method is not allowed
00052 #define HTTP_STATUS_NONE_ACCEPTABLE 406     // no response acceptable to client found
00053 #define HTTP_STATUS_PROXY_AUTH_REQ  407     // proxy authentication required
00054 #define HTTP_STATUS_REQUEST_TIMEOUT 408     // server timed out waiting for request
00055 #define HTTP_STATUS_CONFLICT        409     // user should resubmit with more info
00056 #define HTTP_STATUS_GONE            410     // the resource is no longer available
00057 #define HTTP_STATUS_AUTH_REFUSED    411     // couldn't authorize client
00058 
00059 #define HTTP_STATUS_SERVER_ERROR    500     // internal server error
00060 #define HTTP_STATUS_NOT_SUPPORTED   501     // required not supported
00061 #define HTTP_STATUS_BAD_GATEWAY     502     // error response received from gateway
00062 #define HTTP_STATUS_SERVICE_UNAVAIL 503     // temporarily overloaded
00063 #define HTTP_STATUS_GATEWAY_TIMEOUT 504     // timed out waiting for gateway
00064 
00065 #endif                                        
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines