source: trunk/gtk/conf.h @ 3206

Last change on this file since 3206 was 3206, checked in by charles, 15 years ago

preferences code refresh in the gtk+ client

  • Property svn:keywords set to Date Rev Author Id
File size: 2.3 KB
Line 
1/******************************************************************************
2 * $Id: conf.h 3206 2007-09-27 20:57:58Z charles $
3 *
4 * Copyright (c) 2005-2007 Transmission authors and contributors
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *****************************************************************************/
24
25/**
26***
27**/
28
29#ifndef TG_CONF_H
30#define TG_CONF_H
31
32int       pref_int_get            ( const char * key );
33void      pref_int_set            ( const char * key, int value );
34void      pref_int_set_default    ( const char * key, int default_value );
35
36gboolean  pref_flag_get            ( const char * key );
37void      pref_flag_set            ( const char * key, gboolean value );
38void      pref_flag_set_default    ( const char * key, gboolean default_value );
39
40char*     pref_string_get          ( const char * key );
41void      pref_string_set          ( const char * key, const char * value );
42void      pref_string_set_default  ( const char * key, const char * default_value );
43
44void      pref_save                ( char **errstr );
45
46/**
47***
48**/
49
50struct benc_val_s;
51
52gboolean
53cf_init(const char *confdir, char **errstr);
54gboolean
55cf_lock(char **errstr);
56char *
57cf_sockname(void);
58void
59cf_loadprefs(char **errstr);
60struct benc_val_s *
61cf_loadstate(char **errstr);
62void
63cf_savestate(struct benc_val_s *state, char **errstr);
64void
65cf_freestate(struct benc_val_s *state);
66
67#endif /* TG_CONF_H */
Note: See TracBrowser for help on using the repository browser.