source: trunk/gtk/conf.h @ 6559

Last change on this file since 6559 was 6559, checked in by muks, 13 years ago

Don't show an error when transmission is run twice

Instead, present the main window. This commit also auto-generates
the dbus bindings.

  • Property svn:keywords set to Date Rev Author Id
File size: 2.4 KB
Line 
1/******************************************************************************
2 * $Id: conf.h 6559 2008-08-17 12:39:26Z muks $
3 *
4 * Copyright (c) 2005-2008 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 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 value );
39
40const char*  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 * value );
43
44void         pref_save               ( void );
45
46/**
47***
48**/
49
50enum
51{
52    PREF_FLAG_DEFAULT = 0,
53    PREF_FLAG_FALSE = 1,
54    PREF_FLAG_TRUE = 2
55};
56
57typedef int pref_flag_t;
58
59gboolean pref_flag_eval( pref_flag_t val, const char * key );
60
61
62/**
63***
64**/
65
66gboolean
67cf_init(const char *confdir, char **errstr);
68gboolean
69cf_lock(tr_lockfile_state_t *tr_state, char **errstr);
70void
71cf_check_older_configs(void);
72
73#endif /* TG_CONF_H */
Note: See TracBrowser for help on using the repository browser.