mate-config

mate-config — Access to configuration files.

Synopsis

#include <libmate/libmate.h>

#define             mate_config_get_string             (path)
#define             mate_config_get_string_with_default(path,
                                                         def)
#define             mate_config_get_translated_string  (path)
#define             mate_config_get_translated_string_with_default(path,
                                                         def)
#define             mate_config_private_get_string     (path)
#define             mate_config_private_get_string_with_default(path,
                                                         def)
#define             mate_config_private_get_translated_string(path)
#define             mate_config_private_get_translated_string_with_default(path,
                                                         def)
#define             mate_config_set_string             (path,
                                                         new_value)
#define             mate_config_set_translated_string  (path,
                                                         value)
#define             mate_config_private_set_string     (path,
                                                         new_value)
#define             mate_config_private_set_translated_string(path,
                                                         new_value)

#define             mate_config_get_int                (path)
#define             mate_config_get_int_with_default   (path,
                                                         def)
#define             mate_config_private_get_int        (path)
#define             mate_config_private_get_int_with_default(path,
                                                         def)
#define             mate_config_set_int                (path,
                                                         new_value)
#define             mate_config_private_set_int        (path,
                                                         new_value)

#define             mate_config_get_float              (path)
#define             mate_config_get_float_with_default (path,
                                                         def)
#define             mate_config_private_get_float      (path)
#define             mate_config_private_get_float_with_default(path,
                                                         def)
#define             mate_config_set_float              (path,
                                                         new_value)
#define             mate_config_private_set_float      (path,
                                                         new_value)

#define             mate_config_get_bool               (path)
#define             mate_config_get_bool_with_default  (path,
                                                         def)
#define             mate_config_private_get_bool       (path)
#define             mate_config_private_get_bool_with_default(path,
                                                         def)
#define             mate_config_set_bool               (path,
                                                         new_value)
#define             mate_config_private_set_bool       (path,
                                                         new_value)

#define             mate_config_get_vector             (path,
                                                         argcp,
                                                         argvp)
#define             mate_config_get_vector_with_default(path,
                                                         argcp,
                                                         argvp,
                                                         def)
#define             mate_config_private_get_vector     (path,
                                                         argcp,
                                                         argvp)
#define             mate_config_private_get_vector_with_default(path,
                                                         argcp,
                                                         argvp,
                                                         def)
#define             mate_config_set_vector             (path,
                                                         argc,
                                                         argv)
#define             mate_config_private_set_vector     (path,
                                                         argc,
                                                         argv)
char *              mate_config_assemble_vector        (int argc,
                                                         const char *const argv[]);

#define             mate_config_has_section            (path)
#define             mate_config_private_has_section    (path)
#define             mate_config_init_iterator          (path)
#define             mate_config_private_init_iterator  (path)
#define             mate_config_init_iterator_sections (path)
#define             mate_config_private_init_iterator_sections(path)
void *              mate_config_iterator_next          (void *iterator_handle,
                                                         char **key,
                                                         char **value);

void                mate_config_drop_all               (void);
gboolean            mate_config_sync                   (void);
#define             mate_config_sync_file              (path)
#define             mate_config_private_sync_file      (path)
#define             mate_config_drop_file              (path)
#define             mate_config_private_drop_file      (path)
#define             mate_config_clean_file             (path)
#define             mate_config_private_clean_file     (path)
#define             mate_config_clean_section          (path)
#define             mate_config_private_clean_section  (path)
#define             mate_config_clean_key              (path)
#define             mate_config_private_clean_key      (path)
#define             mate_config_get_real_path          (path)
#define             mate_config_private_get_real_path  (path)
void                mate_config_push_prefix            (const char *path);
void                mate_config_pop_prefix             (void);
void                mate_config_make_vector            (const char *string,
                                                         int *argcp,
                                                         char ***argvp);

Description

This module provides a simple method of retrieving and storing configuration data that resides in files. It also provides the ability to supply default values for the configuration parameters to simply client code.

Note

The purpose of this module is different in MATE 2 from what it was in MATE 1. General applications should use the mate-mateconf module for their configuration requirements.

The mate-config module exists for applications that

  • need to provide a backwards-compatible version of their configuration files, or

  • need to run independently of a user and access configuration files at absolute locations (for example, a login manager), or

  • need to parse .desktop-style files, or

  • need to parse user- or shell-editable/readable files.

Definitions. 

  • config path: a string that specifies which item to retrieve from the configuration database. The config path is composed of three elements: the first one is the filename where the information is stored, the second component is the section and the third one is the key inside the section

    For example, a config path of "/myapp/toolbox/showit" could be used to retrieve the setting for whether 'myapp' should display its toolbox or not. In this example "myapp" is the file name (which is stored in ~/.mate2 directory), "toolbox" is the section and "showit" is the key.

    If you want to access an absolute file instead of a ~/.mate2-relative file, then you need to surround the filename with equal signs, for example, to access the key "mykey" from the section "mysection" in a configuration file located in /mate/var/myconfig you need to use this path: "=/mate/var/myconfig=/mysection/mykey".

  • default: when retrieving a config item, specifies the value to be used if the item is not found.

  • private configuration data: Normally, config item data is located in files under the ~user/.mate2 directory in a .ini-like format. These files are world-readable. Items that have security or privacy implications are stored and retrieved using the "private" versions of the mate-config routines, and the data for these items is stored in files under the ~user/.config/mate/private directory, which is not accessable by anyone except that user and the system administrator.

  • translated strings: MATE's multilingual support means that multiple languages must be supported for configuration items. The mate_config_*get_translated_string() and mate_config_*set_translated_string() routines allow you to specify which language a string item should be accessed for.

  • section: a group of config items and other config sections

How Config Items are Read.  The mate-config module has a versatile method of storing config items. When a config item is written by a program, it is written to a file under the ~/.mate2 hierarchy. However, when config items are read, the process is a little more complicated. There are a number of places that are searched. If the config item is not found in one, then the next place is checked, finally falling back to the default value provided by the application. The locations are as follows:

  • $(sysconfdir)/mate/config-override - a system administrator would put config items in this directory that they don't want to be configurable.

  • ~/.mate - this is where the user's config items are written to and is the next place that is searched

  • $(sysconfdir)/mate/config - this directory would hold system wide default configuration values.

Possible uses for this are setting system wide defaults such as proxy servers for the system (either using config-override to enforce such a policy or the config directory to suggest such a default). It is also possible to configure the application through its graphical interface, and then copy the configuration file accross to the appropriate system-wide directory. The config-override directory should be used sparingly, as it could annoy or confuse some users. Note also that some applications will not read the config items every time they are needed, so putting defaults into the config-override directory will not always completely enforce a setting.

Every function in this module comes in at least two forms. There is the mate_config_get_foo() version which retrieves the configuration data from the ~/.mate2 directory (unless an absolute configuration key is given, as defined above). Then there is the mate_config_private_get_foo() version, which retrieves the information from the user's ~/.mate2-private directory.

For functions dealing with strings, there is a third form of each function which returns the translated version of the string for the current locale.

Details

mate_config_get_string()

#define             mate_config_get_string(path)

Warning

mate_config_get_string is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string. This value should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item.

Returns :

The value of the configuration item as a string.

mate_config_get_string_with_default()

#define             mate_config_get_string_with_default(path,def)

Warning

mate_config_get_string_with_default is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string. This value should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of the configuration item as a string, or def if the configuration key does not exist.

mate_config_get_translated_string()

#define             mate_config_get_translated_string(path)

Warning

mate_config_get_translated_string is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string appropriate for the current language. The returned value should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item.

Returns :

The value of the configuration item.

mate_config_get_translated_string_with_default()

#define             mate_config_get_translated_string_with_default(path,def)

Warning

mate_config_get_translated_string_with_default is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string appropriate for the current language. The returned value should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of the configuration item or def if the configuration item does not exist.

mate_config_private_get_string()

#define             mate_config_private_get_string(path)

Warning

mate_config_private_get_string is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item from the user's private configuration directory as a string. This value should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item in the user-private namespace.

Returns :

The value of the configuration item as a string.

mate_config_private_get_string_with_default()

#define             mate_config_private_get_string_with_default(path,def)

Warning

mate_config_private_get_string_with_default is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item from the user's private configuration directory as a string. This value should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item in the user-private namespace.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of the configuration item as a string, or def if the configuration key does not exist.

mate_config_private_get_translated_string()

#define             mate_config_private_get_translated_string(path)

Warning

mate_config_private_get_translated_string is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string appropriate for the current language. The returned value should be freed with g_free() when no longer needed. The item is retrieved from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

Returns :

The value of the configuration item.

mate_config_private_get_translated_string_with_default()

#define             mate_config_private_get_translated_string_with_default(path,def)

Warning

mate_config_private_get_translated_string_with_default is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string appropriate for the current language. The returned value should be freed with g_free() when no longer needed. The item is retrieved from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of the configuration item or def if the configuration item does not exist.

mate_config_set_string()

#define             mate_config_set_string(path,new_value)

Warning

mate_config_set_string is deprecated and should not be used in newly-written code.

Stores the string value new_value in the file/section/key defined by the path.

path :

A mate configuration path to a key.

new_value :

A string value to set.

mate_config_set_translated_string()

#define             mate_config_set_translated_string(path,value)

Warning

mate_config_set_translated_string is deprecated and should not be used in newly-written code.

Stores the string value value in the file/section/key defined by the path on the proper section for the current language set by by the user.

path :

A mate configuration path to a key.

value :

A string value to set.

mate_config_private_set_string()

#define             mate_config_private_set_string(path,new_value)

Warning

mate_config_private_set_string is deprecated and should not be used in newly-written code.

Stores the string value new_value in the file/section/key defined by the path. The configuration value is stored in the user's private storage area.

path :

A mate configuration path to a key.

new_value :

A string value to set.

mate_config_private_set_translated_string()

#define             mate_config_private_set_translated_string(path,new_value)

Warning

mate_config_private_set_translated_string is deprecated and should not be used in newly-written code.

Stores the string value new_value in the file/section/key defined by the path on the proper section for the current language set by by the user. The configuration value is stored in the user's private storage area.

path :

A mate configuration path to a key.

new_value :

A string value to set.

mate_config_get_int()

#define             mate_config_get_int(path)

Warning

mate_config_get_int is deprecated and should not be used in newly-written code.

Retrieves an integer value configuration item.

path :

A mate configuration path to an item.

Returns :

The value of a configuration item.

mate_config_get_int_with_default()

#define             mate_config_get_int_with_default(path,def)

Warning

mate_config_get_int_with_default is deprecated and should not be used in newly-written code.

Retrieves an integer value configuration item.

path :

A mate configuration path to an item.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of a configuration item as an integer or def if the configuration item does not exist.

mate_config_private_get_int()

#define             mate_config_private_get_int(path)

Warning

mate_config_private_get_int is deprecated and should not be used in newly-written code.

Retrieves a configuration item as an int from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

Returns :

The value of a configuration item as an integer.

mate_config_private_get_int_with_default()

#define             mate_config_private_get_int_with_default(path,def)

Warning

mate_config_private_get_int_with_default is deprecated and should not be used in newly-written code.

Retrieves a configuration item as an int from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of a configuration item as an integer or def if the configuration item does not exist.

mate_config_set_int()

#define             mate_config_set_int(path,new_value)

Warning

mate_config_set_int is deprecated and should not be used in newly-written code.

Stores the integer value new_value in the file/section/key defined by the path.

path :

A mate configuration path to a key.

new_value :

A int value to set.

mate_config_private_set_int()

#define             mate_config_private_set_int(path,new_value)

Warning

mate_config_private_set_int is deprecated and should not be used in newly-written code.

Stores the integer value new_value in the file/section/key defined by the path. The value is stored in the user's private configuration storage area.

path :

A mate configuration path to a key.

new_value :

A int value to set.

mate_config_get_float()

#define             mate_config_get_float(path)

Warning

mate_config_get_float is deprecated and should not be used in newly-written code.

Retrieves a floating-point valued configuration item.

path :

A mate configuration path to an item.

Returns :

The value of a configuration item.

mate_config_get_float_with_default()

#define             mate_config_get_float_with_default(path,def)

Warning

mate_config_get_float_with_default is deprecated and should not be used in newly-written code.

Retrieves a floating-point valued configuration item.

path :

A mate configuration path to an item.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of a configuration item as a floating-point number or def if the configuration item does not exist.

mate_config_private_get_float()

#define             mate_config_private_get_float(path)

Warning

mate_config_private_get_float is deprecated and should not be used in newly-written code.

Retrieves a configuration item from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

Returns :

The value of a configuration item as a floating-point number.

mate_config_private_get_float_with_default()

#define             mate_config_private_get_float_with_default(path,def)

Warning

mate_config_private_get_float_with_default is deprecated and should not be used in newly-written code.

Retrieves a configuration item from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of a configuration item as a floating-point number or def if the configuration item does not exist.

mate_config_set_float()

#define             mate_config_set_float(path,new_value)

Warning

mate_config_set_float is deprecated and should not be used in newly-written code.

Stores the double value new_value in the file/section/key defined by the path.

path :

A mate configuration path to a key.

new_value :

A double value to set.

mate_config_private_set_float()

#define             mate_config_private_set_float(path,new_value)

Warning

mate_config_private_set_float is deprecated and should not be used in newly-written code.

Stores the double value new_value in the file/section/key defined by the path. The value is stored in the user's private configuration storage area.

path :

A mate configuration path to a key.

new_value :

A double value to set.

mate_config_get_bool()

#define             mate_config_get_bool(path)

Warning

mate_config_get_bool is deprecated and should not be used in newly-written code.

Retrieves a boolean configuration value.

path :

A mate configuration path to an item.

Returns :

The value of a configuration item.

mate_config_get_bool_with_default()

#define             mate_config_get_bool_with_default(path,def)

Warning

mate_config_get_bool_with_default is deprecated and should not be used in newly-written code.

Retrieves a boolean configuration value.

path :

A mate configuration path to an item.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of a configuration item, or def if the configuration item does not exist.

mate_config_private_get_bool()

#define             mate_config_private_get_bool(path)

Warning

mate_config_private_get_bool is deprecated and should not be used in newly-written code.

Retrieves the item from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

Returns :

The value of a configuration item as a boolean.

mate_config_private_get_bool_with_default()

#define             mate_config_private_get_bool_with_default(path,def)

Warning

mate_config_private_get_bool_with_default is deprecated and should not be used in newly-written code.

Retrieves the item from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

def :

A pointer to a flag that will be set if the default value for the item is returned.

Returns :

The value of a configuration item as a boolean, or def if the configuration item does not exist.

mate_config_set_bool()

#define             mate_config_set_bool(path,new_value)

Warning

mate_config_set_bool is deprecated and should not be used in newly-written code.

Stores boolean value new_value in the file/section/key defined by path.

path :

A mate configuration path to a key.

new_value :

A boolean value to set.

mate_config_private_set_bool()

#define             mate_config_private_set_bool(path,new_value)

Warning

mate_config_private_set_bool is deprecated and should not be used in newly-written code.

Stores boolean value new_value in the file/section/key defined by path. The value is stored in the user's private configuration storage area.

path :

A mate configuration path to a key.

new_value :

A boolean value to set.

mate_config_get_vector()

#define             mate_config_get_vector(path, argcp, argvp)

Warning

mate_config_get_vector is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string array. The returned vector should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item.

argcp :

Number of elements in the vector.

argvp :

Vector of strings.

mate_config_get_vector_with_default()

#define             mate_config_get_vector_with_default(path, argcp, argvp, def)

Warning

mate_config_get_vector_with_default is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string array. The returned vector should be freed with g_free() when no longer needed.

path :

A mate configuration path to an item.

argcp :

Number of elements in the vector.

argvp :

Vector of strings.

def :

A pointer to a flag that will be set if the default value for the item is returned.

mate_config_private_get_vector()

#define             mate_config_private_get_vector(path, argcp, argvp)

Warning

mate_config_private_get_vector is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string array. The returned vector should be freed with g_free() when no longer needed. The configuration value is retrieved from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

argcp :

Number of elements in the vector.

argvp :

Vector of strings.

mate_config_private_get_vector_with_default()

#define             mate_config_private_get_vector_with_default(path, argcp, argvp, def)

Warning

mate_config_private_get_vector_with_default is deprecated and should not be used in newly-written code.

Retrieves the value of a configuration item as a string array. The returned vector should be freed with g_free() when no longer needed. The configuration value is retrieved from the user's private configuration storage area.

path :

A mate configuration path to an item in the user-private namespace.

argcp :

Number of elements in the vector

argvp :

Vector of strings

def :

A pointer to a flag that will be set if the default value for the item is returned.

mate_config_set_vector()

#define             mate_config_set_vector(path,argc,argv)

Warning

mate_config_set_vector is deprecated and should not be used in newly-written code.

Stores vector argv in the file/section/key defined by path.

path :

A mate configuration path to a key.

argc :

The number of elements in argv.

argv :

A string array holding the data to store.

mate_config_private_set_vector()

#define             mate_config_private_set_vector(path,argc,argv)

Warning

mate_config_private_set_vector is deprecated and should not be used in newly-written code.

Stores vector argv in the file/section/key defined by path. The configuration value is set in the user's private storage area.

path :

A mate configuration path to a key.

argc :

The number of elements in argv.

argv :

A string array holding the data to store.

mate_config_assemble_vector ()

char *              mate_config_assemble_vector        (int argc,
                                                         const char *const argv[]);

Warning

mate_config_assemble_vector is deprecated and should not be used in newly-written code.

This routine returns the the strings in the array contactenated by spaces. The return value should be freed with g_free() when it is no longer required.

argc :

Number of elements in the argv string array.

argv :

An array of strings.

Returns :

A string with the concatenation results.

mate_config_has_section()

#define             mate_config_has_section(path)

Warning

mate_config_has_section is deprecated and should not be used in newly-written code.

Queries the mate configuration file for the presence of the section specified in path.

path :

A mate configuration path to a section

Returns :

TRUE if the section exists, FALSE otherwise.

mate_config_private_has_section()

#define             mate_config_private_has_section(path)

Warning

mate_config_private_has_section is deprecated and should not be used in newly-written code.

Queries the private mate configuration file for the presence of the section specified in path.

path :

A mate configuration path to a section

Returns :

TRUE if the section exists, FALSE otherwise.

mate_config_init_iterator()

#define             mate_config_init_iterator(path)

Warning

mate_config_init_iterator is deprecated and should not be used in newly-written code.

Creates an iterator handle that can be used to iterate over the keys in a section in a mate configuration file. path must refer to a section. The returned value can be used as an iterator for mate_config_iterator_next().

path :

A mate configuration path for a section.

Returns :

The iterator handle.

mate_config_private_init_iterator()

#define             mate_config_private_init_iterator(path)

Warning

mate_config_private_init_iterator is deprecated and should not be used in newly-written code.

Creates an iterator handle that can be used to iterate over the keys in a section in a private mate configuration file. path must refer to a section. The returned value can be used as an iterator for mate_config_iterator_next().

path :

A mate configuration path for a section.

Returns :

The iterator handle.

mate_config_init_iterator_sections()

#define             mate_config_init_iterator_sections(path)

Warning

mate_config_init_iterator_sections is deprecated and should not be used in newly-written code.

Creates an iterator handle that can be used to iterate over the sections in a mate configuration file. path must refer to a mate configuration file. The returned value can be used as an iterator for mate_config_iterator_next().

path :

A mate configuration path for a file.

Returns :

The iterator handle.

mate_config_private_init_iterator_sections()

#define             mate_config_private_init_iterator_sections(path)

Warning

mate_config_private_init_iterator_sections is deprecated and should not be used in newly-written code.

Creates an iterator handle that can be used to iterate over the sections in a private mate configuration file. path must refer to a mate configuration file. The returned value can be used as an iterator for mate_config_iterator_next().

path :

A mate configuration path for a file

Returns :

The iterator handle.

mate_config_iterator_next ()

void *              mate_config_iterator_next          (void *iterator_handle,
                                                         char **key,
                                                         char **value);

Warning

mate_config_iterator_next is deprecated and should not be used in newly-written code.

If key is non-NULL, then key will point to a g_malloc()ed region that holds the key.

If value is non-NULL, then value will point to a g_malloc()ed region that holds the key.

iterator_handle :

A mate configu iterator handle, returned from any iteration start routine or this routine.

key :

Address where the key gets stored.

value :

Address where the value gets stored.

Returns :


mate_config_drop_all ()

void                mate_config_drop_all               (void);

Warning

mate_config_drop_all is deprecated and should not be used in newly-written code.

Drops any information cached in memory that was fetched with mate config. Any pending information that has not been written to disk is discarded.


mate_config_sync ()

gboolean            mate_config_sync                   (void);

Warning

mate_config_sync is deprecated and should not be used in newly-written code.

Writes all of the information modified by mate-config to the disk.

Note: the mate-config code does not write anything to the configuration files until this routine is actually invoked.

Returns :

TRUE if everything went well. FALSE if any file could not be written to disk.

mate_config_sync_file()

#define             mate_config_sync_file(path)

Warning

mate_config_sync_file is deprecated and should not be used in newly-written code.

Writes all of the information modified by mate-config to the disk for the given file.

Note: the mate-config code does not write anything to the configuration files until this routine or mate_config_sync() is actually invoked.

path :

A mate-config path

Returns :

TRUE if everything went well, FALSE if the file could not be written to for some reason. FALSE is only returned when a write was actually attempted and failed.

mate_config_private_sync_file()

#define             mate_config_private_sync_file(path)

Warning

mate_config_private_sync_file is deprecated and should not be used in newly-written code.

Writes all of the information modified by mate-config to the disk for the given private file.

Note: the mate-config code does not write anything to the configuration files until this routine or mate_config_sync() is actually invoked.

path :

A mate-config path

Returns :

TRUE if everything went well, FALSE if the file could not be written to for some reason. FALSE is only returned when a write was actually attempted and failed.

mate_config_drop_file()

#define             mate_config_drop_file(path)

Warning

mate_config_drop_file is deprecated and should not be used in newly-written code.

Releases any memory resources that were allocated from accessing the configuration file in path. Changes will take place after mate_config_sync() has been invoked

path :

A mate-config path

mate_config_private_drop_file()

#define             mate_config_private_drop_file(path)

Warning

mate_config_private_drop_file is deprecated and should not be used in newly-written code.

Releases any memory resources that were allocated from accessing the private configuration file in path.

path :

A mate-config path

mate_config_clean_file()

#define             mate_config_clean_file(path)

Warning

mate_config_clean_file is deprecated and should not be used in newly-written code.

Cleans up the configuration file specified by path from any configuration information.

Changes will take place after mate_config_sync() has been invoked.

path :

A mate-config path

mate_config_private_clean_file()

#define             mate_config_private_clean_file(path)

Warning

mate_config_private_clean_file is deprecated and should not be used in newly-written code.

Cleans up the private configuration file specified by path from any configuration information.

Changes will take place after mate_config_sync() has been invoked.

path :

A mate-config path

mate_config_clean_section()

#define             mate_config_clean_section(path)

Warning

mate_config_clean_section is deprecated and should not be used in newly-written code.

Cleans up the section specified by path from any configuration information. Changes will only take place after mate_config_sync() has been invoked.

path :

A mate configuration path to a section.

mate_config_private_clean_section()

#define             mate_config_private_clean_section(path)

Warning

mate_config_private_clean_section is deprecated and should not be used in newly-written code.

Cleans up the section specified by path in a private file from any configuration information. Changes will only take place after mate_config_sync() has been invoked.

path :

A mate configuration path to a section.

mate_config_clean_key()

#define             mate_config_clean_key(path)

Warning

mate_config_clean_key is deprecated and should not be used in newly-written code.

Removes the definition for the key on a mate configuration file.

Changes will take place after mate_config_sync() has been invoked.

path :

A mate configuration path to a key.

mate_config_private_clean_key()

#define             mate_config_private_clean_key(path)

Warning

mate_config_private_clean_key is deprecated and should not be used in newly-written code.

Removes the definition for the key on a private mate configuration file.

Changes will take place after mate_config_sync() has been invoked.

path :

A mate configuration path to a key.

mate_config_get_real_path()

#define             mate_config_get_real_path(path)

Warning

mate_config_get_real_path is deprecated and should not be used in newly-written code.

Retrieves the full (absolute) path to a configuration file.

path :

A configuration file (this should only be the file, not the section or key).

Returns :

An absolute path to the config file.

mate_config_private_get_real_path()

#define             mate_config_private_get_real_path(path)

Warning

mate_config_private_get_real_path is deprecated and should not be used in newly-written code.

Retrieves the full (absolute) path to a configuration file in the user's private configuration storage area.

path :

A configuration file (this should only be the file, not the section or key).

Returns :

An absolute path to the config file.

mate_config_push_prefix ()

void                mate_config_push_prefix            (const char *path);

Warning

mate_config_push_prefix is deprecated and should not be used in newly-written code.

path is a prefix that will be prepended automatically to any non-absolute configuration path in mate config.

This is used to simplify application loading code.

Library code will usually have to set the prefix before doing any mate-configuration access, since the application might be using their own prefix.

path :

A mate configuration path prefix.

mate_config_pop_prefix ()

void                mate_config_pop_prefix             (void);

Warning

mate_config_pop_prefix is deprecated and should not be used in newly-written code.

Call this routine to remove the current configuration prefix from the stack.


mate_config_make_vector ()

void                mate_config_make_vector            (const char *string,
                                                         int *argcp,
                                                         char ***argvp);

Warning

mate_config_make_vector is deprecated and should not be used in newly-written code.

Creates a new vector from a string as it stored in the config file, breaks the string on spaces except if the space is escaped with a backslash.

string :

The stringified vector to decode into 'argcp' and 'argvp'

argcp :

Returns the number of elements in string.

argvp :

Returns the array of strings found in string.