## AsValidatorIssue

AsValidatorIssue — Object representing an issue found in AppStream metadata

## Functions

AsIssueSeverity | as_issue_severity_from_string ()
const gchar * | as_issue_severity_to_string ()
AsValidatorIssue * | as_validator_issue_new ()
const gchar * | as_validator_issue_get_tag ()
void | as_validator_issue_set_tag ()
AsIssueSeverity | as_validator_issue_get_severity ()
void | as_validator_issue_set_severity ()
const gchar * | as_validator_issue_get_hint ()
void | as_validator_issue_set_hint ()
const gchar * | as_validator_issue_get_explanation ()
void | as_validator_issue_set_explanation ()
const gchar * | as_validator_issue_get_cid ()
void | as_validator_issue_set_cid ()
const gchar * | as_validator_issue_get_filename ()
void | as_validator_issue_set_filename ()
glong | as_validator_issue_get_line ()
void | as_validator_issue_set_line ()
gchar * | as_validator_issue_get_location ()
AsIssueSeverity | as_validator_issue_get_importance ()
void | as_validator_issue_set_importance ()
const gchar * | as_validator_issue_get_message ()
void | as_validator_issue_set_message ()

## Types and Values

#define | AS_TYPE_VALIDATOR_ISSUE
struct | AsValidatorIssueClass
enum | AsIssueSeverity
#define | AsIssueImportance
#define | AS_ISSUE_IMPORTANCE_UNKNOWN
#define | AS_ISSUE_IMPORTANCE_ERROR
#define | AS_ISSUE_IMPORTANCE_WARNING
#define | AS_ISSUE_IMPORTANCE_INFO
#define | AS_ISSUE_IMPORTANCE_PEDANTIC
| AsValidatorIssue

## Includes

    #include <appstream.h>

## Description

See also: AsValidator

## Functions

### as_issue_severity_from_string ()

    AsIssueSeverity
    as_issue_severity_from_string (const gchar *str);

Converts the text representation to an enumerated value.

#### Parameters

str | the string. |

#### Returns

a AsIssueSeverity, or `AS_ISSUE_SEVERITY_UNKNOWN` for unknown.

### as_issue_severity_to_string ()

    const gchar *
    as_issue_severity_to_string (AsIssueSeverity severity);

Converts the enumerated value to an text representation.

#### Parameters

severity | the AsIssueSeverity. |

#### Returns

string version of `severity`

### as_validator_issue_new ()

    AsValidatorIssue *
    as_validator_issue_new (void);

Creates a new AsValidatorIssue.

#### Returns

a AsValidatorIssue.

[transfer full]

### as_validator_issue_get_tag ()

    const gchar *
    as_validator_issue_get_tag (AsValidatorIssue *issue);

Gets the issue tag string for this issue.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the tag

Since: 0.12.8

### as_validator_issue_set_tag ()

    void
    as_validator_issue_set_tag (AsValidatorIssue *issue,
                                const gchar *tag);

Sets the issue tag.

#### Parameters

issue | a AsValidatorIssue instance. |
tag | the tag. |

Since: 0.12.8

### as_validator_issue_get_severity ()

    AsIssueSeverity
    as_validator_issue_get_severity (AsValidatorIssue *issue);

Gets the severity of this issue.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

a AsIssueSeverity

### as_validator_issue_set_severity ()

    void
    as_validator_issue_set_severity (AsValidatorIssue *issue,
                                     AsIssueSeverity severity);

Sets the severity for this issue.

#### Parameters

issue | a AsValidatorIssue instance. |
severity | the AsIssueSeverity. |

### as_validator_issue_get_hint ()

    const gchar *
    as_validator_issue_get_hint (AsValidatorIssue *issue);

Get a short context hint for this issue.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the hint

Since: 0.12.8

### as_validator_issue_set_hint ()

    void
    as_validator_issue_set_hint (AsValidatorIssue *issue,
                                 const gchar *hint);

Sets short issue hint.

#### Parameters

issue | a AsValidatorIssue instance. |
hint | the hint. |

Since: 0.12.8

### as_validator_issue_get_explanation ()

    const gchar *
    as_validator_issue_get_explanation (AsValidatorIssue *issue);

Get an extended explanation on this issue, or return `NULL` if none is available.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the explanation

Since: 0.12.8

### as_validator_issue_set_explanation ()

    void
    as_validator_issue_set_explanation (AsValidatorIssue *issue,
                                        const gchar *explanation);

Set explanatory text for this issue.

#### Parameters

issue | a AsValidatorIssue instance. |
explanation | the explanation. |

Since: 0.12.8

### as_validator_issue_get_cid ()

    const gchar *
    as_validator_issue_get_cid (AsValidatorIssue *issue);

The component-id this issue is about.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

a component-id.

### as_validator_issue_set_cid ()

    void
    as_validator_issue_set_cid (AsValidatorIssue *issue,
                                const gchar *cid);

Sets the component-id this issue is about.

#### Parameters

issue | a AsValidatorIssue instance. |
cid | a component-id. |

### as_validator_issue_get_filename ()

    const gchar *
    as_validator_issue_get_filename (AsValidatorIssue *issue);

The name of the file this issue was found in.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the filename

### as_validator_issue_set_filename ()

    void
    as_validator_issue_set_filename (AsValidatorIssue *issue,
                                     const gchar *fname);

Sets the name of the file the issue was found in.

#### Parameters

issue | a AsValidatorIssue instance. |
fname | the filename. |

### as_validator_issue_get_line ()

    glong
    as_validator_issue_get_line (AsValidatorIssue *issue);

Gets the line number where this issue was found.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the line number where this issue occured, or -1 if unknown.

### as_validator_issue_set_line ()

    void
    as_validator_issue_set_line (AsValidatorIssue *issue,
                                 glong line);

Sets the line number where this issue was found.

#### Parameters

issue | a AsValidatorIssue instance. |
line | the line number. |

### as_validator_issue_get_location ()

    gchar *
    as_validator_issue_get_location (AsValidatorIssue *issue);

Builds a string containing all information about the location where this issue occured that we know about.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the location hint as string.

[transfer full]

### as_validator_issue_get_importance ()

    AsIssueSeverity
    as_validator_issue_get_importance (AsValidatorIssue *issue);

`as_validator_issue_get_importance` is deprecated and should not be used in newly-written code.

This function is deprecated and should not be used in new code.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

a AsIssueSeverity

### as_validator_issue_set_importance ()

    void
    as_validator_issue_set_importance (AsValidatorIssue *issue,
                                       AsIssueSeverity importance);

`as_validator_issue_set_importance` is deprecated and should not be used in newly-written code.

This function is deprecated and should not be used in new code.

#### Parameters

issue | a AsValidatorIssue instance. |
importance | the AsIssueSeverity. |

### as_validator_issue_get_message ()

    const gchar *
    as_validator_issue_get_message (AsValidatorIssue *issue);

`as_validator_issue_get_message` is deprecated and should not be used in newly-written code.

This function is deprecated.

#### Parameters

issue | a AsValidatorIssue instance. |

#### Returns

the message

### as_validator_issue_set_message ()

    void
    as_validator_issue_set_message (AsValidatorIssue *issue,
                                    const gchar *message);

`as_validator_issue_set_message` is deprecated and should not be used in newly-written code.

This function is deprecated.

#### Parameters

issue | a AsValidatorIssue instance. |
message | the message text. |

## Types and Values

### AS_TYPE_VALIDATOR_ISSUE

    #define AS_TYPE_VALIDATOR_ISSUE (as_validator_issue_get_type ())

### struct AsValidatorIssueClass

    struct AsValidatorIssueClass {
    	GObjectClass		parent_class;
    };

### enum AsIssueSeverity

The severity of an issue found by AsValidator

#### Members

AS_ISSUE_SEVERITY_UNKNOWN |  |
AS_ISSUE_SEVERITY_ERROR | There is a serious, fatal error in your metadata |
AS_ISSUE_SEVERITY_WARNING | Something metadata issue which should be fixed as soon as possible. |
AS_ISSUE_SEVERITY_INFO | Non-essential information on how to improve metadata, no immediate action needed. |
AS_ISSUE_SEVERITY_PEDANTIC | Pedantic information about ways to improve the data, but could also be ignored. |

### AsIssueImportance

    #define AsIssueImportance G_DEPRECATED AsIssueSeverity

### AS_ISSUE_IMPORTANCE_UNKNOWN

    #define AS_ISSUE_IMPORTANCE_UNKNOWN AS_ISSUE_SEVERITY_UNKNOWN

### AS_ISSUE_IMPORTANCE_ERROR

    #define AS_ISSUE_IMPORTANCE_ERROR AS_ISSUE_SEVERITY_ERROR

### AS_ISSUE_IMPORTANCE_WARNING

    #define AS_ISSUE_IMPORTANCE_WARNING AS_ISSUE_SEVERITY_WARNING

### AS_ISSUE_IMPORTANCE_INFO

    #define AS_ISSUE_IMPORTANCE_INFO AS_ISSUE_SEVERITY_INFO

### AS_ISSUE_IMPORTANCE_PEDANTIC

    #define AS_ISSUE_IMPORTANCE_PEDANTIC AS_ISSUE_SEVERITY_PEDANTIC

### AsValidatorIssue

    typedef struct _AsValidatorIssue AsValidatorIssue;