| libeasyfc Documentation | ||||
|---|---|---|---|---|
| Top | Description | ||||
gboolean ezfc_config_add_alias (ezfc_config_t *config,const gchar *language,ezfc_alias_t *alias); void ezfc_config_dump (ezfc_config_t *config); const GList * ezfc_config_get_aliases (ezfc_config_t *config,const gchar *language); GList * ezfc_config_get_language_list (ezfc_config_t *config); const gchar * ezfc_config_get_name (ezfc_config_t *config); gint ezfc_config_get_priority (ezfc_config_t *config); gboolean ezfc_config_load (ezfc_config_t *config,GError **error); ezfc_config_t * ezfc_config_new (void); ezfc_config_t * ezfc_config_ref (ezfc_config_t *config); gboolean ezfc_config_remove_alias (ezfc_config_t *config,const gchar *language,const gchar *alias_name); gboolean ezfc_config_remove_aliases (ezfc_config_t *config,const gchar *language); gboolean ezfc_config_save (ezfc_config_t *config,GError **error); GString * ezfc_config_save_to_buffer (ezfc_config_t *config,GError **error); void ezfc_config_set_name (ezfc_config_t *config,const gchar *name); void ezfc_config_set_priority (ezfc_config_t *config,guint priority); ezfc_config_t; void ezfc_config_unref (ezfc_config_t *config);
This class provides an easy access to assign an instance of ezfc_alias_t to a language and to read/write the configuration file.
gboolean ezfc_config_add_alias (ezfc_config_t *config,const gchar *language,ezfc_alias_t *alias);
Add a alias font for language language. if giving NULL to language,
alias takes effect for any languages.
|
a ezfc_config_t. |
|
a language name to add alias for or NULL for global settings. [allow-none]
|
|
a ezfc_alias_t. |
Returns : |
TRUE if it's successfully completed, otherwise FALSE. |
void ezfc_config_dump (ezfc_config_t *config);
Output the object data to the standard output.
|
a ezfc_config_t. |
const GList * ezfc_config_get_aliases (ezfc_config_t *config,const gchar *language);
Obtains the list of ezfc_alias_t in ezfc_config_t instance.
|
a ezfc_config_t. |
|
a language name referenced to the alias. [allow-none] |
Returns : |
a GList contains ezfc_alias_t or NULL. [element-type ezfc_alias_t][transfer none]
|
GList * ezfc_config_get_language_list (ezfc_config_t *config);
Obtains the list of languages registered by ezfc_config_add_alias() in config.
|
a ezfc_config_t. |
Returns : |
a GList contains languages or NULL. [element-type utf8][transfer none]
|
const gchar * ezfc_config_get_name (ezfc_config_t *config);
Obtains the configuration name that is set by ezfc_config_set_name().
|
a ezfc_config_t. |
Returns : |
the configuration name. |
gint ezfc_config_get_priority (ezfc_config_t *config);
Obtains the priority number in config.
|
a ezfc_config_t. |
Returns : |
the priority number. if any errors happens, returns -1. |
gboolean ezfc_config_load (ezfc_config_t *config,GError **error);
Read the configuration file and rebuild the object.
You have to invoke ezfc_config_set_priority() and ezfc_config_set_name()
first to read the appropriate configuration file.
|
a ezfc_config_t. |
|
a GError. [allow-none] |
Returns : |
TRUE if it's successfully completed, otherwise FALSE. |
ezfc_config_t * ezfc_config_new (void);
Create a new instance of a ezfc_config_t.
Returns : |
a new instance of ezfc_config_t. [transfer full] |
ezfc_config_t * ezfc_config_ref (ezfc_config_t *config);
Increases the refernce count of config.
|
a ezfc_config_t. |
Returns : |
the same config object. [transfer none]
|
gboolean ezfc_config_remove_alias (ezfc_config_t *config,const gchar *language,const gchar *alias_name);
Removes alias_name assigned for language language from config.
|
a ezfc_config_t. |
|
a language name to remove alias_name from. [allow-none]
|
|
a alias font name to remove. |
Returns : |
TRUE if it's successfully removed, otherwise FALSE. |
gboolean ezfc_config_remove_aliases (ezfc_config_t *config,const gchar *language);
Removes all of aliases assigned for language language from config.
|
a ezfc_config_t. |
|
a language name to remove alias_name from. [allow-none]
|
Returns : |
TRUE if it's successfully removed, otherwise FALSE. |
gboolean ezfc_config_save (ezfc_config_t *config,GError **error);
Write the data to the configuration file. you may want to invoke
ezfc_config_set_priority() and ezfc_config_set_name() first to
write it to the appropriate configuration file.
|
a ezfc_config_t. |
|
a GError. [allow-none] |
Returns : |
TRUE if it's successfully completed, otherwise FALSE. |
GString * ezfc_config_save_to_buffer (ezfc_config_t *config,GError **error);
Write the data to the buffer.
|
a ezfc_config_t. |
|
a GError. [allow-none] |
Returns : |
a GString containing a xml data. NULL if fails. |
void ezfc_config_set_name (ezfc_config_t *config,const gchar *name);
Set name as the additional configuration name. this is an optional to
make the change in the filename for output.
|
a ezfc_config_t. |
|
additional configuration name. [allow-none] |
void ezfc_config_set_priority (ezfc_config_t *config,guint priority);
Set priority to config instance.
|
a ezfc_config_t. |
|
a priority number that is used for a filename. it has to be within 3 digits. so the maximum value is 999. |
typedef struct _ezfc_config_t ezfc_config_t;
All the fields in the ezfc_config_t structure are private to the ezfc_config_t implementation.
void ezfc_config_unref (ezfc_config_t *config);
Decreases the reference count of config. when its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
|
a ezfc_config_t. |