## osinfo_loader osinfo_loader — An database loader |

## Functions

GQuark | osinfo_error_quark ()
OsinfoLoader * | osinfo_loader_new ()
OsinfoDb * | osinfo_loader_get_db ()
void | osinfo_loader_process_path ()
void | osinfo_loader_process_uri ()
void | osinfo_loader_process_default_path ()
void | osinfo_loader_process_system_path ()
void | osinfo_loader_process_local_path ()
void | osinfo_loader_process_user_path ()

## Types and Values

#define | OSINFO_TYPE_LOADER
enum | OsinfoError
#define | OSINFO_ERROR

## Object Hierarchy

        GEnum
        ╰── OsinfoError

## Description

OsinfoLoader provides a way to populate an OsinfoDb from a set of XML documents.

## Functions

### osinfo_error_quark ()

    GQuark
    osinfo_error_quark (void);

Gets a GQuark representing the string "libosinfo"

#### Returns

the GQuark representing the string.

Since: 1.3.0

### osinfo_loader_new ()

    OsinfoLoader *
    osinfo_loader_new (void);

Create a new database loader

#### Returns

a loader object.

[transfer full]

### osinfo_loader_get_db ()

    OsinfoDb *
    osinfo_loader_get_db (OsinfoLoader *loader);

Retrieves the database being populated

#### Parameters

loader | the loader object |

#### Returns

the database.

[transfer none]

### osinfo_loader_process_path ()

    void
    osinfo_loader_process_path (OsinfoLoader *loader,
                                const gchar *path,
                                GError **err);

Loads data from the specified path. If the path points to a file, that will be loaded as XML Otherwise it can point to a directory which will be recursively traversed, loading all files as XML.

#### Parameters

loader | the loader object |
path | the fully qualified path |
err | filled with error information upon failure. | [out]

### osinfo_loader_process_uri ()

    void
    osinfo_loader_process_uri (OsinfoLoader *loader,
                               const gchar *uri,
                               GError **err);

Loads data from the specified URI. If the URI points to a file, that will be loaded as XML Otherwise it can point to a directory which will be recursively traversed, loading all files as XML.

#### Parameters

loader | the loader object |
uri | the data source URI |
err | filled with error information upon failure. | [out]

### osinfo_loader_process_default_path ()

    void
    osinfo_loader_process_default_path (OsinfoLoader *loader,
                                        GError **err);

### osinfo_loader_process_system_path ()

    void
    osinfo_loader_process_system_path (OsinfoLoader *loader,
                                       GError **err);

Loads data from the system path.

#### Parameters

loader | the loader object |
err | filled with error information upon failure. | [out]

Since: 0.2.8

### osinfo_loader_process_local_path ()

    void
    osinfo_loader_process_local_path (OsinfoLoader *loader,
                                      GError **err);

Loads data from the local path.

#### Parameters

loader | the loader object |
err | filled with error information upen failures. | [out]

Since: 0.2.8

### osinfo_loader_process_user_path ()

    void
    osinfo_loader_process_user_path (OsinfoLoader *loader,
                                     GError **err);

Loads data from user path.

#### Parameters

loader | the loader object |
err | filled with error information upen failures. | [out]

Since: 0.2.8

## Types and Values

### OSINFO_TYPE_LOADER

    #define OSINFO_TYPE_LOADER (osinfo_loader_get_type ())

### enum OsinfoError

GError codes used for errors in OSINFO_ERROR domain.

#### Members

OSINFO_ERROR_GENERIC | Generic Osinfo error; |

Since: 1.8.0

### OSINFO_ERROR

    #define OSINFO_ERROR osinfo_error_quark()

Error domain for generic libosinfo errors

## See Also

OsinfoDb