## GdictSourceLoader GdictSourceLoader — |

## Synopsis

                GdictSourceLoaderPrivate;
                GdictSourceLoader;
    GdictSourceLoader* gdict_source_loader_new  (void);
    void        gdict_source_loader_update      (GdictSourceLoader *loader);
    void        gdict_source_loader_add_search_path
                                                (GdictSourceLoader *loader,
                                                 const gchar *path);
    const GSList* gdict_source_loader_get_paths (GdictSourceLoader *loader);
    gchar**     gdict_source_loader_get_names   (GdictSourceLoader *loader,
                                                 gsize *length);
    const GSList* gdict_source_loader_get_sources
                                                (GdictSourceLoader *loader);
    GdictSource* gdict_source_loader_get_source (GdictSourceLoader *loader,
                                                 const gchar *name);
    gboolean    gdict_source_loader_remove_source
                                                (GdictSourceLoader *loader,
                                                 const gchar *name);

## Description

## Details

### GdictSourceLoaderPrivate

    typedef struct _GdictSourceLoaderPrivate GdictSourceLoaderPrivate;

### GdictSourceLoader

    typedef struct {
    } GdictSourceLoader;

### gdict_source_loader_new ()

    GdictSourceLoader* gdict_source_loader_new  (void);

Creates a new GdictSourceLoader object. This object is used to search into a list of paths for dictionary source files. See GdictSource for more informations about the format of dictionary source files.

Returns : | a new GdictSourceLoader object

Since 1.0

### gdict_source_loader_update ()

    void        gdict_source_loader_update      (GdictSourceLoader *loader);

Queue an update of the sources inside `loader`.

`loader` : | a GdictSourceLoader

Since 1.0

### gdict_source_loader_add_search_path ()

    void        gdict_source_loader_add_search_path
                                                (GdictSourceLoader *loader,
                                                 const gchar *path);

Adds `path` to the search paths list of `loader`.

`loader` : | a GdictSourceLoader
`path` : | a path to be added to the search path list

Since 1.0

### gdict_source_loader_get_paths ()

    const GSList* gdict_source_loader_get_paths (GdictSourceLoader *loader);

Gets the list of paths used by `loader` to search for dictionary source files.

`loader` : | a GdictSourceLoader
Returns : | a list containing the paths. The returned list is owned by the GdictSourceLoader object and should never be free or modified.

Since 1.0

### gdict_source_loader_get_names ()

    gchar**     gdict_source_loader_get_names   (GdictSourceLoader *loader,
                                                 gsize *length);

Retrieves the list of dictionary source names available into the search paths of `loader`.

`loader` : | a GdictSourceLoader
`length` : | return location for the number of source names, or `NULL`
Returns : | a newly allocated, `NULL` terminated array of strings. You should free the returned string array with `g_strfreev()`

Since 1.0

### gdict_source_loader_get_sources ()

    const GSList* gdict_source_loader_get_sources
                                                (GdictSourceLoader *loader);

Retrieves the list of dictionary sources available into the search paths of `loader`, in form of GdictSource objects.

`loader` : | a GdictSourceLoader
Returns : | a list of GdictSource objects. The returned list is owned by the GdictSourceLoader object, and should never be freed or modified.

Since 1.0

### gdict_source_loader_get_source ()

    GdictSource* gdict_source_loader_get_source (GdictSourceLoader *loader,
                                                 const gchar *name);

Retrieves a dictionary source using `name`. You can use the returned GdictSource object to create the right GdictContext for that dictionary source.

`loader` : | a GdictSourceLoader
`name` : | a name of a dictionary source
Returns : | a referenced GdictSource object. You should de-reference it using `g_object_unref()` when you finished using it.

Since 1.0

### gdict_source_loader_remove_source ()

    gboolean    gdict_source_loader_remove_source
                                                (GdictSourceLoader *loader,
                                                 const gchar *name);

Removes the dictionary source `name` from `loader`. This function will also remove the dictionary source definition file bound to it.

`loader` : | a GdictSourceLoader
`name` : | name of a dictionary source
Returns : | `TRUE` if the dictionary source was successfully removed

Since 1.0