summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2018-04-12 15:58:31 +0100
committerRichard Hughes <richard@hughsie.com>2018-04-12 15:58:31 +0100
commit9609d91fb1d5e2be57f17247e1bda2942071161f (patch)
tree2883977fd3f8c193612446e99ff659e3b38a1d71
parent0bb8ae6f2dec2b3ff6bf6f908955969e1b460d8a (diff)
downloadappstream-glib-9609d91fb1d5e2be57f17247e1bda2942071161f.tar.gz
trivial: Add the missing <requires> enum types
-rw-r--r--libappstream-glib/as-require.c12
-rw-r--r--libappstream-glib/as-require.h6
2 files changed, 18 insertions, 0 deletions
diff --git a/libappstream-glib/as-require.c b/libappstream-glib/as-require.c
index da14b5d..cfaff86 100644
--- a/libappstream-glib/as-require.c
+++ b/libappstream-glib/as-require.c
@@ -97,6 +97,12 @@ as_require_kind_from_string (const gchar *kind)
return AS_REQUIRE_KIND_FIRMWARE;
if (g_strcmp0 (kind, "hardware") == 0)
return AS_REQUIRE_KIND_HARDWARE;
+ if (g_strcmp0 (kind, "modalias") == 0)
+ return AS_REQUIRE_KIND_MODALIAS;
+ if (g_strcmp0 (kind, "kernel") == 0)
+ return AS_REQUIRE_KIND_KERNEL;
+ if (g_strcmp0 (kind, "memory") == 0)
+ return AS_REQUIRE_KIND_MEMORY;
return AS_REQUIRE_KIND_UNKNOWN;
}
@@ -119,6 +125,12 @@ as_require_kind_to_string (AsRequireKind kind)
return "firmware";
if (kind == AS_REQUIRE_KIND_HARDWARE)
return "hardware";
+ if (kind == AS_REQUIRE_KIND_MODALIAS)
+ return "modalias";
+ if (kind == AS_REQUIRE_KIND_KERNEL)
+ return "kernel";
+ if (kind == AS_REQUIRE_KIND_MEMORY)
+ return "memory";
return NULL;
}
diff --git a/libappstream-glib/as-require.h b/libappstream-glib/as-require.h
index ca2797f..0b01a20 100644
--- a/libappstream-glib/as-require.h
+++ b/libappstream-glib/as-require.h
@@ -53,6 +53,9 @@ struct _AsRequireClass
* @AS_REQUIRE_KIND_ID: Component ID
* @AS_REQUIRE_KIND_FIRMWARE: Device firmware version
* @AS_REQUIRE_KIND_HARDWARE: Hardware device, typically a GUID
+ * @AS_REQUIRE_KIND_MODALIAS: Modalias string
+ * @AS_REQUIRE_KIND_KERNEL: Kernel version
+ * @AS_REQUIRE_KIND_MEMORY: Amount of installed memory in MiB
*
* The require type.
**/
@@ -61,6 +64,9 @@ typedef enum {
AS_REQUIRE_KIND_ID,
AS_REQUIRE_KIND_FIRMWARE,
AS_REQUIRE_KIND_HARDWARE, /* Since: 0.7.4 */
+ AS_REQUIRE_KIND_MODALIAS, /* Since: 0.7.8 */
+ AS_REQUIRE_KIND_KERNEL, /* Since: 0.7.8 */
+ AS_REQUIRE_KIND_MEMORY, /* Since: 0.7.8 */
/*< private >*/
AS_REQUIRE_KIND_LAST
} AsRequireKind;