nanohttp-request.h

Go to the documentation of this file.
00001 /******************************************************************
00002  *  $Id: nanohttp-request.h,v 1.15 2007/01/03 08:33:44 m0gg Exp $
00003  *
00004  * CSOAP Project:  A http client/server library in C
00005  * Copyright (C) 2003-2004  Ferhat Ayaz
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the
00019  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020  * Boston, MA  02111-1307, USA.
00021  * 
00022  * Email: ferhatayaz@yahoo.com
00023  ******************************************************************/
00024 #ifndef __nhttp_request_h
00025 #define __nhttp_request_h
00026 
00038 
00047 #define HEADER_ACCEPT                   "Accept"
00048 
00058 #define HEADER_ACCEPT_CHARSET           "Accept-Charset"
00059 
00066 #define HEADER_ACCEPT_ENCODING          "Accept-Encoding"
00067 
00074 #define HEADER_ACCEPT_LANGUAGE          "Accept-Language"
00075 
00085 #define HEADER_AUTHORIZATION            "Authorization"
00086 
00093 #define HEADER_EXPECT                   "Expect"
00094 
00106 #define HEADER_FROM                     "From"
00107 
00119 #define HEADER_HOST                     "Host"
00120 
00134 #define HEADER_IF_MATCH                 "If-Match"
00135 
00145 #define HEADER_IF_MODIFIED_SINCE        "If-Modified-Since"
00146 
00159 #define HEADER_IF_NONE_MATCH            "If-None-Match"
00160 
00171 #define HEADER_IF_RANGE                 "If-Range"
00172 
00181 #define HEADER_IF_UNMODIFIED_SINCE      "If-Unmodified-Since"
00182 
00192 #define HEADER_IF_MAX_FORWARDS          "Max-Forwards"
00193 
00203 #define HEADER_PROXY_AUTHORIZATION      "Proxy-Authorization"
00204 
00213 #define HEADER_RANGE                    "Range"
00214 
00227 #define HEADER_REFERER                  "Referer"
00228 
00238 #define HEADER_TRANSFER_EXTENSION       "TE"
00239 
00253 #define HEADER_USER_AGENT               "User-Agent"
00254 
00257 #ifdef __NHTTP_INTERNAL
00258 struct request_statistics
00259 {
00260   unsigned long bytes_transmitted;
00261   unsigned long bytes_received;
00262   struct timeval time;
00263 };
00264 #endif
00265 
00271 struct hrequest_t
00272 {
00273   hreq_method_t method;
00274   http_version_t version;
00275   char path[REQUEST_MAX_PATH_SIZE];
00276 
00277   hpair_t *query;
00278   hpair_t *header;
00279 
00280   struct request_statistics *statistics;
00281 
00282   struct http_input_stream_t *in;
00283   content_type_t *content_type;
00284   struct attachments_t *attachments;
00285   char root_part_id[150];
00286 };
00287 
00288 #ifdef __cplusplus
00289 extern "C" {
00290 #endif
00291 
00292 #ifdef __NHTTP_INTERNAL
00293 extern herror_t hrequest_new_from_socket(struct hsocket_t *sock, struct hrequest_t **out);
00294 extern void hrequest_free(struct hrequest_t *req);
00295 #endif
00296 
00297 #ifdef __cplusplus
00298 }
00299 #endif
00300 
00301 #endif

Generated on Thu Jan 25 23:36:03 2007 for csoap by  doxygen 1.4.6