2008-05-18 16:44:30 +00:00
|
|
|
/*
|
2014-01-19 01:09:44 +00:00
|
|
|
* This file Copyright (C) 2008-2014 Mnemosyne LLC
|
2008-05-18 16:44:30 +00:00
|
|
|
*
|
2014-01-19 01:09:44 +00:00
|
|
|
* It may be used under the GNU Public License v2 or v3 licenses,
|
|
|
|
* or any future license endorsed by Mnemosyne LLC.
|
2008-05-18 16:44:30 +00:00
|
|
|
*
|
2008-05-28 17:17:12 +00:00
|
|
|
* $Id$
|
2008-05-18 16:44:30 +00:00
|
|
|
*/
|
|
|
|
|
2008-11-24 20:17:36 +00:00
|
|
|
#ifndef __TRANSMISSION__
|
2012-12-14 04:34:42 +00:00
|
|
|
#error only libtransmission should #include this header.
|
2008-11-24 20:17:36 +00:00
|
|
|
#endif
|
|
|
|
|
2012-12-14 04:34:42 +00:00
|
|
|
#include "variant.h"
|
|
|
|
|
2008-05-18 16:44:30 +00:00
|
|
|
#ifndef TR_RPC_SERVER_H
|
|
|
|
#define TR_RPC_SERVER_H
|
|
|
|
|
|
|
|
typedef struct tr_rpc_server tr_rpc_server;
|
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
tr_rpc_server * tr_rpcInit (tr_session * session,
|
2012-12-14 04:34:42 +00:00
|
|
|
tr_variant * settings);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcClose (tr_rpc_server ** freeme);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetEnabled (tr_rpc_server * server, bool isEnabled);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
bool tr_rpcIsEnabled (const tr_rpc_server * server);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetPort (tr_rpc_server * server, tr_port port);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
tr_port tr_rpcGetPort (const tr_rpc_server * server);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetUrl (tr_rpc_server * server, const char * url);
|
2010-12-12 18:22:11 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
const char * tr_rpcGetUrl (const tr_rpc_server * server);
|
2010-12-12 18:22:11 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
int tr_rpcSetTest (const tr_rpc_server * server,
|
2008-12-13 23:39:12 +00:00
|
|
|
const char * whitelist,
|
2012-12-05 17:29:46 +00:00
|
|
|
char ** allocme_errmsg);
|
2008-06-04 17:14:58 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetWhitelistEnabled (tr_rpc_server * server,
|
|
|
|
bool isEnabled);
|
2008-10-01 22:59:29 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
bool tr_rpcGetWhitelistEnabled (const tr_rpc_server * server);
|
2008-10-01 22:59:29 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetWhitelist (tr_rpc_server * server,
|
|
|
|
const char * whitelist);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
const char* tr_rpcGetWhitelist (const tr_rpc_server * server);
|
2008-06-05 16:23:03 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetPassword (tr_rpc_server * server,
|
|
|
|
const char * password);
|
2008-06-05 16:23:03 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
const char* tr_rpcGetPassword (const tr_rpc_server * server);
|
2008-06-05 16:23:03 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetUsername (tr_rpc_server * server,
|
|
|
|
const char * username);
|
2008-06-05 16:23:03 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
const char* tr_rpcGetUsername (const tr_rpc_server * server);
|
2008-06-05 16:23:03 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
void tr_rpcSetPasswordEnabled (tr_rpc_server * server, bool isEnabled);
|
2008-06-05 16:23:03 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
bool tr_rpcIsPasswordEnabled (const tr_rpc_server * session);
|
2008-05-18 16:44:30 +00:00
|
|
|
|
2012-12-05 17:29:46 +00:00
|
|
|
const char* tr_rpcGetBindAddress (const tr_rpc_server * server);
|
2008-08-15 20:28:43 +00:00
|
|
|
|
2008-05-18 16:44:30 +00:00
|
|
|
#endif
|