AppStream.Validator – appstream Reference Manual
Packages
appstream
AppStream
Validator
Validator
add_override
add_release_bytes
add_release_file
check_success
clear_release_data
get_allow_net
get_issue_files_count
get_issues
get_issues_per_file
get_report_yaml
get_strict
get_tag_explanation
get_tag_severity
get_tags
set_allow_net
set_strict
validate_bytes
validate_data
validate_file
validate_tree
Validator
Object Hierarchy:
Description:
[
CCode
( type_id =
"as_validator_get_type ()"
) ]
public
class
Validator
:
Object
Namespace:
AppStream
Package:
appstream
Content:
Creation methods:
public
Validator
()
Creates a new
Validator
.
Methods:
public
bool
add_override
(
string
tag,
IssueSeverity
severity_override)
throws
Error
Override the severity of a selected tag.
public
bool
add_release_bytes
(
string
release_fname,
Bytes
release_metadata)
throws
Error
Add release metadata explicitly from bytes.
public
bool
add_release_file
(
File
release_file)
throws
Error
Add a release metadata file to the validation process.
public
bool
check_success
()
Check the current registered values again and return
true
if no issues were found that would make the previously validated files fail validation.
public
void
clear_release_data
()
Clear all release information that was explicitly added to the validation process.
public
bool
get_allow_net
()
public
uint
get_issue_files_count
()
Get the number of files for which issues have been found.
public
List
<
unowned
ValidatorIssue
>
get_issues
()
Get a list of found metadata format issues.
public
unowned
HashTable
<
string
,
GenericArray
<
ValidatorIssue
>>
get_issues_per_file
()
Get a hash table of filenames mapped to lists of issues.
public
string
get_report_yaml
()
throws
Error
public
bool
get_strict
()
public
unowned
string
get_tag_explanation
(
string
tag)
Get the explanatory text for a given issue tag.
public
IssueSeverity
get_tag_severity
(
string
tag)
Get the severity for a given issue tag.
public
string
[]
get_tags
()
Get an array of all tags known to the validator.
public
void
set_allow_net
(
bool
value)
If set to
true
, the validator will be allowed to connect to the internet to e.
public
void
set_strict
(
bool
is_strict)
Enable or disable strict mode.
public
bool
validate_bytes
(
Bytes
metadata)
Validate AppStream XML data from a byte array.
public
bool
validate_data
(
string
metadata)
Validate AppStream XML data.
public
bool
validate_file
(
File
metadata_file)
Validate an AppStream XML file.
public
bool
validate_tree
(
string
root_dir)
Validate a full directory tree for issues in AppStream metadata.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref