transmission/libtransmission/web.h

46 lines
1.4 KiB
C
Raw Normal View History

/*
2009-12-05 02:19:24 +00:00
* This file Copyright (C) 2008-2009 Mnemosyne LLC
*
* This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* the Transmission project.
*
2008-04-25 19:46:36 +00:00
* $Id$
*/
#ifndef TR_HTTP_H
#define TR_HTTP_H
struct tr_address;
typedef struct tr_web tr_web;
2009-10-23 05:48:56 +00:00
tr_web* tr_webInit( tr_session * session );
void tr_webClose( tr_web ** );
2008-04-25 19:46:36 +00:00
2009-10-23 05:48:56 +00:00
void tr_webSetInterface( tr_web * web, const struct tr_address * addr );
typedef void ( tr_web_done_func )( tr_session * session,
long response_code,
const void * response,
size_t response_byte_count,
void * user_data );
const char * tr_webGetResponseStr( long response_code );
void tr_webRun( tr_session * session,
const char * url,
const char * range,
tr_web_done_func done_func,
void * done_func_user_data );
2009-11-11 01:03:06 +00:00
struct evbuffer;
void tr_http_escape( struct evbuffer *out, const char *str, int len, tr_bool escape_slashes );
char* tr_http_unescape( const char * str, int len );
#endif