3
Copyright (C) 1999-2002, Joe Orton <joe@manyfish.co.uk>
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public
7
License as published by the Free Software Foundation; either
8
version 2 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public
16
License along with this library; if not, write to the Free
17
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22
/* THIS IS NOT A PUBLIC INTERFACE. You CANNOT include this header file
23
* from an application. */
28
#include "ne_request.h"
29
#include "ne_socket.h"
35
ne_sock_addr *address; /* if non-NULL, result of resolving 'hostname'. */
36
/* current network address obtained from 'address' being used. */
37
const ne_inet_addr *current;
38
char *hostport; /* URI hostport segment */
41
/* Store every registered callback in a generic container, and cast
42
* the function pointer when calling it. */
46
const char *id; /* non-NULL for accessors. */
50
#define HAVE_HOOK(st,func) (st->hook->hooks->func != NULL)
51
#define HOOK_FUNC(st, func) (*st->hook->hooks->func)
53
/* Session support. */
55
/* Connection information */
58
/* non-zero if connection has been established. */
61
/* non-zero if connection has persisted beyond one request. */
64
int is_http11; /* >0 if connected server is known to be
65
* HTTP/1.1 compliant. */
68
struct host_info server, proxy;
71
unsigned int use_proxy:1; /* do we have a proxy server? */
72
unsigned int no_persist:1; /* set to disable persistent connections */
73
unsigned int use_ssl:1; /* whether a secure connection is required */
74
unsigned int in_connect:1; /* doing a proxy CONNECT */
76
int expect100_works; /* known state of 100-continue support */
78
ne_progress progress_cb;
81
ne_notify_status notify_cb;
84
int rdtimeout; /* read timeout. */
86
struct hook *create_req_hooks, *pre_send_hooks, *post_send_hooks;
87
struct hook *destroy_req_hooks, *destroy_sess_hooks, *private;
89
char *user_agent; /* full User-Agent: header field */
92
ne_ssl_client_cert *client_cert;
93
ne_ssl_certificate *server_cert;
94
ne_ssl_context *ssl_context;
97
/* Server cert verification callback: */
98
ne_ssl_verify_fn ssl_verify_fn;
100
/* Client cert provider callback: */
101
ne_ssl_provide_fn ssl_provide_fn;
102
void *ssl_provide_ud;
108
typedef int (*ne_push_fn)(void *userdata, const char *buf, size_t count);
110
/* Pulls the request body for the given request, passing blocks to the
113
int ne_pull_request_body(ne_request *req, ne_push_fn fn, void *ud);
115
/* Do the SSL negotiation. */
116
int ne_negotiate_ssl(ne_request *req);
118
#endif /* HTTP_PRIVATE_H */