source: trunk/libtransmission/rpc.h @ 6311

Last change on this file since 6311 was 6311, checked in by charles, 14 years ago

(1) remote: fix bug with specifying torrent id for file list.
(2) very minor cleanup

  • Property svn:keywords set to Date Rev Author Id
File size: 1.9 KB
Line 
1/*
2 * This file Copyright (C) 2008 Charles Kerr <charles@rebelbase.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: rpc.h 6311 2008-07-10 14:20:36Z charles $
11 */
12
13#ifndef TR_RPC_H
14#define TR_RPC_H
15
16/***
17****  RPC processing
18***/
19
20enum
21{
22    TR_RPC_TORRENT_ACTIVITY        = (1<<0),
23    TR_RPC_TORRENT_ANNOUNCE        = (1<<1),
24    TR_RPC_TORRENT_ERROR           = (1<<2),
25    TR_RPC_TORRENT_FILES           = (1<<3),
26    TR_RPC_TORRENT_HISTORY         = (1<<4),
27    TR_RPC_TORRENT_ID              = (1<<5),
28    TR_RPC_TORRENT_INFO            = (1<<6),
29    TR_RPC_TORRENT_LIMITS          = (1<<7),
30    TR_RPC_TORRENT_PEERS           = (1<<8),
31    TR_RPC_TORRENT_PRIORITIES      = (1<<9),
32    TR_RPC_TORRENT_SCRAPE          = (1<<10),
33    TR_RPC_TORRENT_SIZE            = (1<<11),
34    TR_RPC_TORRENT_TRACKER_STATS   = (1<<12),
35    TR_RPC_TORRENT_TRACKERS        = (1<<13),
36    TR_RPC_TORRENT_WEBSEEDS        = (1<<14)
37};
38
39struct tr_benc;
40struct tr_handle;
41
42/* http://www.json.org/ */
43char*
44tr_rpc_request_exec_json( struct tr_handle  * handle,
45                          const void        * request_json,
46                          int                 request_len,
47                          int               * response_len );
48
49/* see the RPC spec's "Request URI Notation" section */
50char*
51tr_rpc_request_exec_uri( struct tr_handle  * handle,
52                         const void        * request_uri,
53                         int                 request_len,
54                         int               * response_len );
55
56void
57tr_rpc_parse_list_str( struct tr_benc  * setme,
58                       const char      * list_str,
59                       size_t            list_str_len );
60
61
62#endif
Note: See TracBrowser for help on using the repository browser.