AsValidator 3 APPSTREAM Library
AsValidator Validator and report-generator about AppStream XML metadata

## Functions

AsValidator * | as_validator_new ()
void | as_validator_clear_issues ()
gboolean | as_validator_validate_file ()
gboolean | as_validator_validate_data ()
gboolean | as_validator_validate_tree ()
GList * | as_validator_get_issues ()

## Types and Values

#define | AS_TYPE_VALIDATOR
struct | AsValidatorClass
| AsValidator

## Object Hierarchy

        GObject
        ╰── AsValidator

## Includes

    #include <appstream.h>

## Description

This object is able to validate AppStream XML metadata (distro and upstream) and to generate a report about issues found with it.

See also: AsMetadata

## Functions

### as_validator_new ()

    AsValidator *
    as_validator_new (void);

Creates a new AsValidator.

#### Returns

an AsValidator.

[transfer full]

as_validator_new

### as_validator_clear_issues ()

    void
    as_validator_clear_issues (AsValidator *validator);

Clears the list of issues

#### Parameters

validator | An instance of AsValidator. |

as_validator_clear_issues

### as_validator_validate_file ()

    gboolean
    as_validator_validate_file (AsValidator *validator,
                                GFile *metadata_file);

Validate an AppStream XML file

#### Parameters

validator | An instance of AsValidator. |
metadata_file | An AppStream XML file. |

as_validator_validate_file

### as_validator_validate_data ()

    gboolean
    as_validator_validate_data (AsValidator *validator,
                                const gchar *metadata);

Validate AppStream XML data

#### Parameters

validator | An instance of AsValidator. |
metadata | XML metadata. |

as_validator_validate_data

### as_validator_validate_tree ()

    gboolean
    as_validator_validate_tree (AsValidator *validator,
                                const gchar *root_dir);

Validate a full directory tree for issues in AppStream metadata.

#### Parameters

validator | An instance of AsValidator. |
root_dir | The root directory of the filesystem tree that should be validated. |

as_validator_validate_tree

### as_validator_get_issues ()

    GList *
    as_validator_get_issues (AsValidator *validator);

Get a list of found metadata format issues.

#### Parameters

validator | An instance of AsValidator. |

#### Returns

a list of AsValidatorIssue instances, free with `g_list_free()`.

[element-type AsValidatorIssue][transfer container]

as_validator_get_issues

## Types and Values

### AS_TYPE_VALIDATOR

    #define AS_TYPE_VALIDATOR (as_validator_get_type ())

AS_TYPE_VALIDATOR

### struct AsValidatorClass

    struct AsValidatorClass {
    	GObjectClass		parent_class;
    };

AsValidatorClass

### AsValidator

    typedef struct _AsValidator AsValidator;

AsValidator