all functions of this API More...
#include "../include/scol_glib_keyfile.h"
#include "main.h"
#include <glib/gstdio.h>
Functions | |
int | GKF_VALUE_RAW (mmachine m) |
GKF_VALUE_RAW : I : flag used to load a key file. The raw value associated with key under group. The value can be escaped string. | |
int | GKF_VALUE_STRING (mmachine m) |
GKF_VALUE_STRING : I : flag used to load a key file. The string value associated with key under group. Unlike GKF_VALUE_RAW, any escaped sequence are unescaped. | |
int | GKF_VALUE_INTEGER (mmachine m) |
GKF_VALUE_INTEGER : Not implemented yet. | |
int | GKF_VALUE_INTEGER64 (mmachine m) |
GKF_VALUE_INTEGER64 : Not implemented yet. | |
int | GKF_VALUE_UINTEGER64 (mmachine m) |
GKF_VALUE_UINTEGER64 : Not implemented yet. | |
int | GKF_VALUE_DOUBLE (mmachine m) |
GKF_VALUE_DOUBLE : Not implemented yet. | |
int | GKF_VALUE_BOOLEAN (mmachine m) |
GKF_VALUE_BOOLEAN : Not implemented yet. | |
int | SCOL_gkeyFileReadP (mmachine m) |
_gkeyFileReadP : read a key file fun [P S] [[S [[S S] r1]] r1] | |
int | SCOL_gkeyFileLoadP (mmachine m) |
_gkeyFileLoadP : Loads a key file from any valid file | |
int | SCOL_gkeyFileLoadS (mmachine m) |
_gkeyFileLoadS : Loads a key file from any valid data | |
int | SCOL_gkeyFileSave (mmachine m) |
_gkeyFileSave : save a keyfile to a filename | |
int | SCOL_gkeyFileDestroy (mmachine m) |
_gkeyFileDestroy : Destroys an object | |
int | SCOL_gkeyFileGetContent (mmachine m) |
_gkeyFileGetContent : Returns the content of key file | |
int | SCOL_gkeyFileGetDatas (mmachine m) |
_gkeyFileGetDatas : Return a list of the content | |
int | SCOL_gkeyFileGetGroups (mmachine m) |
_gkeyFileGetGroups : Returns a list of all groups | |
int | SCOL_gkeyFileGetNbGroups (mmachine m) |
_gkeyFileGetNbGroups : Returns the number of group | |
int | SCOL_gkeyFileDataExist (mmachine m) |
_gkeyFileDataExist : Looks whether the key file has the datas | |
int | SCOL_keyFileGetValue (mmachine m) |
_keyFileGetValue : Returns the value for any key in any group | |
int | SCOL_keyFileGetLocaleValue (mmachine m) |
_keyFileGetLocaleValue : Returns the locale value for any key in any group | |
int | SCOL_gkeyFileGetValueList (mmachine m) |
_gkeyFileGetValueList : Returns the values associated with key under group | |
int | SCOL_gkeyFileGetValueLocaleList (mmachine m) |
_gkeyFileGetValueLocaleList : Returns the locales values associated with key under group | |
int | SCOL_gkeyFileGetComment (mmachine m) |
_gkeyFileGetComment : Return a comment | |
int | SCOL_gkeyFileSetValue (mmachine m) |
_gkeyFileSetValue : Associates a new value with key under group. | |
int | SCOL_gkeyFileSetLocaleValue (mmachine m) |
_gkeyFileSetValue : Associates a new value with key under group. | |
int | SCOL_gkeyFileSetValueList (mmachine m) |
_gkeyFileSetValueList : Associates a list of string for key under group. | |
int | SCOL_gkeyFileSetLocaleValueList (mmachine m) |
_gkeyFileSetValueList : Associates a list of string for key under group. | |
int | SCOL_gkeyFileSetComment (mmachine m) |
_gkeyFileSetComment : Comments a key, a group or the key file. | |
int | SCOL_gkeyFileRemGroup (mmachine m) |
_gkeyFileRemGroup : Removes the specified group from the object. | |
int | SCOL_gkeyFileRemKey (mmachine m) |
_gkeyFileRemKey : Removes the specified key in group from the object. | |
int | SCOL_gkeyFileRemComment (mmachine m) |
_gkeyFileRemComment : Removes a comment above key from group. | |
Variables | |
mmachine | mm |
char * | gkey_name [GKEYFILE_PKG_NB] |
int(* | gkey_fun [GKEYFILE_PKG_NB])(mmachine m) |
int | gkey_narg [GKEYFILE_PKG_NB] |
char * | gkey_type [GKEYFILE_PKG_NB] |
all functions of this API
int SCOL_gkeyFileReadP | ( | mmachine | m | ) |
_gkeyFileReadP : read a key file fun [P S] [[S [[S S] r1]] r1]
P | : any file (read reference only) | |
S | : the list seperator, or nil (default ";") |
int SCOL_gkeyFileLoadP | ( | mmachine | m | ) |
_gkeyFileLoadP : Loads a key file from any valid file
fun [Chn P S I] ObjKeyFile
Chn | : the channel | |
P | : any read referenced file | |
S | : the list separator or nil (default ";"). One character only (if more, they are ignored) | |
I | : flag : 0 -> No flags, default behaviour 1 -> Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise all comments will be lost when the key file is written back. 2 -> Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise only the translations for the current language will be written back. 3 -> 1 and 2 |
Importante note : if you want get/set any localized key, be sure set the flag to 2 (or 3) !
int SCOL_gkeyFileLoadS | ( | mmachine | m | ) |
_gkeyFileLoadS : Loads a key file from any valid data
fun [Chn P S I] ObjKeyFile
Chn | : the channel | |
S | : any valid content | |
S | : the list separator or nil (default ";"). One character only (if more, they are ignored) | |
I | : flag : 0 -> No flags, default behaviour 1 -> Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise all comments will be lost when the key file is written back. 2 -> Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise only the translations for the current language will be written back. 3 -> 1 and 2 |
int SCOL_gkeyFileSave | ( | mmachine | m | ) |
_gkeyFileSave : save a keyfile to a filename
fun [ObjKeyFile W] I
ObjKeyFile | : a valid object | |
W | : a Scol write referenced filename |
int SCOL_gkeyFileDestroy | ( | mmachine | m | ) |
_gkeyFileDestroy : Destroys an object
ObjKeyFile |
int SCOL_gkeyFileGetContent | ( | mmachine | m | ) |
_gkeyFileGetContent : Returns the content of key file
fun [ObjKeyFile] [S I]
ObjKeyFile | : any valid object |
int SCOL_gkeyFileGetDatas | ( | mmachine | m | ) |
_gkeyFileGetDatas : Return a list of the content
fun [ObjKeyFile] [[S [[S S] r1]] r1]
ObjKeyFile | : an object already created |
int SCOL_gkeyFileGetGroups | ( | mmachine | m | ) |
_gkeyFileGetGroups : Returns a list of all groups
fun [ObjKeyFile] [S r1]
ObjKeyFile | : any object already created |
int SCOL_gkeyFileGetNbGroups | ( | mmachine | m | ) |
_gkeyFileGetNbGroups : Returns the number of group
fun [ObjKeyFile] I
ObjKeyFile | : any object already created |
int SCOL_gkeyFileDataExist | ( | mmachine | m | ) |
_gkeyFileDataExist : Looks whether the key file has the datas
fun [ObjKeyFile S S] I
ObjKeyFile | : any object already created | |
S | : a group name or nil | |
S | : a key name or nil |
If the group name and the key name are not nil, this function searches the key into the group. If found, 1 is returned, else 0 If the group name is nil, this function searches the key into all groups. The returned value is the number of this key, 0 if not found. If the key name is nil, this function searches the group into the keyfile. If found, 1 is returned, else 0. If the keyfile is nil or if the group and key names are nil, nil is returned.
int SCOL_keyFileGetValue | ( | mmachine | m | ) |
_keyFileGetValue : Returns the value for any key in any group
fun [ObjKeyFile S S I] S
ObjKeyFile | : any valid object | |
S | : any group name | |
S | : any key name | |
I | : flag : GKF_VALUE_RAW, GKF_VALUE_STRING, GKF_VALUE_INTEGER, GKF_VALUE_INTEGER64, GKF_VALUE_UINTEGER64, GKF_VALUE_DOUBLE, GKF_VALUE_BOOLEAN GKF_VALUE_RAW and GKF_VALUE_STRING have a difference, others always return a string |
int SCOL_keyFileGetLocaleValue | ( | mmachine | m | ) |
_keyFileGetLocaleValue : Returns the locale value for any key in any group
fun [ObjKeyFile S S S] S
ObjKeyFile | : any valid object | |
S | : any group name | |
S | : any key name | |
S | : any locale identifier or nil |
If locale is nil or not found, the value of the default key (without localization) will be returned When the ObjKeyFile has been created, if the flag is at 0 or 1, the current locale can be used only. In this last case, to get a value of an other locale, the flag should have set to 2 or 3.
int SCOL_gkeyFileGetValueList | ( | mmachine | m | ) |
_gkeyFileGetValueList : Returns the values associated with key under group
fun [ObjKeyFile S S] [S r1]
ObjKeyFile | : any valid object | |
S | : any group name | |
S | : any key name |
int SCOL_gkeyFileGetValueLocaleList | ( | mmachine | m | ) |
_gkeyFileGetValueLocaleList : Returns the locales values associated with key under group
fun [ObjKeyFile S S S] [S r1]
ObjKeyFile | : any valid object | |
S | : any group name | |
S | : any key name | |
S | : any locale identifier or nil |
If locale is nil or not found, the values of the default key (without localization) will be returned When the ObjKeyFile has been created, if the flag is at 0 or 1, the current locale can be used only. In this last case, to get the values of an other locale, the flag should have set to 2 or 3.
int SCOL_gkeyFileGetComment | ( | mmachine | m | ) |
_gkeyFileGetComment : Return a comment
fun [ObjKeyFile S S] S
ObjKeyFile | : an object | |
S | : a group name | |
S | : a key name |
Retrieves a comment above key name from group name. If key is NULL then comment will be read from above group name. If both key name and group name are NULL, then comment will be read from above the first group in the file.
int SCOL_gkeyFileSetValue | ( | mmachine | m | ) |
_gkeyFileSetValue : Associates a new value with key under group.
Fun [ObjKeyFile S S S I] ObjKeyFile If key cannot be found then it is created. If group cannot be found then it is created.
ObjKeyFile | : a valid object | |
S | : a group name | |
S | : a key name | |
S | : the new value | |
I | : a flag : GKF_VALUE_RAW or GKF_VALUE_STRING (others flags aren't implemented yet) |
If key or group is nil, the command is ignored but a message is written to the log
int SCOL_gkeyFileSetLocaleValue | ( | mmachine | m | ) |
_gkeyFileSetValue : Associates a new value with key under group.
Fun [ObjKeyFile S S S I] ObjKeyFile If key cannot be found then it is created. If group cannot be found then it is created.
ObjKeyFile | : a valid object | |
S | : a group name | |
S | : a key name | |
S | : the new value | |
S | : a locale identifier |
If key or group is nil, the command is ignored but a message is written to the log
int SCOL_gkeyFileSetValueList | ( | mmachine | m | ) |
_gkeyFileSetValueList : Associates a list of string for key under group.
fun [ObjKeyFile S S [S r1] ObjKeyFile If key cannot be found then it is created. If group cannot be found then it is created.
: | ObjKeyFile : an object | |
: | S : a group | |
: | S : a key | |
[S | r1] : a list of values |
If key or group is nil, the command is ignored but a message is written to the log
int SCOL_gkeyFileSetLocaleValueList | ( | mmachine | m | ) |
_gkeyFileSetValueList : Associates a list of string for key under group.
fun [ObjKeyFile S S S [S r1] ObjKeyFile If key cannot be found then it is created. If group cannot be found then it is created.
: | ObjKeyFile : an object | |
: | S : a group | |
: | S : a key | |
: | S : a locale identifier | |
[S | r1] : a list of values |
If key or group is nil, the command is ignored but a message is written to the log
int SCOL_gkeyFileSetComment | ( | mmachine | m | ) |
_gkeyFileSetComment : Comments a key, a group or the key file.
fun [ObjKeyFile S S S] ObjKeyFile
ObjKeyFile | : an object already created | |
S | : a group | |
S | : a key name | |
S | : a comment |
See _gkeyFileGetComment too
int SCOL_gkeyFileRemGroup | ( | mmachine | m | ) |
_gkeyFileRemGroup : Removes the specified group from the object.
fun [ObjKeyFile S] ObjKeyFile
ObjKeyFile | : an object already created | |
S | : a group |
int SCOL_gkeyFileRemKey | ( | mmachine | m | ) |
_gkeyFileRemKey : Removes the specified key in group from the object.
fun [ObjKeyFile S S] ObjKeyFile
ObjKeyFile | : an object already created | |
S | : a group | |
S | : a key |
int SCOL_gkeyFileRemComment | ( | mmachine | m | ) |
_gkeyFileRemComment : Removes a comment above key from group.
fun [ObjKeyFile S S] ObjKeyFile If key is NULL then comment will be removed above group. If both key and group are NULL, then comment will be removed above the first group in the file.
ObjKeyFile | : an object already created | |
S | : a group | |
S | : a key |