diff options
author | Richard Hughes <richard@hughsie.com> | 2016-09-02 18:14:41 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-09-02 18:14:41 +0100 |
commit | 66f18b2157d593ee89dbbb7032bf54f1628362bb (patch) | |
tree | 15dd0f2cc08831a1e354a13893b8a41b467cee2f | |
parent | 6d735d324d751c94587cf9f48ebdb9656777a151 (diff) | |
download | appstream-glib-66f18b2157d593ee89dbbb7032bf54f1628362bb.tar.gz |
Add a component kind of 'driver'
-rw-r--r-- | libappstream-builder/asb-context.c | 1 | ||||
-rw-r--r-- | libappstream-glib/as-app-validate.c | 1 | ||||
-rw-r--r-- | libappstream-glib/as-app.c | 4 | ||||
-rw-r--r-- | libappstream-glib/as-app.h | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/libappstream-builder/asb-context.c b/libappstream-builder/asb-context.c index 99bac7e..12addc1 100644 --- a/libappstream-builder/asb-context.c +++ b/libappstream-builder/asb-context.c @@ -929,6 +929,7 @@ asb_context_detect_missing_data (AsbContext *ctx, GError **error) switch (as_app_get_kind (AS_APP (app))) { case AS_APP_KIND_ADDON: case AS_APP_KIND_FIRMWARE: + case AS_APP_KIND_DRIVER: case AS_APP_KIND_GENERIC: case AS_APP_KIND_LOCALIZATION: break; diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c index d44c7fe..7833722 100644 --- a/libappstream-glib/as-app-validate.c +++ b/libappstream-glib/as-app-validate.c @@ -760,6 +760,7 @@ as_app_validate_screenshots (AsApp *app, AsAppValidateHelper *helper) /* firmware does not need screenshots */ if (as_app_get_kind (app) == AS_APP_KIND_FIRMWARE || + as_app_get_kind (app) == AS_APP_KIND_DRIVER || as_app_get_kind (app) == AS_APP_KIND_LOCALIZATION) number_screenshots_min = 0; diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c index 67896bf..4eeacf6 100644 --- a/libappstream-glib/as-app.c +++ b/libappstream-glib/as-app.c @@ -180,6 +180,8 @@ as_app_kind_to_string (AsAppKind kind) return "localization"; if (kind == AS_APP_KIND_CONSOLE) return "console-application"; + if (kind == AS_APP_KIND_DRIVER) + return "driver"; return "unknown"; } @@ -226,6 +228,8 @@ as_app_kind_from_string (const gchar *kind) return AS_APP_KIND_LOCALIZATION; if (g_strcmp0 (kind, "console-application") == 0) return AS_APP_KIND_CONSOLE; + if (g_strcmp0 (kind, "driver") == 0) + return AS_APP_KIND_DRIVER; /* legacy */ if (g_strcmp0 (kind, "desktop") == 0) diff --git a/libappstream-glib/as-app.h b/libappstream-glib/as-app.h index 982d360..26468ce 100644 --- a/libappstream-glib/as-app.h +++ b/libappstream-glib/as-app.h @@ -296,6 +296,7 @@ typedef enum { * @AS_APP_KIND_OS_UPGRADE: Operating system upgrade * @AS_APP_KIND_SHELL_EXTENSION: GNOME Shell extension * @AS_APP_KIND_LOCALIZATION: Localization data + * @AS_APP_KIND_DRIVER: Driver for hardware support * * The component type. **/ @@ -316,6 +317,7 @@ typedef enum { AS_APP_KIND_SHELL_EXTENSION, /* Since: 0.5.10 */ AS_APP_KIND_LOCALIZATION, /* Since: 0.5.11 */ AS_APP_KIND_CONSOLE, /* Since: 0.6.1 */ + AS_APP_KIND_DRIVER, /* Since: 0.6.3 */ /*< private >*/ AS_APP_KIND_LAST } AsAppKind; |