Top | ![]() |
![]() |
![]() |
![]() |
gboolean | fm_folder_config_close () |
gboolean | fm_folder_config_get_boolean () |
gboolean | fm_folder_config_get_double () |
gboolean | fm_folder_config_get_integer () |
char * | fm_folder_config_get_string () |
char ** | fm_folder_config_get_string_list () |
gboolean | fm_folder_config_get_uint64 () |
gboolean | fm_folder_config_is_empty () |
FmFolderConfig * | fm_folder_config_open () |
void | fm_folder_config_purge () |
void | fm_folder_config_remove_key () |
void | fm_folder_config_save_cache () |
void | fm_folder_config_set_boolean () |
void | fm_folder_config_set_double () |
void | fm_folder_config_set_integer () |
void | fm_folder_config_set_string () |
void | fm_folder_config_set_string_list () |
void | fm_folder_config_set_uint64 () |
include
: libfm/fm.h
This API represents access to folder-specific configuration settings. Each setting is a key/value pair. To use it the descriptor should be opened first, then required operations performed, then closed. Each opened descriptor holds a lock on the cache so it is not adviced to keep it somewhere.
gboolean fm_folder_config_close (FmFolderConfig *fc
,GError **error
);
Unlocks the cache and releases any data related to fc
.
Since: 1.2.0
gboolean fm_folder_config_get_boolean (FmFolderConfig *fc
,const char *key
,gboolean *val
);
Returns the value associated with key
as a boolean.
Since: 1.2.0
gboolean fm_folder_config_get_double (FmFolderConfig *fc
,const char *key
,gdouble *val
);
Returns the value associated with key
as a double.
Since: 1.2.0
gboolean fm_folder_config_get_integer (FmFolderConfig *fc
,const char *key
,gint *val
);
Returns the value associated with key
as an integer.
Since: 1.2.0
char * fm_folder_config_get_string (FmFolderConfig *fc
,const char *key
);
Returns the value associated with key
as a string. This function
handles escape sequences like \s.
Since: 1.2.0
char ** fm_folder_config_get_string_list (FmFolderConfig *fc
,const char *key
,gsize *length
);
Returns the values associated with key
. If the specified key cannot
be found then returns NULL
. Returned data array should be freed with
g_strfreev()
after usage.
fc |
a configuration descriptor |
|
key |
a key to search |
|
length |
location for the number of returned strings. |
[out][allow-none] |
Since: 1.2.0
gboolean fm_folder_config_get_uint64 (FmFolderConfig *fc
,const char *key
,guint64 *val
);
Returns the value associated with key
as an unsigned integer.
Since: 1.2.0
gboolean
fm_folder_config_is_empty (FmFolderConfig *fc
);
Checks if there is no data associated with the folder.
Since: 1.2.0
FmFolderConfig *
fm_folder_config_open (FmPath *path
);
Searches for settings in the cache that are specific to path
. Locks
the cache. Returned descriptor can be used for access to settings.
Since: 1.2.0
void
fm_folder_config_purge (FmFolderConfig *fc
);
Clears all the data for the folder from the configuration.
Since: 1.2.0
void fm_folder_config_remove_key (FmFolderConfig *fc
,const char *key
);
Removes the key and associated data from the cache.
Since: 1.2.0
void
fm_folder_config_save_cache (void
);
Saves current data into the cache file.
Since: 1.2.0
void fm_folder_config_set_boolean (FmFolderConfig *fc
,const char *key
,gboolean val
);
Associates boolean val
with key
for given folder configuration.
Since: 1.2.0
void fm_folder_config_set_double (FmFolderConfig *fc
,const char *key
,gdouble val
);
Associates double val
with key
for given folder configuration.
Since: 1.2.0
void fm_folder_config_set_integer (FmFolderConfig *fc
,const char *key
,gint val
);
Associates integer val
with key
for given folder configuration.
Since: 1.2.0
void fm_folder_config_set_string (FmFolderConfig *fc
,const char *key
,const char *string
);
Associates string
with key
for given folder configuration. This
function handles characters that need escaping, such as newlines.
Since: 1.2.0
void fm_folder_config_set_string_list (FmFolderConfig *fc
,const char *key
,const gchar * const list[]
,gsize length
);
Associates NULL-terminated list
with key
for given folder configuration.
fc |
a configuration descriptor |
|
key |
a key to search |
|
list |
a string list to set |
|
length |
number of elements in |
Since: 1.2.0
void fm_folder_config_set_uint64 (FmFolderConfig *fc
,const char *key
,guint64 val
);
Associates unsigned integer val
with key
for given folder configuration.
Since: 1.2.0