/*
**
**      Copyright (c) 2000-2004 ChoiceStream, Inc.  All Rights Reserved
**
**      ChoiceStream
**      210 Broadway
**      Cambridge, MA 02139
**
**  $Id: httpresponse.h,v 1.7 2005/03/18 22:33:20 mmastroianni Exp $
**
**/

#ifndef CSM_HTTPRESPONSE_H
#define CSM_HTTPRESPONSE_H

#include "httprequest.h"

namespace csm {

    enum HttpStatus // HTTP 1.1 (RFC 2616)
    {
        HTTP_NULL_STATUS = 0,
        HTTP_Continue = 100,
        HTTP_Switching_Protocols = 101,
        HTTP_OK = 200,
        HTTP_Created = 201,
        HTTP_Accepted = 202,
        HTTP_Non_Authoritative_Information = 203,
        HTTP_No_Content = 204,
        HTTP_Reset_Content = 205,
        HTTP_Partial_Content = 206,
        HTTP_Multiple_Choices = 300,
        HTTP_Moved_Permanently = 301,
        HTTP_Found = 302,
        HTTP_See_Other = 303,
        HTTP_Not_Modified = 304,
        HTTP_Use_Proxy = 305,
        HTTP_Temporary_Redirect = 307,
        HTTP_Bad_Request = 400,
        HTTP_Unauthorized = 401,
        HTTP_Payment_Required = 402,
        HTTP_Forbidden = 403,
        HTTP_Not_Found = 404,
        HTTP_Method_Not_Allowed = 405,
        HTTP_Not_Acceptable = 406,
        HTTP_Proxy_Authentication_Required = 407,
        HTTP_Request_Time_out = 408,
        HTTP_Conflict = 409,
        HTTP_Gone = 410,
        HTTP_Length_Required = 411,
        HTTP_Precondition_Failed = 412,
        HTTP_Request_Entity_Too_Large = 413,
        HTTP_Request_URI_Too_Large = 414,
        HTTP_Unsupported_Media_Type = 415,
        HTTP_Requested_range_not_satisfiable = 416,
        HTTP_Expectation_Failed = 417,
        HTTP_Internal_Server_Error = 500,
        HTTP_Not_Implemented = 501,
        HTTP_Bad_Gateway = 502,
        HTTP_Service_Unavailable = 503,
        HTTP_Gateway_Time_out = 504,
        HTTP_HTTP_Version_not_supported = 505,
    };

    struct HttpResponse
    {
        HttpResponse()
        : status(HTTP_NULL_STATUS)
        {
        }

        HttpHeaders headers;
        HttpStatus status;
        std::string body;
        std::string effectiveUrl;
        int redirectsFollowed;
    };

}

#endif

