Registry Utility Functions

Name

Registry Utility Functions -- various functions for manipulating the registry of plugins.

Synopsis

#include <tiffep.h> (reg_file.h)


Types

typedef     GList                           Registry;
struct      RegistryEntry;


DLLEXPORTed functions

gint        registry_get_pointer            (GList **registry_pointer);
gint        registry_is_file_exist          (void);
gint        registry_read_file              (void);
gint        registry_write_file             (void);

gint        registry_add_entry              (RegistryEntry *entry);
gint        registry_remove_entry           (gchar         *name);
gint        registry_enable_entry           (RegistryEntry *entry);
gint        registry_disable_entry          (RegistryEntry *entry);
gint        registry_entry_is_enabled       (RegistryEntry *entry);

gint        registry_search_entry_by_name   (gchar *name, 
                                             Registry *main_registry,
                                             Registry *sub_registry);
gint        registry_search_entry_by_type   (gchar *type, 
                                             Registry *main_registry,
                                             Registry *sub_registry);
gint        registry_search_entry_by_calc   (gchar *calc, 
                                             Registry *main_registry,
                                             Registry *sub_registry);
gint        registry_search_entry_by_var    (gchar *var, 
                                             Registry *main_registry,
                                             Registry *sub_registry);

Internal functions

void        destroy_registry_entry          (RegistryEntry *entry);
void        destroy_registry                (void);

Description

This section describes a number of utility functions for loading, writing and managing the plugins registry.

Details

struct Registry

typedef     GList                           Registry;

The Registry struct is simply a GList of RegistryEntry element.


 

struct RegistryEntry

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.


registry_get_pointer()

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.