source: trunk/libtransmission/web.h @ 9531

Last change on this file since 9531 was 9531, checked in by charles, 13 years ago

(trunk libT) #2096: add code magnet URL parser and unit tests

  • Property svn:keywords set to Date Rev Author Id
File size: 1.5 KB
Line 
1/*
2 * This file Copyright (C) 2008-2009 Charles Kerr <charles@transmissionbt.com>
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 9531 2009-11-20 04:38:19Z charles $
11 */
12
13#ifndef TR_HTTP_H
14#define TR_HTTP_H
15
16struct tr_address;
17typedef struct tr_web tr_web;
18
19tr_web*      tr_webInit( tr_session * session );
20
21void         tr_webClose( tr_web ** );
22
23void         tr_webSetInterface( tr_web * web, const struct tr_address * addr );
24
25typedef void ( tr_web_done_func )( tr_session       * session,
26                                   long               response_code,
27                                   const void       * response,
28                                   size_t             response_byte_count,
29                                   void             * user_data );
30
31const char * tr_webGetResponseStr( long response_code );
32
33void         tr_webRun( tr_session        * session,
34                        const char        * url,
35                        const char        * range,
36                        tr_web_done_func    done_func,
37                        void              * done_func_user_data );
38
39struct evbuffer;
40
41void tr_http_escape( struct evbuffer *out, const char *str, int len, int noslashes );
42
43char* tr_http_unescape( const char * str, int len );
44
45#endif
Note: See TracBrowser for help on using the repository browser.