AsValidatorIssue

AsValidatorIssue — Object representing an issue found in AppStream metadata

Functions

Types and Values

Includes

#include <appstream.h>

Description

See also: AsValidator

Functions

as_validator_issue_new ()

AsValidatorIssue *
as_validator_issue_new (void);

Creates a new AsValidatorIssue.

Returns

a AsValidatorIssue.

[transfer full]


as_validator_issue_get_kind ()

AsIssueKind
as_validator_issue_get_kind (AsValidatorIssue *issue);

Gets the issue kind enum, if available.

Parameters

issue

a AsValidatorIssue instance.

 

Returns

a AsIssueKind


as_validator_issue_set_kind ()

void
as_validator_issue_set_kind (AsValidatorIssue *issue,
                             AsIssueKind kind);

Sets the kind enum for this issue, if known.

Parameters

issue

a AsValidatorIssue instance.

 

kind

the AsIssueKind.

 

as_validator_issue_get_importance ()

AsIssueImportance
as_validator_issue_get_importance (AsValidatorIssue *issue);

Gets the importance of this issue.

Parameters

issue

a AsValidatorIssue instance.

 

Returns

a AsIssueImportance


as_validator_issue_set_importance ()

void
as_validator_issue_set_importance (AsValidatorIssue *issue,
                                   AsIssueImportance importance);

Sets the importance for this issue.

Parameters

issue

a AsValidatorIssue instance.

 

importance

the AsIssueImportance.

 

as_validator_issue_get_message ()

const gchar *
as_validator_issue_get_message (AsValidatorIssue *issue);

Gets the message for the issue.

Parameters

issue

a AsValidatorIssue instance.

 

Returns

the message


as_validator_issue_set_message ()

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

Sets a message on the issue.

Parameters

issue

a AsValidatorIssue instance.

 

message

the message text.

 

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 ()

gint
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,
                             gint line);

Sets the importance for this issue.

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]

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 AsIssueImportance

The importance of an issue found by AsValidator

Members

AS_ISSUE_IMPORTANCE_UNKNOWN

   

AS_ISSUE_IMPORTANCE_ERROR

There is a serious error in your metadata

 

AS_ISSUE_IMPORTANCE_WARNING

Something which should be fixed, but is not fatal

 

AS_ISSUE_IMPORTANCE_INFO

Non-essential information on how to improve your metadata

 

AS_ISSUE_IMPORTANCE_PEDANTIC

Pedantic information

 

enum AsIssueKind

The issue type.

Members

AS_ISSUE_KIND_UNKNOWN

Type invalid or not known

 

AS_ISSUE_KIND_MARKUP_INVALID

The XML markup is invalid

 

AS_ISSUE_KIND_LEGACY

An element from a legacy AppStream specification has been found

 

AS_ISSUE_KIND_TAG_DUPLICATED

A tag is duplicated

 

AS_ISSUE_KIND_TAG_MISSING

A required tag is missing

 

AS_ISSUE_KIND_TAG_UNKNOWN

An unknown tag was found

 

AS_ISSUE_KIND_TAG_NOT_ALLOWED

A tag is not allowed in the current context

 

AS_ISSUE_KIND_PROPERTY_MISSING

A required property is missing

 

AS_ISSUE_KIND_PROPERTY_INVALID

A property is invalid

 

AS_ISSUE_KIND_VALUE_MISSING

A value is missing

 

AS_ISSUE_KIND_VALUE_WRONG

The value of a tag or property is wrong

 

AS_ISSUE_KIND_VALUE_ISSUE

There is an issue with a tag or property value (often non-fatal)

 

AS_ISSUE_KIND_FILE_MISSING

A required file or other metadata was missing

 

AS_ISSUE_KIND_WRONG_NAME

The naming of an entity is wrong

 

AS_ISSUE_KIND_READ_ERROR

Reading of data failed

 

AS_ISSUE_KIND_REMOTE_ERROR

Getting additional content from a remote location failed

 

AS_ISSUE_KIND_UNUSUAL

Unusual combination of values and likely not intended

 

AsValidatorIssue

typedef struct _AsValidatorIssue AsValidatorIssue;