// This file was generated by gir (https://github.com/gtk-rs/gir @ 11e59a0) // from gir-files (https://github.com/gtk-rs/gir-files @ cae49a8+) // DO NOT EDIT extern crate appstream_glib_sys; extern crate shell_words; extern crate tempdir; use std::env; use std::error::Error; use std::path::Path; use std::mem::{align_of, size_of}; use std::process::Command; use std::str; use appstream_glib_sys::*; static PACKAGES: &[&str] = &["appstream-glib"]; #[derive(Clone, Debug)] struct Compiler { pub args: Vec, } impl Compiler { pub fn new() -> Result> { let mut args = get_var("CC", "cc")?; args.push("-Wno-deprecated-declarations".to_owned()); // For %z support in printf when using MinGW. args.push("-D__USE_MINGW_ANSI_STDIO".to_owned()); args.extend(get_var("CFLAGS", "")?); args.extend(get_var("CPPFLAGS", "")?); args.extend(pkg_config_cflags(PACKAGES)?); Ok(Compiler { args }) } pub fn define<'a, V: Into>>(&mut self, var: &str, val: V) { let arg = match val.into() { None => format!("-D{}", var), Some(val) => format!("-D{}={}", var, val), }; self.args.push(arg); } pub fn compile(&self, src: &Path, out: &Path) -> Result<(), Box> { let mut cmd = self.to_command(); cmd.arg(src); cmd.arg("-o"); cmd.arg(out); let status = cmd.spawn()?.wait()?; if !status.success() { return Err(format!("compilation command {:?} failed, {}", &cmd, status).into()); } Ok(()) } fn to_command(&self) -> Command { let mut cmd = Command::new(&self.args[0]); cmd.args(&self.args[1..]); cmd } } fn get_var(name: &str, default: &str) -> Result, Box> { match env::var(name) { Ok(value) => Ok(shell_words::split(&value)?), Err(env::VarError::NotPresent) => Ok(shell_words::split(default)?), Err(err) => Err(format!("{} {}", name, err).into()), } } fn pkg_config_cflags(packages: &[&str]) -> Result, Box> { if packages.is_empty() { return Ok(Vec::new()); } let mut cmd = Command::new("pkg-config"); cmd.arg("--cflags"); cmd.args(packages); let out = cmd.output()?; if !out.status.success() { return Err(format!("command {:?} returned {}", &cmd, out.status).into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) } #[derive(Copy, Clone, Debug, Eq, PartialEq)] struct Layout { size: usize, alignment: usize, } #[derive(Copy, Clone, Debug, Default, Eq, PartialEq)] struct Results { /// Number of successfully completed tests. passed: usize, /// Total number of failed tests (including those that failed to compile). failed: usize, /// Number of tests that failed to compile. failed_to_compile: usize, } impl Results { fn record_passed(&mut self) { self.passed += 1; } fn record_failed(&mut self) { self.failed += 1; } fn record_failed_to_compile(&mut self) { self.failed += 1; self.failed_to_compile += 1; } fn summary(&self) -> String { format!( "{} passed; {} failed (compilation errors: {})", self.passed, self.failed, self.failed_to_compile) } fn expect_total_success(&self) { if self.failed == 0 { println!("OK: {}", self.summary()); } else { panic!("FAILED: {}", self.summary()); }; } } #[test] fn cross_validate_constants_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); assert_eq!("1", get_c_value(tmpdir.path(), &cc, "1").expect("C constant"), "failed to obtain correct constant value for 1"); let mut results : Results = Default::default(); for (i, &(name, rust_value)) in RUST_CONSTANTS.iter().enumerate() { match get_c_value(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); }, Ok(ref c_value) => { if rust_value == c_value { results.record_passed(); } else { results.record_failed(); eprintln!("Constant value mismatch for {}\nRust: {:?}\nC: {:?}", name, rust_value, c_value); } } }; if (i + 1) % 25 == 0 { println!("constants ... {}", results.summary()); } } results.expect_total_success(); } #[test] fn cross_validate_layout_with_c() { let tmpdir = tempdir::TempDir::new("abi").expect("temporary directory"); let cc = Compiler::new().expect("configured compiler"); assert_eq!(Layout {size: 1, alignment: 1}, get_c_layout(tmpdir.path(), &cc, "char").expect("C layout"), "failed to obtain correct layout for char type"); let mut results : Results = Default::default(); for (i, &(name, rust_layout)) in RUST_LAYOUTS.iter().enumerate() { match get_c_layout(tmpdir.path(), &cc, name) { Err(e) => { results.record_failed_to_compile(); eprintln!("{}", e); }, Ok(c_layout) => { if rust_layout == c_layout { results.record_passed(); } else { results.record_failed(); eprintln!("Layout mismatch for {}\nRust: {:?}\nC: {:?}", name, rust_layout, &c_layout); } } }; if (i + 1) % 25 == 0 { println!("layout ... {}", results.summary()); } } results.expect_total_success(); } fn get_c_layout(dir: &Path, cc: &Compiler, name: &str) -> Result> { let exe = dir.join("layout"); let mut cc = cc.clone(); cc.define("ABI_TYPE_NAME", name); cc.compile(Path::new("tests/layout.c"), &exe)?; let mut abi_cmd = Command::new(exe); let output = abi_cmd.output()?; if !output.status.success() { return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); } let stdout = str::from_utf8(&output.stdout)?; let mut words = stdout.trim().split_whitespace(); let size = words.next().unwrap().parse().unwrap(); let alignment = words.next().unwrap().parse().unwrap(); Ok(Layout {size, alignment}) } fn get_c_value(dir: &Path, cc: &Compiler, name: &str) -> Result> { let exe = dir.join("constant"); let mut cc = cc.clone(); cc.define("ABI_CONSTANT_NAME", name); cc.compile(Path::new("tests/constant.c"), &exe)?; let mut abi_cmd = Command::new(exe); let output = abi_cmd.output()?; if !output.status.success() { return Err(format!("command {:?} failed, {:?}", &abi_cmd, &output).into()); } let output = str::from_utf8(&output.stdout)?.trim(); if !output.starts_with("###gir test###") || !output.ends_with("###gir test###") { return Err(format!("command {:?} return invalid output, {:?}", &abi_cmd, &output).into()); } Ok(String::from(&output[14..(output.len() - 14)])) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ ("AsAgreement", Layout {size: size_of::(), alignment: align_of::()}), ("AsAgreementClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsAgreementKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsAgreementSection", Layout {size: size_of::(), alignment: align_of::()}), ("AsAgreementSectionClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsApp", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppError", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppMergeKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppParseFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppQuirk", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppScope", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppSearchMatch", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppSourceKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppState", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppSubsumeFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppTrustFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsAppValidateFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsBundle", Layout {size: size_of::(), alignment: align_of::()}), ("AsBundleClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsBundleKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsChecksum", Layout {size: size_of::(), alignment: align_of::()}), ("AsChecksumClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsChecksumTarget", Layout {size: size_of::(), alignment: align_of::()}), ("AsContentRating", Layout {size: size_of::(), alignment: align_of::()}), ("AsContentRatingClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsContentRatingValue", Layout {size: size_of::(), alignment: align_of::()}), ("AsFormat", Layout {size: size_of::(), alignment: align_of::()}), ("AsFormatClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsFormatKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsIcon", Layout {size: size_of::(), alignment: align_of::()}), ("AsIconClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsIconError", Layout {size: size_of::(), alignment: align_of::()}), ("AsIconKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsIconLoadFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsIdKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsImage", Layout {size: size_of::(), alignment: align_of::()}), ("AsImageAlphaFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsImageClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsImageKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsImageLoadFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsImageSaveFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsInfError", Layout {size: size_of::(), alignment: align_of::()}), ("AsInfLoadFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsKudoKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsLaunchable", Layout {size: size_of::(), alignment: align_of::()}), ("AsLaunchableClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsLaunchableKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsMarkupConvertFlag", Layout {size: size_of::(), alignment: align_of::()}), ("AsMarkupConvertFormat", Layout {size: size_of::(), alignment: align_of::()}), ("AsNode", Layout {size: size_of::(), alignment: align_of::()}), ("AsNodeError", Layout {size: size_of::(), alignment: align_of::()}), ("AsNodeFromXmlFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsNodeInsertFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsNodeToXmlFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsProblem", Layout {size: size_of::(), alignment: align_of::()}), ("AsProblemClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsProblemKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsProvide", Layout {size: size_of::(), alignment: align_of::()}), ("AsProvideClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsProvideKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsRelease", Layout {size: size_of::(), alignment: align_of::()}), ("AsReleaseClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsReleaseKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsReleaseState", Layout {size: size_of::(), alignment: align_of::()}), ("AsRequire", Layout {size: size_of::(), alignment: align_of::()}), ("AsRequireClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsRequireCompare", Layout {size: size_of::(), alignment: align_of::()}), ("AsRequireKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsReview", Layout {size: size_of::(), alignment: align_of::()}), ("AsReviewClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsReviewFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsScreenshot", Layout {size: size_of::(), alignment: align_of::()}), ("AsScreenshotClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsScreenshotKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsSizeKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsStore", Layout {size: size_of::(), alignment: align_of::()}), ("AsStoreAddFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsStoreClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsStoreError", Layout {size: size_of::(), alignment: align_of::()}), ("AsStoreLoadFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsStoreSearchFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsStoreWatchFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsSuggest", Layout {size: size_of::(), alignment: align_of::()}), ("AsSuggestClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsSuggestKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsTag", Layout {size: size_of::(), alignment: align_of::()}), ("AsTagFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsTranslation", Layout {size: size_of::(), alignment: align_of::()}), ("AsTranslationClass", Layout {size: size_of::(), alignment: align_of::()}), ("AsTranslationKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsUniqueIdMatchFlags", Layout {size: size_of::(), alignment: align_of::()}), ("AsUrgencyKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsUrlKind", Layout {size: size_of::(), alignment: align_of::()}), ("AsUtilsError", Layout {size: size_of::(), alignment: align_of::()}), ("AsUtilsFindIconFlag", Layout {size: size_of::(), alignment: align_of::()}), ("AsUtilsLocation", Layout {size: size_of::(), alignment: align_of::()}), ("AsVersionCompareFlag", Layout {size: size_of::(), alignment: align_of::()}), ("AsVersionParseFlag", Layout {size: size_of::(), alignment: align_of::()}), ]; const RUST_CONSTANTS: &[(&str, &str)] = &[ ("(gint) AS_AGREEMENT_KIND_EULA", "2"), ("(gint) AS_AGREEMENT_KIND_GENERIC", "1"), ("(gint) AS_AGREEMENT_KIND_PRIVACY", "3"), ("(gint) AS_AGREEMENT_KIND_UNKNOWN", "0"), ("(gint) AS_APP_ERROR_FAILED", "0"), ("(gint) AS_APP_ERROR_INVALID_TYPE", "1"), ("(gint) AS_APP_KIND_ADDON", "7"), ("(gint) AS_APP_KIND_CODEC", "3"), ("(gint) AS_APP_KIND_CONSOLE", "15"), ("(gint) AS_APP_KIND_DESKTOP", "1"), ("(gint) AS_APP_KIND_DRIVER", "16"), ("(gint) AS_APP_KIND_FIRMWARE", "8"), ("(gint) AS_APP_KIND_FONT", "2"), ("(gint) AS_APP_KIND_GENERIC", "10"), ("(gint) AS_APP_KIND_INPUT_METHOD", "4"), ("(gint) AS_APP_KIND_LOCALIZATION", "14"), ("(gint) AS_APP_KIND_OS_UPDATE", "11"), ("(gint) AS_APP_KIND_OS_UPGRADE", "12"), ("(gint) AS_APP_KIND_RUNTIME", "9"), ("(gint) AS_APP_KIND_SHELL_EXTENSION", "13"), ("(gint) AS_APP_KIND_SOURCE", "6"), ("(gint) AS_APP_KIND_UNKNOWN", "0"), ("(gint) AS_APP_KIND_WEB_APP", "5"), ("(gint) AS_APP_MERGE_KIND_APPEND", "3"), ("(gint) AS_APP_MERGE_KIND_NONE", "1"), ("(gint) AS_APP_MERGE_KIND_REPLACE", "2"), ("(gint) AS_APP_MERGE_KIND_UNKNOWN", "0"), ("(guint) AS_APP_PARSE_FLAG_ADD_ALL_METADATA", "64"), ("(guint) AS_APP_PARSE_FLAG_ALLOW_VETO", "16"), ("(guint) AS_APP_PARSE_FLAG_APPEND_DATA", "8"), ("(guint) AS_APP_PARSE_FLAG_CONVERT_TRANSLATABLE", "4"), ("(guint) AS_APP_PARSE_FLAG_KEEP_COMMENTS", "2"), ("(guint) AS_APP_PARSE_FLAG_NONE", "0"), ("(guint) AS_APP_PARSE_FLAG_ONLY_NATIVE_LANGS", "128"), ("(guint) AS_APP_PARSE_FLAG_USE_FALLBACKS", "32"), ("(guint) AS_APP_PARSE_FLAG_USE_HEURISTICS", "1"), ("(guint) AS_APP_QUIRK_COMPULSORY", "2"), ("(guint) AS_APP_QUIRK_DEVELOPER_VERIFIED", "2048"), ("(guint) AS_APP_QUIRK_HAS_SHORTCUT", "64"), ("(guint) AS_APP_QUIRK_HAS_SOURCE", "4"), ("(guint) AS_APP_QUIRK_IS_PROXY", "512"), ("(guint) AS_APP_QUIRK_MATCH_ANY_PREFIX", "8"), ("(guint) AS_APP_QUIRK_NEEDS_REBOOT", "16"), ("(guint) AS_APP_QUIRK_NEEDS_USER_ACTION", "256"), ("(guint) AS_APP_QUIRK_NONE", "0"), ("(guint) AS_APP_QUIRK_NOT_LAUNCHABLE", "128"), ("(guint) AS_APP_QUIRK_NOT_REVIEWABLE", "32"), ("(guint) AS_APP_QUIRK_PROVENANCE", "1"), ("(guint) AS_APP_QUIRK_REMOVABLE_HARDWARE", "1024"), ("(gint) AS_APP_SCOPE_SYSTEM", "2"), ("(gint) AS_APP_SCOPE_UNKNOWN", "0"), ("(gint) AS_APP_SCOPE_USER", "1"), ("(guint) AS_APP_SEARCH_MATCH_COMMENT", "8"), ("(guint) AS_APP_SEARCH_MATCH_DESCRIPTION", "4"), ("(guint) AS_APP_SEARCH_MATCH_ID", "64"), ("(guint) AS_APP_SEARCH_MATCH_KEYWORD", "32"), ("(guint) AS_APP_SEARCH_MATCH_MIMETYPE", "1"), ("(guint) AS_APP_SEARCH_MATCH_NAME", "16"), ("(guint) AS_APP_SEARCH_MATCH_NONE", "0"), ("(guint) AS_APP_SEARCH_MATCH_ORIGIN", "128"), ("(guint) AS_APP_SEARCH_MATCH_PKGNAME", "2"), ("(gint) AS_APP_STATE_AVAILABLE", "2"), ("(gint) AS_APP_STATE_AVAILABLE_LOCAL", "3"), ("(gint) AS_APP_STATE_INSTALLED", "1"), ("(gint) AS_APP_STATE_INSTALLING", "7"), ("(gint) AS_APP_STATE_PURCHASABLE", "10"), ("(gint) AS_APP_STATE_PURCHASING", "11"), ("(gint) AS_APP_STATE_QUEUED_FOR_INSTALL", "6"), ("(gint) AS_APP_STATE_REMOVING", "8"), ("(gint) AS_APP_STATE_UNAVAILABLE", "5"), ("(gint) AS_APP_STATE_UNKNOWN", "0"), ("(gint) AS_APP_STATE_UPDATABLE", "4"), ("(gint) AS_APP_STATE_UPDATABLE_LIVE", "9"), ("(guint) AS_APP_SUBSUME_FLAG_AGREEMENTS", "137438953472"), ("(guint) AS_APP_SUBSUME_FLAG_BOTH_WAYS", "2"), ("(guint) AS_APP_SUBSUME_FLAG_BRANCH", "536870912"), ("(guint) AS_APP_SUBSUME_FLAG_BUNDLES", "32"), ("(guint) AS_APP_SUBSUME_FLAG_CATEGORIES", "512"), ("(guint) AS_APP_SUBSUME_FLAG_COMMENT", "4194304"), ("(guint) AS_APP_SUBSUME_FLAG_COMPULSORY", "4096"), ("(guint) AS_APP_SUBSUME_FLAG_CONTENT_RATINGS", "32768"), ("AS_APP_SUBSUME_FLAG_DEDUPE", "6208094264"), ("(guint) AS_APP_SUBSUME_FLAG_DESCRIPTION", "16777216"), ("(guint) AS_APP_SUBSUME_FLAG_DEVELOPER_NAME", "8388608"), ("(guint) AS_APP_SUBSUME_FLAG_EXTENDS", "2048"), ("(guint) AS_APP_SUBSUME_FLAG_FORMATS", "268435456"), ("(guint) AS_APP_SUBSUME_FLAG_ICONS", "131072"), ("(guint) AS_APP_SUBSUME_FLAG_KEYWORDS", "134217728"), ("(guint) AS_APP_SUBSUME_FLAG_KIND", "8"), ("(guint) AS_APP_SUBSUME_FLAG_KUDOS", "256"), ("(guint) AS_APP_SUBSUME_FLAG_LANGUAGES", "1048576"), ("(guint) AS_APP_SUBSUME_FLAG_LAUNCHABLES", "68719476736"), ("AS_APP_SUBSUME_FLAG_MERGE", "266555883456"), ("(guint) AS_APP_SUBSUME_FLAG_METADATA", "33554432"), ("(guint) AS_APP_SUBSUME_FLAG_METADATA_LICENSE", "2147483648"), ("(guint) AS_APP_SUBSUME_FLAG_MIMETYPES", "262144"), ("(guint) AS_APP_SUBSUME_FLAG_NAME", "2097152"), ("(guint) AS_APP_SUBSUME_FLAG_NONE", "0"), ("(guint) AS_APP_SUBSUME_FLAG_NO_OVERWRITE", "1"), ("(guint) AS_APP_SUBSUME_FLAG_ORIGIN", "1073741824"), ("(guint) AS_APP_SUBSUME_FLAG_PERMISSIONS", "1024"), ("(guint) AS_APP_SUBSUME_FLAG_PROJECT_GROUP", "8589934592"), ("(guint) AS_APP_SUBSUME_FLAG_PROJECT_LICENSE", "4294967296"), ("(guint) AS_APP_SUBSUME_FLAG_PROVIDES", "65536"), ("(guint) AS_APP_SUBSUME_FLAG_RELEASES", "128"), ("(guint) AS_APP_SUBSUME_FLAG_REPLACE", "4"), ("(guint) AS_APP_SUBSUME_FLAG_REVIEWS", "16384"), ("(guint) AS_APP_SUBSUME_FLAG_SCREENSHOTS", "8192"), ("(guint) AS_APP_SUBSUME_FLAG_SOURCE_KIND", "17179869184"), ("(guint) AS_APP_SUBSUME_FLAG_STATE", "16"), ("(guint) AS_APP_SUBSUME_FLAG_SUGGESTS", "34359738368"), ("(guint) AS_APP_SUBSUME_FLAG_TRANSLATIONS", "64"), ("(guint) AS_APP_SUBSUME_FLAG_URL", "67108864"), ("(guint) AS_APP_SUBSUME_FLAG_VETOS", "524288"), ("(gint) AS_APP_TRUST_FLAG_CHECK_DUPLICATES", "1"), ("(gint) AS_APP_TRUST_FLAG_CHECK_VALID_UTF8", "2"), ("(gint) AS_APP_TRUST_FLAG_COMPLETE", "0"), ("(gint) AS_APP_VALIDATE_FLAG_ALL_APPS", "8"), ("(gint) AS_APP_VALIDATE_FLAG_NONE", "0"), ("(gint) AS_APP_VALIDATE_FLAG_NO_NETWORK", "4"), ("(gint) AS_APP_VALIDATE_FLAG_RELAX", "1"), ("(gint) AS_APP_VALIDATE_FLAG_STRICT", "2"), ("(gint) AS_BUNDLE_KIND_APPIMAGE", "6"), ("(gint) AS_BUNDLE_KIND_CABINET", "5"), ("(gint) AS_BUNDLE_KIND_FLATPAK", "2"), ("(gint) AS_BUNDLE_KIND_LIMBA", "1"), ("(gint) AS_BUNDLE_KIND_PACKAGE", "4"), ("(gint) AS_BUNDLE_KIND_SNAP", "3"), ("(gint) AS_BUNDLE_KIND_UNKNOWN", "0"), ("(gint) AS_CHECKSUM_TARGET_CONTAINER", "1"), ("(gint) AS_CHECKSUM_TARGET_CONTENT", "2"), ("(gint) AS_CHECKSUM_TARGET_DEVICE", "4"), ("(gint) AS_CHECKSUM_TARGET_SIGNATURE", "3"), ("(gint) AS_CHECKSUM_TARGET_UNKNOWN", "0"), ("(gint) AS_CONTENT_RATING_VALUE_INTENSE", "4"), ("(gint) AS_CONTENT_RATING_VALUE_MILD", "2"), ("(gint) AS_CONTENT_RATING_VALUE_MODERATE", "3"), ("(gint) AS_CONTENT_RATING_VALUE_NONE", "1"), ("(gint) AS_CONTENT_RATING_VALUE_UNKNOWN", "0"), ("(gint) AS_FORMAT_KIND_APPDATA", "3"), ("(gint) AS_FORMAT_KIND_APPSTREAM", "1"), ("(gint) AS_FORMAT_KIND_DESKTOP", "2"), ("(gint) AS_FORMAT_KIND_METAINFO", "4"), ("(gint) AS_FORMAT_KIND_UNKNOWN", "0"), ("(gint) AS_ICON_ERROR_FAILED", "0"), ("(gint) AS_ICON_KIND_CACHED", "2"), ("(gint) AS_ICON_KIND_EMBEDDED", "4"), ("(gint) AS_ICON_KIND_LOCAL", "5"), ("(gint) AS_ICON_KIND_REMOTE", "3"), ("(gint) AS_ICON_KIND_STOCK", "1"), ("(gint) AS_ICON_KIND_UNKNOWN", "0"), ("(gint) AS_ICON_LOAD_FLAG_NONE", "0"), ("(gint) AS_ICON_LOAD_FLAG_SEARCH_SIZE", "1"), ("(gint) AS_ID_KIND_ADDON", "7"), ("(gint) AS_ID_KIND_CODEC", "3"), ("(gint) AS_ID_KIND_DESKTOP", "1"), ("(gint) AS_ID_KIND_FIRMWARE", "8"), ("(gint) AS_ID_KIND_FONT", "2"), ("(gint) AS_ID_KIND_GENERIC", "10"), ("(gint) AS_ID_KIND_INPUT_METHOD", "4"), ("(gint) AS_ID_KIND_RUNTIME", "9"), ("(gint) AS_ID_KIND_SOURCE", "6"), ("(gint) AS_ID_KIND_UNKNOWN", "0"), ("(gint) AS_ID_KIND_WEB_APP", "5"), ("AS_IMAGE_ALPHA_FLAG_BOTTOM", "2"), ("AS_IMAGE_ALPHA_FLAG_INTERNAL", "16"), ("AS_IMAGE_ALPHA_FLAG_LEFT", "4"), ("AS_IMAGE_ALPHA_FLAG_NONE", "0"), ("AS_IMAGE_ALPHA_FLAG_RIGHT", "8"), ("AS_IMAGE_ALPHA_FLAG_TOP", "1"), ("(gint) AS_IMAGE_KIND_SOURCE", "1"), ("(gint) AS_IMAGE_KIND_THUMBNAIL", "2"), ("(gint) AS_IMAGE_KIND_UNKNOWN", "0"), ("AS_IMAGE_LARGE_HEIGHT", "423"), ("AS_IMAGE_LARGE_WIDTH", "752"), ("(gint) AS_IMAGE_LOAD_FLAG_ALWAYS_RESIZE", "16"), ("(gint) AS_IMAGE_LOAD_FLAG_NONE", "0"), ("(gint) AS_IMAGE_LOAD_FLAG_ONLY_SUPPORTED", "8"), ("(gint) AS_IMAGE_LOAD_FLAG_SET_BASENAME", "2"), ("(gint) AS_IMAGE_LOAD_FLAG_SET_CHECKSUM", "4"), ("(gint) AS_IMAGE_LOAD_FLAG_SHARPEN", "1"), ("AS_IMAGE_NORMAL_HEIGHT", "351"), ("AS_IMAGE_NORMAL_WIDTH", "624"), ("(gint) AS_IMAGE_SAVE_FLAG_BLUR", "4"), ("(gint) AS_IMAGE_SAVE_FLAG_NONE", "0"), ("(gint) AS_IMAGE_SAVE_FLAG_PAD_16_9", "1"), ("(gint) AS_IMAGE_SAVE_FLAG_SHARPEN", "2"), ("AS_IMAGE_THUMBNAIL_HEIGHT", "63"), ("AS_IMAGE_THUMBNAIL_WIDTH", "112"), ("(gint) AS_INF_ERROR_FAILED", "0"), ("(gint) AS_INF_ERROR_INVALID_TYPE", "1"), ("(gint) AS_INF_ERROR_NOT_FOUND", "2"), ("(guint) AS_INF_LOAD_FLAG_CASE_INSENSITIVE", "2"), ("(guint) AS_INF_LOAD_FLAG_NONE", "0"), ("(guint) AS_INF_LOAD_FLAG_STRICT", "1"), ("(gint) AS_KUDO_KIND_APP_MENU", "3"), ("(gint) AS_KUDO_KIND_HIGH_CONTRAST", "6"), ("(gint) AS_KUDO_KIND_HI_DPI_ICON", "7"), ("(gint) AS_KUDO_KIND_MODERN_TOOLKIT", "4"), ("(gint) AS_KUDO_KIND_NOTIFICATIONS", "5"), ("(gint) AS_KUDO_KIND_SEARCH_PROVIDER", "1"), ("(gint) AS_KUDO_KIND_UNKNOWN", "0"), ("(gint) AS_KUDO_KIND_USER_DOCS", "2"), ("(gint) AS_LAUNCHABLE_KIND_COCKPIT_MANIFEST", "3"), ("(gint) AS_LAUNCHABLE_KIND_DESKTOP_ID", "1"), ("(gint) AS_LAUNCHABLE_KIND_SERVICE", "2"), ("(gint) AS_LAUNCHABLE_KIND_UNKNOWN", "0"), ("(gint) AS_LAUNCHABLE_KIND_URL", "4"), ("(guint) AS_MARKUP_CONVERT_FLAG_IGNORE_ERRORS", "1"), ("(guint) AS_MARKUP_CONVERT_FLAG_NONE", "0"), ("(gint) AS_MARKUP_CONVERT_FORMAT_APPSTREAM", "3"), ("(gint) AS_MARKUP_CONVERT_FORMAT_HTML", "4"), ("(gint) AS_MARKUP_CONVERT_FORMAT_MARKDOWN", "1"), ("(gint) AS_MARKUP_CONVERT_FORMAT_NULL", "2"), ("(gint) AS_MARKUP_CONVERT_FORMAT_SIMPLE", "0"), ("(gint) AS_NODE_ERROR_FAILED", "0"), ("(gint) AS_NODE_ERROR_INVALID_MARKUP", "1"), ("(gint) AS_NODE_ERROR_NO_SUPPORT", "2"), ("(guint) AS_NODE_FROM_XML_FLAG_KEEP_COMMENTS", "2"), ("(guint) AS_NODE_FROM_XML_FLAG_LITERAL_TEXT", "1"), ("(guint) AS_NODE_FROM_XML_FLAG_NONE", "0"), ("(guint) AS_NODE_FROM_XML_FLAG_ONLY_NATIVE_LANGS", "4"), ("(gint) AS_NODE_INSERT_FLAG_BASE64_ENCODED", "32"), ("(gint) AS_NODE_INSERT_FLAG_DEDUPE_LANG", "8"), ("(gint) AS_NODE_INSERT_FLAG_MARK_TRANSLATABLE", "16"), ("(gint) AS_NODE_INSERT_FLAG_NONE", "0"), ("(gint) AS_NODE_INSERT_FLAG_NO_MARKUP", "4"), ("(gint) AS_NODE_INSERT_FLAG_PRE_ESCAPED", "1"), ("(gint) AS_NODE_INSERT_FLAG_SWAPPED", "2"), ("(gint) AS_NODE_TO_XML_FLAG_ADD_HEADER", "1"), ("(gint) AS_NODE_TO_XML_FLAG_FORMAT_INDENT", "4"), ("(gint) AS_NODE_TO_XML_FLAG_FORMAT_MULTILINE", "2"), ("(gint) AS_NODE_TO_XML_FLAG_INCLUDE_SIBLINGS", "8"), ("(gint) AS_NODE_TO_XML_FLAG_NONE", "0"), ("(gint) AS_NODE_TO_XML_FLAG_SORT_CHILDREN", "16"), ("(gint) AS_PROBLEM_KIND_ASPECT_RATIO_INCORRECT", "13"), ("(gint) AS_PROBLEM_KIND_ATTRIBUTE_INVALID", "5"), ("(gint) AS_PROBLEM_KIND_ATTRIBUTE_MISSING", "4"), ("(gint) AS_PROBLEM_KIND_DUPLICATE_DATA", "9"), ("(gint) AS_PROBLEM_KIND_FILE_INVALID", "12"), ("(gint) AS_PROBLEM_KIND_MARKUP_INVALID", "6"), ("(gint) AS_PROBLEM_KIND_RESOLUTION_INCORRECT", "14"), ("(gint) AS_PROBLEM_KIND_STYLE_INCORRECT", "7"), ("(gint) AS_PROBLEM_KIND_TAG_DUPLICATED", "1"), ("(gint) AS_PROBLEM_KIND_TAG_INVALID", "3"), ("(gint) AS_PROBLEM_KIND_TAG_MISSING", "2"), ("(gint) AS_PROBLEM_KIND_TRANSLATIONS_REQUIRED", "8"), ("(gint) AS_PROBLEM_KIND_UNKNOWN", "0"), ("(gint) AS_PROBLEM_KIND_URL_NOT_FOUND", "11"), ("(gint) AS_PROBLEM_KIND_VALUE_MISSING", "10"), ("(gint) AS_PROVIDE_KIND_BINARY", "2"), ("(gint) AS_PROVIDE_KIND_DBUS_SESSION", "8"), ("(gint) AS_PROVIDE_KIND_DBUS_SYSTEM", "9"), ("(gint) AS_PROVIDE_KIND_FIRMWARE_FLASHED", "10"), ("(gint) AS_PROVIDE_KIND_FIRMWARE_RUNTIME", "5"), ("(gint) AS_PROVIDE_KIND_FONT", "3"), ("(gint) AS_PROVIDE_KIND_ID", "11"), ("(gint) AS_PROVIDE_KIND_LIBRARY", "1"), ("(gint) AS_PROVIDE_KIND_MODALIAS", "4"), ("(gint) AS_PROVIDE_KIND_PYTHON2", "6"), ("(gint) AS_PROVIDE_KIND_PYTHON3", "7"), ("(gint) AS_PROVIDE_KIND_UNKNOWN", "0"), ("(gint) AS_RELEASE_KIND_DEVELOPMENT", "2"), ("(gint) AS_RELEASE_KIND_STABLE", "1"), ("(gint) AS_RELEASE_KIND_UNKNOWN", "0"), ("(gint) AS_RELEASE_STATE_AVAILABLE", "2"), ("(gint) AS_RELEASE_STATE_INSTALLED", "1"), ("(gint) AS_RELEASE_STATE_UNKNOWN", "0"), ("(gint) AS_REQUIRE_COMPARE_EQ", "1"), ("(gint) AS_REQUIRE_COMPARE_GE", "6"), ("(gint) AS_REQUIRE_COMPARE_GLOB", "7"), ("(gint) AS_REQUIRE_COMPARE_GT", "4"), ("(gint) AS_REQUIRE_COMPARE_LE", "5"), ("(gint) AS_REQUIRE_COMPARE_LT", "3"), ("(gint) AS_REQUIRE_COMPARE_NE", "2"), ("(gint) AS_REQUIRE_COMPARE_REGEX", "8"), ("(gint) AS_REQUIRE_COMPARE_UNKNOWN", "0"), ("(gint) AS_REQUIRE_KIND_FIRMWARE", "2"), ("(gint) AS_REQUIRE_KIND_HARDWARE", "3"), ("(gint) AS_REQUIRE_KIND_ID", "1"), ("(gint) AS_REQUIRE_KIND_KERNEL", "5"), ("(gint) AS_REQUIRE_KIND_MEMORY", "6"), ("(gint) AS_REQUIRE_KIND_MODALIAS", "4"), ("(gint) AS_REQUIRE_KIND_UNKNOWN", "0"), ("(guint) AS_REVIEW_FLAG_NONE", "0"), ("(guint) AS_REVIEW_FLAG_SELF", "1"), ("(guint) AS_REVIEW_FLAG_VOTED", "2"), ("(gint) AS_SCREENSHOT_KIND_DEFAULT", "2"), ("(gint) AS_SCREENSHOT_KIND_NORMAL", "1"), ("(gint) AS_SCREENSHOT_KIND_UNKNOWN", "0"), ("(gint) AS_SIZE_KIND_DOWNLOAD", "2"), ("(gint) AS_SIZE_KIND_INSTALLED", "1"), ("(gint) AS_SIZE_KIND_UNKNOWN", "0"), ("(guint) AS_STORE_ADD_FLAG_NONE", "0"), ("(guint) AS_STORE_ADD_FLAG_ONLY_NATIVE_LANGS", "8"), ("(guint) AS_STORE_ADD_FLAG_PREFER_LOCAL", "1"), ("(guint) AS_STORE_ADD_FLAG_USE_MERGE_HEURISTIC", "4"), ("(guint) AS_STORE_ADD_FLAG_USE_UNIQUE_ID", "2"), ("(gint) AS_STORE_ERROR_FAILED", "0"), ("(guint) AS_STORE_LOAD_FLAG_ALLOW_VETO", "32"), ("(guint) AS_STORE_LOAD_FLAG_APPDATA", "8"), ("(guint) AS_STORE_LOAD_FLAG_APP_INFO_SYSTEM", "1"), ("(guint) AS_STORE_LOAD_FLAG_APP_INFO_USER", "2"), ("(guint) AS_STORE_LOAD_FLAG_APP_INSTALL", "4"), ("(guint) AS_STORE_LOAD_FLAG_DESKTOP", "16"), ("(guint) AS_STORE_LOAD_FLAG_FLATPAK_SYSTEM", "128"), ("(guint) AS_STORE_LOAD_FLAG_FLATPAK_USER", "64"), ("(guint) AS_STORE_LOAD_FLAG_IGNORE_INVALID", "256"), ("(guint) AS_STORE_LOAD_FLAG_NONE", "0"), ("(guint) AS_STORE_LOAD_FLAG_ONLY_MERGE_APPS", "1024"), ("(guint) AS_STORE_LOAD_FLAG_ONLY_UNCOMPRESSED", "512"), ("(gint) AS_STORE_SEARCH_FLAG_NONE", "0"), ("(gint) AS_STORE_SEARCH_FLAG_USE_WILDCARDS", "1"), ("(gint) AS_STORE_WATCH_FLAG_ADDED", "1"), ("(gint) AS_STORE_WATCH_FLAG_NONE", "0"), ("(gint) AS_STORE_WATCH_FLAG_REMOVED", "2"), ("(gint) AS_SUGGEST_KIND_HEURISTIC", "2"), ("(gint) AS_SUGGEST_KIND_UNKNOWN", "0"), ("(gint) AS_SUGGEST_KIND_UPSTREAM", "1"), ("(gint) AS_TAG_AGREEMENT", "60"), ("(gint) AS_TAG_AGREEMENT_SECTION", "61"), ("(gint) AS_TAG_ARCH", "32"), ("(gint) AS_TAG_ARCHITECTURES", "31"), ("(gint) AS_TAG_BINARY", "66"), ("(gint) AS_TAG_BUNDLE", "42"), ("(gint) AS_TAG_CAPTION", "24"), ("(gint) AS_TAG_CATEGORIES", "10"), ("(gint) AS_TAG_CATEGORY", "11"), ("(gint) AS_TAG_CHECKSUM", "46"), ("(gint) AS_TAG_COMPONENT", "2"), ("(gint) AS_TAG_COMPONENTS", "1"), ("(gint) AS_TAG_COMPULSORY_FOR_DESKTOP", "22"), ("(gint) AS_TAG_CONTENT_ATTRIBUTE", "50"), ("(gint) AS_TAG_CONTENT_RATING", "49"), ("(gint) AS_TAG_CUSTOM", "58"), ("(gint) AS_TAG_DBUS", "68"), ("(gint) AS_TAG_DESCRIPTION", "7"), ("(gint) AS_TAG_DEVELOPER_NAME", "36"), ("(gint) AS_TAG_EXTENDS", "35"), ("(gint) AS_TAG_FLAG_NONE", "0"), ("(gint) AS_TAG_FLAG_USE_FALLBACKS", "1"), ("(gint) AS_TAG_FLAG_USE_TRANSLATED", "2"), ("(gint) AS_TAG_FONT", "67"), ("(gint) AS_TAG_ICON", "9"), ("(gint) AS_TAG_ID", "3"), ("(gint) AS_TAG_IMAGE", "21"), ("(gint) AS_TAG_KEYWORD", "13"), ("(gint) AS_TAG_KEYWORDS", "12"), ("(gint) AS_TAG_KUDO", "38"), ("(gint) AS_TAG_KUDOS", "37"), ("(gint) AS_TAG_LANG", "26"), ("(gint) AS_TAG_LANGUAGES", "25"), ("(gint) AS_TAG_LAUNCHABLE", "59"), ("(gint) AS_TAG_LI", "63"), ("(gint) AS_TAG_LIBRARY", "70"), ("(gint) AS_TAG_LOCATION", "45"), ("(gint) AS_TAG_METADATA", "27"), ("(gint) AS_TAG_METADATA_LICENSE", "33"), ("(gint) AS_TAG_MIMETYPE", "15"), ("(gint) AS_TAG_MIMETYPES", "14"), ("(gint) AS_TAG_MODALIAS", "69"), ("(gint) AS_TAG_NAME", "5"), ("(gint) AS_TAG_OL", "65"), ("(gint) AS_TAG_P", "62"), ("(gint) AS_TAG_PERMISSION", "44"), ("(gint) AS_TAG_PERMISSIONS", "43"), ("(gint) AS_TAG_PKGNAME", "4"), ("(gint) AS_TAG_PRIORITY", "23"), ("(gint) AS_TAG_PROJECT_GROUP", "16"), ("(gint) AS_TAG_PROJECT_LICENSE", "17"), ("(gint) AS_TAG_PROVIDES", "34"), ("(gint) AS_TAG_RELEASE", "30"), ("(gint) AS_TAG_RELEASES", "29"), ("(gint) AS_TAG_REQUIRES", "57"), ("(gint) AS_TAG_REVIEW", "53"), ("(gint) AS_TAG_REVIEWER_ID", "55"), ("(gint) AS_TAG_REVIEWER_NAME", "54"), ("(gint) AS_TAG_REVIEWS", "52"), ("(gint) AS_TAG_SCREENSHOT", "18"), ("(gint) AS_TAG_SCREENSHOTS", "19"), ("(gint) AS_TAG_SIZE", "47"), ("(gint) AS_TAG_SOURCE_PKGNAME", "39"), ("(gint) AS_TAG_SUGGESTS", "56"), ("(gint) AS_TAG_SUMMARY", "6"), ("(gint) AS_TAG_TRANSLATION", "48"), ("(gint) AS_TAG_UL", "64"), ("(gint) AS_TAG_UNKNOWN", "0"), ("(gint) AS_TAG_UPDATE_CONTACT", "20"), ("(gint) AS_TAG_URL", "8"), ("(gint) AS_TAG_VALUE", "28"), ("(gint) AS_TAG_VERSION", "51"), ("(gint) AS_TAG_VETO", "41"), ("(gint) AS_TAG_VETOS", "40"), ("(gint) AS_TRANSLATION_KIND_GETTEXT", "1"), ("(gint) AS_TRANSLATION_KIND_QT", "2"), ("(gint) AS_TRANSLATION_KIND_UNKNOWN", "0"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_BRANCH", "32"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_BUNDLE_KIND", "2"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_ID", "16"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_KIND", "8"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_NONE", "0"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_ORIGIN", "4"), ("(guint) AS_UNIQUE_ID_MATCH_FLAG_SCOPE", "1"), ("(gint) AS_URGENCY_KIND_CRITICAL", "4"), ("(gint) AS_URGENCY_KIND_HIGH", "3"), ("(gint) AS_URGENCY_KIND_LOW", "1"), ("(gint) AS_URGENCY_KIND_MEDIUM", "2"), ("(gint) AS_URGENCY_KIND_UNKNOWN", "0"), ("(gint) AS_URL_KIND_BUGTRACKER", "2"), ("(gint) AS_URL_KIND_CONTACT", "10"), ("(gint) AS_URL_KIND_DETAILS", "8"), ("(gint) AS_URL_KIND_DONATION", "4"), ("(gint) AS_URL_KIND_FAQ", "3"), ("(gint) AS_URL_KIND_HELP", "5"), ("(gint) AS_URL_KIND_HOMEPAGE", "1"), ("(gint) AS_URL_KIND_MISSING", "6"), ("(gint) AS_URL_KIND_SOURCE", "9"), ("(gint) AS_URL_KIND_TRANSLATE", "7"), ("(gint) AS_URL_KIND_UNKNOWN", "0"), ("(gint) AS_UTILS_ERROR_FAILED", "0"), ("(gint) AS_UTILS_ERROR_INVALID_TYPE", "1"), ("(guint) AS_UTILS_FIND_ICON_HI_DPI", "1"), ("(guint) AS_UTILS_FIND_ICON_NONE", "0"), ("(gint) AS_UTILS_LOCATION_CACHE", "1"), ("(gint) AS_UTILS_LOCATION_SHARED", "0"), ("(gint) AS_UTILS_LOCATION_USER", "2"), ("(guint) AS_VERSION_COMPARE_FLAG_NONE", "0"), ("(guint) AS_VERSION_COMPARE_FLAG_USE_HEURISTICS", "1"), ("(guint) AS_VERSION_PARSE_FLAG_NONE", "0"), ("(guint) AS_VERSION_PARSE_FLAG_USE_BCD", "2"), ("(guint) AS_VERSION_PARSE_FLAG_USE_TRIPLET", "1"), ];