![]() |
![]() |
![]() |
OGMRip Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <ogmrip-settings.h> OGMRipSettings; void (*OGMRipSetFunc) (GObject *object
,const gchar *property
,const GValue *value
,gpointer data
); void (*OGMRipGetFunc) (GObject *object
,const gchar *property
,GValue *value
,gpointer data
); void (*OGMRipNotifyFunc) (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,const GValue *value
,gpointer data
); gulong ogmrip_settings_add_notify (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,OGMRipNotifyFunc func
,gpointer data
); gulong ogmrip_settings_add_notify_while_alive (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,OGMRipNotifyFunc func
,gpointer data
,GObject *object
); void ogmrip_settings_bind (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,GObject *object
,const gchar *property
); void ogmrip_settings_bind_custom (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,GObject *object
,const gchar *property
,OGMRipGetFunc get_func
,OGMRipSetFunc set_func
,gpointer data
); void ogmrip_settings_block (OGMRipSettings *settings
,const gchar *section
,const gchar *key
); gchar * ogmrip_settings_build_section (OGMRipSettings *settings
,const gchar *element
,...
); gint ogmrip_settings_compare_versions (const gchar *version1
,const gchar *version2
); gboolean ogmrip_settings_export (OGMRipSettings *settings
,const gchar *section
,const gchar *filename
,GError **error
); GParamSpec * ogmrip_settings_find_key (OGMRipSettings *settings
,const gchar *key
); void ogmrip_settings_get (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,...
); OGMRipSettings * ogmrip_settings_get_default (void
); GSList * ogmrip_settings_get_keys (OGMRipSettings *settings
,const gchar *section
,gboolean recursive
); GType ogmrip_settings_get_key_type (OGMRipSettings *settings
,const gchar *section
,const gchar *key
); const gchar * ogmrip_settings_get_section_name (OGMRipSettings *settings
,const gchar *section
); GSList * ogmrip_settings_get_subsections (OGMRipSettings *settings
,const gchar *section
); void ogmrip_settings_get_value (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,GValue *value
); gboolean ogmrip_settings_has_key (OGMRipSettings *settings
,const gchar *section
,const gchar *key
); gboolean ogmrip_settings_has_section (OGMRipSettings *settings
,const gchar *section
); gboolean ogmrip_settings_import (OGMRipSettings *settings
,const gchar *filename
,gchar **section
,GError **error
); void ogmrip_settings_install_key (OGMRipSettings *settings
,GParamSpec *pspec
); void ogmrip_settings_install_key_from_property (OGMRipSettings *settings
,GObjectClass *klass
,const gchar *section
,const gchar *key
,const gchar *property
); gboolean ogmrip_settings_parse (OGMRipSettings *settings
,const gchar *filename
,OGMRipParseFunc func
,gpointer user_data
,GError **error
); void ogmrip_settings_remove_key (OGMRipSettings *settings
,const gchar *section
,const gchar *key
); void ogmrip_settings_remove_notify (OGMRipSettings *settings
,gulong handler_id
); void ogmrip_settings_remove_section (OGMRipSettings *settings
,const gchar *section
); void ogmrip_settings_set (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,...
); void ogmrip_settings_set_default (OGMRipSettings *settings
); void ogmrip_settings_set_property_from_key (OGMRipSettings *settings
,GObject *object
,const gchar *property
,const gchar *section
,const gchar *key
); void ogmrip_settings_set_value (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,const GValue *value
); void ogmrip_settings_sync (OGMRipSettings *settings
); void ogmrip_settings_unbind (OGMRipSettings *settings
,GObject *object
); void ogmrip_settings_unblock (OGMRipSettings *settings
,const gchar *section
,const gchar *key
);
void (*OGMRipSetFunc) (GObject *object
,const gchar *property
,const GValue *value
,gpointer data
);
Specifies the type of functions passed to ogmrip_settings_bind_custom()
to set
the value of the property.
void (*OGMRipGetFunc) (GObject *object
,const gchar *property
,GValue *value
,gpointer data
);
Specifies the type of functions passed to ogmrip_settings_bind_custom()
to get
the value of the property.
void (*OGMRipNotifyFunc) (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,const GValue *value
,gpointer data
);
Specifies the type of functions passed to ogmrip_settings_add_notify()
,
and ogmrip_settings_add_notify_while_alive()
.
|
An OGMRipSettings |
|
A section |
|
A key |
|
A GValue |
|
The user data |
gulong ogmrip_settings_add_notify (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,OGMRipNotifyFunc func
,gpointer data
);
Request notification of changes of key
in section
.
|
an OGMRipSettings |
|
the section |
|
the key |
|
function to call when changes occur |
|
user data to pass to func
|
Returns : |
a connection ID for removing the notification |
gulong ogmrip_settings_add_notify_while_alive (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,OGMRipNotifyFunc func
,gpointer data
,GObject *object
);
Request notification of changes of key
in section
. When object
is destroyed,
the notification is automatically removed.
|
an OGMRipSettings |
|
the section |
|
the key |
|
function to call when changes occur |
|
user data to pass to func
|
|
a GObject |
Returns : |
a connection ID for removing the notification |
void ogmrip_settings_bind (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,GObject *object
,const gchar *property
);
Binds key
in section
with property
of object
. Whenever property
changes,
key
is updated. Whenever key
changeѕ, property
is updated.
|
an OGMRipSettings |
|
the section |
|
the key |
|
a GObject |
|
a property of object
|
void ogmrip_settings_bind_custom (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,GObject *object
,const gchar *property
,OGMRipGetFunc get_func
,OGMRipSetFunc set_func
,gpointer data
);
Binds key
in section
with property
of object
. Whenever property
changes,
key
is updated. Whenever key
changeѕ, property
is updated.
|
an OGMRipSettings |
|
the section |
|
the key |
|
a GObject |
|
a property of object
|
|
function called whenever property changes setting a custom value to key
|
|
function called whenever key changes settings a custom value to object
|
|
user data to pass to get_func and set_func
|
void ogmrip_settings_block (OGMRipSettings *settings
,const gchar *section
,const gchar *key
);
Blocks all notifications related to key
in section
. If section
is NULL, notifications
related to key
from all sections are blocked.
|
an OGMRipSettings |
|
the section |
|
the key |
gchar * ogmrip_settings_build_section (OGMRipSettings *settings
,const gchar *element
,...
);
Builds a section from many section elements.
|
an OGMRipSettings |
|
the first section element |
|
more section elements |
Returns : |
the new section |
gint ogmrip_settings_compare_versions (const gchar *version1
,const gchar *version2
);
Compares the versions of two profiles.
|
A profile's version |
|
Another profile's version |
Returns : |
Negative value if version1 < version2 ; zero if version1 = version2 ;
positive value if version1 > version2
|
gboolean ogmrip_settings_export (OGMRipSettings *settings
,const gchar *section
,const gchar *filename
,GError **error
);
Exports settings from section
in filename
.
|
An OGMRipSettings |
|
The section to export |
|
A filename to export into |
|
Return location for error |
Returns : |
TRUE if section has been exported, FALSE otherwise |
GParamSpec * ogmrip_settings_find_key (OGMRipSettings *settings
,const gchar *key
);
Looks up the GParamSpec for a key.
|
an OGMRipSettings |
|
the name of the key to look up |
Returns : |
the GParamSpec for the key, or NULL |
void ogmrip_settings_get (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,...
);
Gets the values associated with any number of settings in the same section.
|
an OGMRipSettings |
|
the section of the keys |
|
the name of the first key to fetch |
|
pointers to the locations to store the value of the first key, followed
by more name/pointer groupings, followed by NULL . |
OGMRipSettings * ogmrip_settings_get_default (void
);
Gets the default setting manager if it exists.
Returns : |
the default OGMRipSettings, or NULL |
GSList * ogmrip_settings_get_keys (OGMRipSettings *settings
,const gchar *section
,gboolean recursive
);
Lists the keys in section
. The returned list contains allocated
strings. You should g_free()
each string in the list, then g_slist_free()
the
list itself.
|
an OGMRipSettings |
|
the section from which to get the keys |
|
perform a recursive search |
Returns : |
List of allocated key names |
GType ogmrip_settings_get_key_type (OGMRipSettings *settings
,const gchar *section
,const gchar *key
);
Gets the type of the setting named by key
in section
.
|
an OGMRipSettings |
|
the section of the key |
|
the name of the key to fetch |
Returns : |
the type of key , or G_TYPE_NONE
|
const gchar * ogmrip_settings_get_section_name (OGMRipSettings *settings
,const gchar *section
);
Gets the name of the section.
|
an OGMRipSettings |
|
a section |
Returns : |
the name of the section |
GSList * ogmrip_settings_get_subsections (OGMRipSettings *settings
,const gchar *section
);
Lists the subsections in section
. The returned list contains allocated
strings. You should g_free()
each string in the list, then g_slist_free()
the
list itself.
|
an OGMRipSettings |
|
the section from which to get the subsections |
Returns : |
List of allocated subsection names |
void ogmrip_settings_get_value (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,GValue *value
);
Gets the value associated with the setting named by key
in section
.
|
an OGMRipSettings |
|
the section of the key |
|
the name of the key to fetch |
|
a GValue of the correct type |
gboolean ogmrip_settings_has_key (OGMRipSettings *settings
,const gchar *section
,const gchar *key
);
Returns whether a key exists or not.
|
an OGMRipSettings |
|
the section |
|
the key |
Returns : |
TRUE if key exists, FALSE otherwise |
gboolean ogmrip_settings_has_section (OGMRipSettings *settings
,const gchar *section
);
Returns whether a section exists or not.
|
an OGMRipSettings |
|
the section |
Returns : |
TRUE if section exists, FALSE otherwise |
gboolean ogmrip_settings_import (OGMRipSettings *settings
,const gchar *filename
,gchar **section
,GError **error
);
Imports settings from filename
in section
.
|
An OGMRipSettings |
|
A filename to import from |
|
The section in which to import |
|
Return location for error |
Returns : |
TRUE if filename has been imported, FALSE otherwise |
void ogmrip_settings_install_key (OGMRipSettings *settings
,GParamSpec *pspec
);
Installs a new key.
|
an OGMRipSettings |
|
a GParamSpec |
void ogmrip_settings_install_key_from_property (OGMRipSettings *settings
,GObjectClass *klass
,const gchar *section
,const gchar *key
,const gchar *property
);
Installs a new key using the GParamSpec of property
.
|
An OGMRipSettings |
|
A GObjectClass |
|
A section |
|
A key |
|
A property |
gboolean ogmrip_settings_parse (OGMRipSettings *settings
,const gchar *filename
,OGMRipParseFunc func
,gpointer user_data
,GError **error
);
Parses the settings in filename
, calling func
for each entries.
|
An OGMRipSettings |
|
A filename to parse |
|
The function to call for each entries |
|
User data passed to the function |
|
Return location for error |
Returns : |
TRUE on success, FALSE if an error was set |
void ogmrip_settings_remove_key (OGMRipSettings *settings
,const gchar *section
,const gchar *key
);
Removeѕ key
from section
.
|
an OGMRipSettings |
|
a section |
|
the key to remove |
void ogmrip_settings_remove_notify (OGMRipSettings *settings
,gulong handler_id
);
Remove a notification using the ID returned from ogmrip_settings_add_notify()
or ogmrip_settings_add_notify_while_alive()
.
|
an OGMRipSettings |
|
a connection ID |
void ogmrip_settings_remove_section (OGMRipSettings *settings
,const gchar *section
);
Removeѕ section
and all its keys and subsections.
|
an OGMRipSettings |
|
the section to remove |
void ogmrip_settings_set (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,...
);
Sets the values associated with any number of settings in the same section.
|
an OGMRipSettings |
|
the section of the keys |
|
the name of the first key to set |
|
pointers to the value of the first key, followed by more name/pointer
groupings, followed by NULL . |
void ogmrip_settings_set_default (OGMRipSettings *settings
);
Sets the default setting manager. If settings
is NULL, the current default
setting manager is removed.
|
an OGMRipSettings, or NULL |
void ogmrip_settings_set_property_from_key (OGMRipSettings *settings
,GObject *object
,const gchar *property
,const gchar *section
,const gchar *key
);
Sets a property of an object using the value of a settings key.
|
An OGMRipSettings |
|
A GObject |
|
Name of the property to set |
|
Section of a key |
|
Name of a key |
void ogmrip_settings_set_value (OGMRipSettings *settings
,const gchar *section
,const gchar *key
,const GValue *value
);
Sets the setting named by key
in section
to value
.
|
an OGMRipSettings |
|
the section of the key |
|
the name of the key to fetch |
|
a GValue of the correct type |
void ogmrip_settings_sync (OGMRipSettings *settings
);
Blah
|
an OGMRipSettings |
void ogmrip_settings_unbind (OGMRipSettings *settings
,GObject *object
);
Removes the bindings associated to object
.
|
an OGMRipSettings |
|
a GObject |
void ogmrip_settings_unblock (OGMRipSettings *settings
,const gchar *section
,const gchar *key
);
Unblocks all notifications related to key
in section
. If section
is NULL, notifications
related to key
from all sections are unblocked.
|
an OGMRipSettings |
|
the section |
|
the key |