source: trunk/libtransmission/rpc-server.h @ 6795

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

run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened

  • Property svn:keywords set to Date Rev Author Id
File size: 2.5 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-server.h 6795 2008-09-23 19:11:04Z charles $
11 */
12
13#ifndef TR_RPC_SERVER_H
14#define TR_RPC_SERVER_H
15
16typedef struct tr_rpc_server tr_rpc_server;
17
18tr_rpc_server * tr_rpcInit( struct tr_handle * session,
19                            int                isEnabled,
20                            int                port,
21                            const char *       acl,
22                            int                isPasswordEnabled,
23                            const char *       username,
24                            const char *       password );
25
26void            tr_rpcClose( tr_rpc_server ** freeme );
27
28void            tr_rpcSetEnabled( tr_rpc_server * server,
29                                  int             isEnabled );
30
31int             tr_rpcIsEnabled( const tr_rpc_server * server );
32
33void            tr_rpcSetPort( tr_rpc_server * server,
34                               int             port );
35
36int             tr_rpcGetPort( const tr_rpc_server * server );
37
38int             tr_rpcSetTest( const tr_rpc_server * server,
39                               const char *          acl,
40                               char **               allocme_errmsg );
41
42int             tr_rpcTestACL( const tr_rpc_server * server,
43                               const char *          acl,
44                               char **               allocme_errmsg );
45
46int             tr_rpcSetACL( tr_rpc_server * server,
47                              const char *    acl,
48                              char **         allocme_errmsg );
49
50char*           tr_rpcGetACL( const tr_rpc_server * server );
51
52void            tr_rpcSetPassword( tr_rpc_server * server,
53                                   const char *    password );
54
55char*           tr_rpcGetPassword( const tr_rpc_server * server );
56
57void            tr_rpcSetUsername( tr_rpc_server * server,
58                                   const char *    username );
59
60char*           tr_rpcGetUsername( const tr_rpc_server * server );
61
62void            tr_rpcSetPasswordEnabled( tr_rpc_server * server,
63                                          int             isEnabled );
64
65int             tr_rpcIsPasswordEnabled( const tr_rpc_server * session );
66
67/** (public for the unit tests) */
68char*           cidrize( const char * acl );
69
70
71#endif
Note: See TracBrowser for help on using the repository browser.