~ubuntu-branches/ubuntu/hardy/gtkpod-aac/hardy

« back to all changes in this revision

Viewing changes to src/prefs.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-07-17 18:25:25 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070717182525-rhl5w4pk8lbk6pna
Tags: 0.99.10-2ubuntu1
* Resynchronise with gtkpod 0.9.10-2.
* Hack in dpatch support, since it was removed.
* Rename debian/patches/03-configure.dpatch to
  debian/patches/aac-configure.dpatch.
* Update debian/gtkpod-aac.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Time-stamp: <2006-06-25 15:57:02 jcs>
2
 
|
3
 
|  Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
 
1
/*
 
2
|  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
4
3
|  Copyright (C) 2006 James Liggett <jrliggett at cox.net>
5
4
|  Part of the gtkpod project.
6
5
25
24
|
26
25
|  This product is not supported/written/published by Apple!
27
26
|
28
 
|  $Id: prefs.h,v 1.192 2006/06/27 03:55:00 freethinkerjim Exp $
 
27
|  $Id: prefs.h 1596 2007-06-26 14:33:01Z dforsi $
29
28
*/
30
29
 
31
30
#ifndef __PREFS_H__
56
55
extern const gchar *KEY_PATH_SYNC_NOTES;
57
56
extern const gchar *KEY_SYNCMODE;
58
57
extern const gchar *KEY_MANUAL_SYNCDIR;
 
58
extern const gchar *KEY_DISPLAY_COVERART;
59
59
 
60
60
/* New prefs backend. Will replace the stuff above */
61
61
 
62
62
/* 
63
 
 * Wrapper data types for temp prefrences
 
63
 * Wrapper data types for temp preferences
64
64
 */
65
65
 
66
 
/* A wrapper around a GTree for regular temporary prefrences */
 
66
/* A wrapper around a GTree for regular temporary preferences */
67
67
typedef struct 
68
68
{
69
69
        GTree *tree;
75
75
        GTree *tree;
76
76
} TempLists;
77
77
 
78
 
/* Prefrences setup and cleanup */
79
 
void init_prefs(int argc, char *argv[]);
80
 
void cleanup_prefs();
 
78
/* Preferences setup and cleanup */
 
79
void prefs_init (int argc, char *argv[]);
 
80
void prefs_save (void);
 
81
void prefs_shutdown (void);
81
82
 
82
83
/*
83
 
 * Functions that are used to manipulate prefrences.
84
 
 * The prefrences table shouldn't be modified directly.
 
84
 * Functions that are used to manipulate preferences.
 
85
 * The preferences table shouldn't be modified directly.
85
86
 */
86
87
 
87
 
/* Functions that set prefrence values */
 
88
/* Functions that set preference values */
88
89
 
89
90
void prefs_set_string(const gchar *key, const gchar *value);
90
91
void prefs_set_int(const gchar *key, const gint value);
102
103
void prefs_set_double_index(const gchar *key, guint index,
103
104
                            gdouble value);
104
105
 
105
 
/* Functions that get prefrence values */
 
106
/* Functions that get preference values */
106
107
gchar *prefs_get_string(const gchar *key);
107
108
gboolean prefs_get_string_value(const gchar *key, gchar **value);
108
109
gint prefs_get_int(const gchar *key);
127
128
gboolean prefs_get_double_value_index(const gchar *key, guint index,
128
129
                                      gdouble *value);
129
130
/* Special functions */
 
131
TempPrefs *prefs_create_subset (const gchar *subkey);
130
132
void prefs_flush_subkey (const gchar *subkey);
131
133
void prefs_rename_subkey (const gchar *subkey_old, const gchar *subkey_new);
132
134
void temp_prefs_rename_subkey (TempPrefs *temp_prefs,
139
141
 * Temp prefs functions
140
142
 */
141
143
TempPrefs *temp_prefs_create (void);
142
 
TempPrefs *prefs_create_subset (const gchar *subkey);
 
144
TempPrefs *temp_prefs_load (const gchar *filename, GError **error);
 
145
gboolean temp_prefs_save (TempPrefs *temp_prefs,
 
146
                          const gchar *filename,
 
147
                          GError **error);
143
148
TempPrefs *temp_prefs_create_subset (TempPrefs *temp_prefs,
144
149
                                     const gchar *subkey);
145
150
void temp_prefs_destroy (TempPrefs *temp_prefs);
173
178
gboolean temp_prefs_get_double_value(TempPrefs *temp_prefs, const gchar *key,
174
179
                                    gdouble *value);
175
180
 
176
 
/* Numbered prefrences functions */
 
181
/* Numbered preferences functions */
177
182
void temp_prefs_set_string_index(TempPrefs *temp_prefs, const gchar *key,
178
183
                                 const guint index, const gchar *value);
179
184
void temp_prefs_set_int_index(TempPrefs *temp_prefs, const gchar *key,