TiFFEP Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
typedef GList Registry; |
The Registry struct is simply a GList of RegistryEntry element.
struct RegistryEntry { GString *name; GString *description; GString *path; GString *type; GString *calc; GString *var; GString *status; }; |
The RegistryEntry struct is a data structure representing a registry entry. See the registry file format for more informations.
gint registry_get_pointer (GList **registry_pointer); |
Returns a pointer on the registry. The registry file is loaded. You do not have to free this pointer when unused. This is handled automagically.
registry_pointer : | the address of a GList pointer. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_is_file_exist (void); |
Test if the registry file exists. Returns 1 if it exists, 0 otherwise.
Returns : | 1 if file exists, 0 otherwise. |
gint registry_read_file (void); |
Scan the registry file, retrieve all entries and store them in a linked list, the Registry.
Returns : | 0 if successful, an error code otherwise. |
gint registry_write_file (void); |
Write the whole content of the Registry linked list into the registry file.
Returns : | 0 if successful, an error code otherwise. |
gint registry_add_entry (RegistryEntry *entry); |
Add an entry to the registry.
entry : | the entry to add into the registry. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_remove_entry (gchar *name); |
Remove a registry entry from the registry.
name : | the name of a plugin. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_enable_entry (RegistryEntry *entry); |
Enable the plugin associated with the entry.
entry : | the entry to enable. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_disable_entry (RegistryEntry *entry); |
Disable the plugin associated with the entry.
entry : | the entry to disable. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_entry_is_enabled (RegistryEntry *entry); |
Check whether the entry is enabled or disabled.
entry : | the entry to test. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_search_entry_by_name (gchar *name, Registry *main_registry, Registry *sub_registry); |
Search an entry in the registry. Use the name of the plugin to find an entry in the main_registry and returns the found entries into the sub_registry linked list.
name : | the name of the plugin. |
main_registry :
|
the registry in which the plugin is searched. |
sub_registry :
|
a linked list which contains the found entries. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_search_entry_by_type (gchar *type, Registry *main_registry, Registry *sub_registry); |
type : | the type of the plugin. |
main_registry :
|
the registry in which the plugin is searched. |
sub_registry :
|
a linked list which contains the found entries. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_search_entry_by_calc (gchar *calc, Registry *main_registry, Registry *sub_registry); |
calc : | the calculator type of the plugin. |
main_registry :
|
the registry in which the plugin is searched. |
sub_registry :
|
a linked list which contains the found entries. |
Returns : | 0 if successful, an error code otherwise. |
gint registry_search_entry_by_var (gchar *var, Registry *main_registry, Registry *sub_registry); |
var : | the var type of the plugin. |
main_registry :
|
the registry in which the plugin is searched. |
sub_registry :
|
a linked list which contains the found entries. |
Returns : | 0 if successful, an error code otherwise. |
void destroy_registry_entry (RegistryEntry *entry); |
Destroy a registry entry by its pointer.
entry : | a pointer on a registry entry. |
Returns : | nothing. |
void destroy_registry (void); |
Destroy and free the entire registry.
Returns : | nothing. |
<<< Previous Page | Home | Up | Next Page >>> |
TiFFEP Utilities | Date and Time Functions |