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

Last change on this file since 12918 was 12204, checked in by jordan, 11 years ago

(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.

  • Property svn:keywords set to Date Rev Author Id
File size: 2.3 KB
RevLine 
[5843]1/*
[11709]2 * This file Copyright (C) Mnemosyne LLC
[5843]3 *
[11599]4 * This file is licensed by the GPL version 2. Works owned by the
[5843]5 * Transmission project are granted a special exemption to clause 2(b)
[6795]6 * so that the bulk of its code can remain under the MIT license.
[5843]7 * This exemption does not extend to derived works not owned by
8 * the Transmission project.
9 *
[5958]10 * $Id: rpc-server.h 12204 2011-03-22 15:19:54Z jordan $
[5843]11 */
12
[7151]13#ifndef __TRANSMISSION__
14#error only libtransmission should #include this header.
15#endif
16
[5843]17#ifndef TR_RPC_SERVER_H
18#define TR_RPC_SERVER_H
19
20typedef struct tr_rpc_server tr_rpc_server;
21
[7385]22tr_rpc_server * tr_rpcInit( tr_session  * session,
[7706]23                            tr_benc  * settings );
[5843]24
[6795]25void            tr_rpcClose( tr_rpc_server ** freeme );
[5843]26
[12204]27void            tr_rpcSetEnabled( tr_rpc_server * server, bool isEnabled );
[5843]28
[12204]29bool            tr_rpcIsEnabled( const tr_rpc_server * server );
[5843]30
[12204]31void            tr_rpcSetPort( tr_rpc_server * server, tr_port port );
[5843]32
[7224]33tr_port         tr_rpcGetPort( const tr_rpc_server * server );
[5843]34
[12204]35void            tr_rpcSetUrl( tr_rpc_server * server, const char * url );
[11524]36
37const char *    tr_rpcGetUrl( const tr_rpc_server * server );
38
[7368]39int             tr_rpcSetTest( const tr_rpc_server   * server,
40                               const char            * whitelist,
41                               char                 ** allocme_errmsg );
[6031]42
[6825]43void            tr_rpcSetWhitelistEnabled( tr_rpc_server  * server,
[12204]44                                           bool             isEnabled );
[6825]45
[12204]46bool            tr_rpcGetWhitelistEnabled( const tr_rpc_server * server );
[6825]47
[6823]48void            tr_rpcSetWhitelist( tr_rpc_server * server,
49                                    const char *    whitelist );
[6043]50
[8246]51const char*     tr_rpcGetWhitelist( const tr_rpc_server * server );
[5843]52
[6795]53void            tr_rpcSetPassword( tr_rpc_server * server,
54                                   const char *    password );
[6049]55
[8246]56const char*     tr_rpcGetPassword( const tr_rpc_server * server );
[6049]57
[6795]58void            tr_rpcSetUsername( tr_rpc_server * server,
59                                   const char *    username );
[6049]60
[8246]61const char*     tr_rpcGetUsername( const tr_rpc_server * server );
[6049]62
[12204]63void            tr_rpcSetPasswordEnabled( tr_rpc_server * server, bool isEnabled );
[6049]64
[12204]65bool            tr_rpcIsPasswordEnabled( const tr_rpc_server * session );
[6049]66
[8242]67const char*     tr_rpcGetBindAddress( const tr_rpc_server * server );
[6534]68
[5843]69#endif
Note: See TracBrowser for help on using the repository browser.