2
$Id: conf.h 327 2006-06-11 05:04:27Z joshe $
4
Copyright (c) 2005-2006 Joshua Elsasser. All rights reserved.
6
Redistribution and use in source and binary forms, with or without
7
modification, are permitted provided that the following conditions
10
1. Redistributions of source code must retain the above copyright
11
notice, this list of conditions and the following disclaimer.
12
2. Redistributions in binary form must reproduce the above copyright
13
notice, this list of conditions and the following disclaimer in the
14
documentation and/or other materials provided with the distribution.
16
THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS "AS IS" AND
17
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26
POSSIBILITY OF SUCH DAMAGE.
32
#include "transmission.h"
36
cf_init(const char *confdir, char **errstr);
38
cf_lock(char **errstr);
42
cf_loadprefs(char **errstr);
44
cf_getpref(const char *name);
46
cf_setpref(const char *name, const char *value);
48
cf_saveprefs(char **errstr);
50
cf_loadstate(char **errstr);
52
cf_savestate(benc_val_t *state, char **errstr);
54
cf_freestate(benc_val_t *state);
56
/* macros for names of prefs we use */
57
#define PREF_PORT "listening-port"
58
#define PREF_USEDOWNLIMIT "use-download-limit"
59
#define PREF_DOWNLIMIT "download-limit"
60
#define PREF_USEUPLIMIT "use-upload-limit"
61
#define PREF_UPLIMIT "upload-limit"
62
#define PREF_DIR "download-directory"
63
#define PREF_ADDSTD "add-behavior-standard"
64
#define PREF_ADDIPC "add-behavior-ipc"
66
#endif /* TG_CONF_H */