~ubuntu-branches/ubuntu/precise/transmission/precise

« back to all changes in this revision

Viewing changes to third-party/libevent/http-internal.h

  • Committer: Bazaar Package Importer
  • Author(s): Leo Costela
  • Date: 2009-05-17 19:39:51 UTC
  • mto: (1.3.4 upstream) (2.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: james.westby@ubuntu.com-20090517193951-k8x15sqoxzf7cuyx
ImportĀ upstreamĀ versionĀ 1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#define HTTP_PREFIX             "http://"
18
18
#define HTTP_DEFAULTPORT        80
19
19
 
 
20
enum message_read_status {
 
21
        ALL_DATA_READ = 1,
 
22
        MORE_DATA_EXPECTED = 0,
 
23
        DATA_CORRUPTED = -1,
 
24
        REQUEST_CANCELED = -2
 
25
};
 
26
 
20
27
enum evhttp_connection_error {
21
28
        EVCON_HTTP_TIMEOUT,
22
29
        EVCON_HTTP_EOF,
30
37
/* A stupid connection object - maybe make this a bufferevent later */
31
38
 
32
39
enum evhttp_connection_state {
33
 
        EVCON_DISCONNECTED,     /* not currently connected not trying either */
34
 
        EVCON_CONNECTING,       /* tries to currently connect */
35
 
        EVCON_CONNECTED         /* connection is established */
 
40
        EVCON_DISCONNECTED,     /**< not currently connected not trying either*/
 
41
        EVCON_CONNECTING,       /**< tries to currently connect */
 
42
        EVCON_IDLE,             /**< connection is established */
 
43
        EVCON_READING_FIRSTLINE,/**< reading Request-Line (incoming conn) or
 
44
                                 **< Status-Line (outgoing conn) */
 
45
        EVCON_READING_HEADERS,  /**< reading request/response headers */
 
46
        EVCON_READING_BODY,     /**< reading request/response body */
 
47
        EVCON_READING_TRAILER,  /**< reading request/response chunked trailer */
 
48
        EVCON_WRITING           /**< writing request/response headers/body */
36
49
};
37
50
 
38
51
struct event_base;
48
61
        struct evbuffer *output_buffer;
49
62
        
50
63
        char *bind_address;             /* address to use for binding the src */
 
64
        u_short bind_port;              /* local port for binding the src */
51
65
 
52
66
        char *address;                  /* address to connect to */
53
67
        u_short port;
124
138
 
125
139
int evhttp_hostportfile(char *, char **, u_short *, char **);
126
140
 
127
 
int evhttp_parse_lines(struct evhttp_request *, struct evbuffer*);
 
141
int evhttp_parse_firstline(struct evhttp_request *, struct evbuffer*);
 
142
int evhttp_parse_headers(struct evhttp_request *, struct evbuffer*);
128
143
 
129
144
void evhttp_start_read(struct evhttp_connection *);
130
 
void evhttp_read_header(int, short, void *);
131
145
void evhttp_make_header(struct evhttp_connection *, struct evhttp_request *);
132
146
 
133
147
void evhttp_write_buffer(struct evhttp_connection *,