source: trunk/libtransmission/web.h @ 10535

Last change on this file since 10535 was 10535, checked in by charles, 12 years ago

(trunk libT) #3117 "Tracker queries do not honor bind-address-ipv4" -- possible fix

  • Property svn:keywords set to Date Rev Author Id
File size: 1.4 KB
Line 
1/*
2 * This file Copyright (C) 2008-2010 Mnemosyne LLC
3 *
4 * This file is licensed by the GPL version 2.  Works owned by the
5 * Transmission project are granted a special exemption to clause 2(b)
6 * so that the bulk of its code can remain under the MIT license.
7 * This exemption does not extend to derived works not owned by
8 * the Transmission project.
9 *
10 * $Id: web.h 10535 2010-04-28 00:32:43Z charles $
11 */
12
13#ifndef TR_HTTP_H
14#define TR_HTTP_H
15
16struct tr_address;
17
18void tr_webInit( tr_session * session );
19
20typedef enum
21{
22    TR_WEB_CLOSE_WHEN_IDLE,
23    TR_WEB_CLOSE_NOW
24}
25tr_web_close_mode;
26
27void tr_webClose( tr_session * session, tr_web_close_mode close_mode );
28
29typedef void ( tr_web_done_func )( tr_session       * session,
30                                   long               response_code,
31                                   const void       * response,
32                                   size_t             response_byte_count,
33                                   void             * user_data );
34
35const char * tr_webGetResponseStr( long response_code );
36
37void         tr_webRun( tr_session        * session,
38                        const char        * url,
39                        const char        * range,
40                        tr_web_done_func    done_func,
41                        void              * done_func_user_data );
42
43struct evbuffer;
44
45void tr_http_escape( struct evbuffer *out, const char *str, int len, tr_bool escape_slashes );
46
47char* tr_http_unescape( const char * str, int len );
48
49#endif
Note: See TracBrowser for help on using the repository browser.