Http_Handler.h

Go to the documentation of this file.
00001 /*  Copyright (c) MediaArea.net SARL. All Rights Reserved.
00002  *
00003  *  Use of this source code is governed by a zlib-style license that can
00004  *  be found in the License.txt file in the root of the source tree.
00005  */
00006 
00007 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00008 //
00009 // A HTTP Request
00010 //
00011 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00012 
00013 //---------------------------------------------------------------------------
00014 #ifndef ZenLib_Format_Http_RequestH
00015 #define ZenLib_Format_Http_RequestH
00016 //---------------------------------------------------------------------------
00017 
00018 //---------------------------------------------------------------------------
00019 #include "ZenLib/Format/Http/Http_Cookies.h"
00020 #include <string>
00021 #include <ctime>
00022 #include <map>
00023 #include <vector>
00024 //---------------------------------------------------------------------------
00025 
00026 namespace ZenLib
00027 {
00028 
00029 namespace Format
00030 {
00031 
00032 namespace Http
00033 {
00034 
00035 //***************************************************************************
00036 /// @brief
00037 //***************************************************************************
00038 
00039 class Handler
00040 {
00041 public:
00042     //Constructor/Destructor
00043     Handler();
00044 
00045     //In
00046     std::string                         Path;                   //The path being requested by this request
00047     std::map<std::string, std::string>  Request_Headers;        //All the incoming HTTP headers from the client web browser.
00048     std::map<std::string, std::string>  Request_Cookies;        //The set of cookies that came from the client along with this request
00049     std::map<std::string, std::string>  Request_Queries;        //All the key/value pairs in the query string of this request
00050     std::string                         Foreign_IP;             //The foreign ip address for this request
00051     std::string                         Local_IP;               //The foreign port number for this request
00052     unsigned short                      Foreign_Port;           //The IP of the local interface this request is coming in on
00053     unsigned short                      Local_Port;             //The local port number this request is coming in on
00054     bool                                HeadersOnly;            //The request requests only the header
00055 
00056     //Out
00057     size_t                              Response_HTTP_Code;     //HTTP code to be sent
00058     std::map<std::string, std::string>  Response_Headers;       //Additional headers you wish to appear in the HTTP response to this request
00059     Cookies                             Response_Cookies;       //New cookies to pass back to the client along with the result of this request
00060     std::string                         Response_Body;          //To be displayed as the response to this request
00061 };
00062 
00063 } //Namespace
00064 
00065 } //Namespace
00066 
00067 } //Namespace
00068 
00069 #endif

Generated on Thu Dec 1 09:55:27 2016 for ZenLib by  doxygen 1.4.7