source: trunk/libtransmission/rpcimpl.h @ 8086

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

(trunk libT) make rpcimpl.h includable from C++
M rpcimpl.h

  • Property svn:keywords set to Date Rev Author Id
File size: 1.8 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: rpcimpl.h 8086 2009-03-25 18:41:48Z charles $
11 */
12
13#ifndef TR_RPC_H
14#define TR_RPC_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/***
21****  RPC processing
22***/
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28struct tr_benc;
29
30typedef void( *tr_rpc_response_func )( tr_session      * session,
31                                       const char      * response,
32                                       size_t            response_len,
33                                       void            * user_data );
34/* http://www.json.org/ */
35void tr_rpc_request_exec_json( tr_session            * session,
36                               const void            * request_json,
37                               int                     request_len,
38                               tr_rpc_response_func    callback,
39                               void                  * callback_user_data );
40
41/* see the RPC spec's "Request URI Notation" section */
42void tr_rpc_request_exec_uri( tr_session           * session,
43                              const void           * request_uri,
44                              int                    request_len,
45                              tr_rpc_response_func   callback,
46                              void                 * callback_user_data );
47
48void tr_rpc_parse_list_str( struct tr_benc * setme,
49                            const char     * list_str,
50                            int              list_str_len );
51
52#ifdef __cplusplus
53}
54#endif
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif /* TR_RPC_H */
Note: See TracBrowser for help on using the repository browser.