2008-04-24 01:42:53 +00:00
|
|
|
/*
|
|
|
|
* This file Copyright (C) 2008 Charles Kerr <charles@rebelbase.com>
|
|
|
|
*
|
|
|
|
* 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$
|
2008-04-24 01:42:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TR_HTTP_H
|
|
|
|
#define TR_HTTP_H
|
|
|
|
|
|
|
|
struct tr_handle;
|
|
|
|
typedef struct tr_web tr_web;
|
|
|
|
|
2008-06-07 21:26:41 +00:00
|
|
|
tr_web* tr_webInit( struct tr_handle * session );
|
2008-04-24 01:42:53 +00:00
|
|
|
|
2008-04-28 13:29:38 +00:00
|
|
|
void tr_webClose( tr_web ** );
|
2008-04-25 19:46:36 +00:00
|
|
|
|
2008-06-07 21:26:41 +00:00
|
|
|
typedef void (tr_web_done_func)( struct tr_handle * session,
|
|
|
|
long response_code,
|
|
|
|
const void * response,
|
|
|
|
size_t response_byte_count,
|
|
|
|
void * user_data );
|
2008-04-25 04:26:04 +00:00
|
|
|
|
|
|
|
const char * tr_webGetResponseStr( long response_code );
|
2008-04-24 01:42:53 +00:00
|
|
|
|
2008-06-07 21:26:41 +00:00
|
|
|
void tr_webRun( struct tr_handle * session,
|
2008-04-24 01:42:53 +00:00
|
|
|
const char * url,
|
2008-06-07 21:26:41 +00:00
|
|
|
const char * range,
|
2008-04-24 01:42:53 +00:00
|
|
|
tr_web_done_func done_func,
|
|
|
|
void * done_func_user_data );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|