~cairo-dock-team/ubuntu/oneiric/cairo-dock/2.3.0-3

« back to all changes in this revision

Viewing changes to src/cairo-dock-keyfile-utilities.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-09 23:26:12 UTC
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20100809232612-pocdxliaxjdetm37
Tags: upstream-2.2.0~0beta4
ImportĀ upstreamĀ versionĀ 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
* This file is a part of the Cairo-Dock project
3
 
*
4
 
* Copyright : (C) see the 'copyright' file.
5
 
* E-mail    : see the 'copyright' file.
6
 
*
7
 
* This program is free software; you can redistribute it and/or
8
 
* modify it under the terms of the GNU General Public License
9
 
* as published by the Free Software Foundation; either version 3
10
 
* of the License, or (at your option) any later version.
11
 
*
12
 
* This program is distributed in the hope that it will be useful,
13
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
* GNU General Public License for more details.
16
 
* You should have received a copy of the GNU General Public License
17
 
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 
*/
19
 
 
20
 
 
21
 
#ifndef __CAIRO_DOCK_KEYFILE_UTILITIES__
22
 
#define  __CAIRO_DOCK_KEYFILE_UTILITIES__
23
 
 
24
 
#include <glib.h>
25
 
G_BEGIN_DECLS
26
 
 
27
 
 
28
 
/**
29
 
*@file cairo-dock-keyfile-utilities.h This class provides useful functions to manipulate the conf files of Cairo-Dock, which are classic group/key pair files.
30
 
*/
31
 
 
32
 
/** Open a conf file to be read/written. Returns NULL if the file couldn't be found/opened/parsed.
33
 
*Free it with g_key_file_free after you're done.
34
 
*/
35
 
GKeyFile *cairo_dock_open_key_file (const gchar *cConfFilePath);
36
 
 
37
 
/** Write a conf file on the disk.
38
 
*/
39
 
void cairo_dock_write_keys_to_file (GKeyFile *pKeyFile, const gchar *cConfFilePath);
40
 
 
41
 
 
42
 
void cairo_dock_flush_conf_file_full (GKeyFile *pKeyFile, const gchar *cConfFilePath, const gchar *cShareDataDirPath, gboolean bUseFileKeys, const gchar *cTemplateFileName);
43
 
#define cairo_dock_flush_conf_file(pKeyFile, cConfFilePath, cShareDataDirPath, cTemplateFileName) cairo_dock_flush_conf_file_full (pKeyFile, cConfFilePath, cShareDataDirPath, TRUE, cTemplateFileName)
44
 
 
45
 
void cairo_dock_replace_key_values (GKeyFile *pOriginalKeyFile, GKeyFile *pReplacementKeyFile, gboolean bUseOriginalKeys, gchar iIdentifier);
46
 
 
47
 
void cairo_dock_replace_values_in_conf_file (const gchar *cConfFilePath, GKeyFile *pValidKeyFile, gboolean bUseFileKeys, gchar iIdentifier);
48
 
void cairo_dock_replace_keys_by_identifier (const gchar *cConfFilePath, gchar *cReplacementConfFilePath, gchar iIdentifier);
49
 
 
50
 
 
51
 
/** Get the version of a conf file. The version is written on the first line of the file, as a comment.
52
 
*/
53
 
void cairo_dock_get_conf_file_version (GKeyFile *pKeyFile, gchar **cConfFileVersion);
54
 
 
55
 
/** Say if a conf file's version mismatches a giver version.
56
 
*/
57
 
gboolean cairo_dock_conf_file_needs_update (GKeyFile *pKeyFile, const gchar *cVersion);
58
 
 
59
 
/** Add or remove a value in a list of values to a given (group,key) pair of a conf file.
60
 
*/
61
 
void cairo_dock_add_remove_element_to_key (const gchar *cConfFilePath, const gchar *cGroupName, const gchar *cKeyName, gchar *cElementName, gboolean bAdd);
62
 
 
63
 
/** Add a key to a conf file, so that it can be parsed by the GUI manager.
64
 
*/
65
 
void cairo_dock_add_widget_to_conf_file (GKeyFile *pKeyFile, const gchar *cGroupName, const gchar *ckeyName, const gchar *cInitialValue, gchar iWidgetType, const gchar *cDescription, const gchar *cTooltip);
66
 
 
67
 
 
68
 
gboolean cairo_dock_rename_group_in_conf_file (GKeyFile *pKeyFile, const gchar *cGroupName, const gchar *cNewGroupName);
69
 
 
70
 
G_END_DECLS
71
 
#endif