summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-bootconfig-parser.c
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2023-02-09 16:28:53 +0100
committerCorentin Noël <tintou@noel.tf>2023-02-09 16:28:53 +0100
commitfa750fba8032dd271b33ef1553b46f9a0a985e50 (patch)
treeb213c822b747a7286f8577ad58a673d84c9bbca8 /src/libostree/ostree-bootconfig-parser.c
parent51f3d03d9bc1e39b5e47c629ae5eb9f483da56b8 (diff)
downloadostree-fa750fba8032dd271b33ef1553b46f9a0a985e50.tar.gz
libostree: Enhance the annotation coverage
Increase the coverage of the GObject Introspection annotation and most notably replace the use of "allow-none" with "out" parameters to "nullable" or "optional" as the previous annotation is deprecated and ambiguous.
Diffstat (limited to 'src/libostree/ostree-bootconfig-parser.c')
-rw-r--r--src/libostree/ostree-bootconfig-parser.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libostree/ostree-bootconfig-parser.c b/src/libostree/ostree-bootconfig-parser.c
index 08259ebf..96991b18 100644
--- a/src/libostree/ostree-bootconfig-parser.c
+++ b/src/libostree/ostree-bootconfig-parser.c
@@ -134,6 +134,14 @@ ostree_bootconfig_parser_parse (OstreeBootconfigParser *self,
cancellable, error);
}
+/**
+ * ostree_bootconfig_parser_set:
+ * @self: Parser
+ * @key: the key
+ * @value: the key
+ *
+ * Set the @key/@value pair to the boot configuration dictionary.
+ */
void
ostree_bootconfig_parser_set (OstreeBootconfigParser *self,
const char *key,
@@ -142,6 +150,16 @@ ostree_bootconfig_parser_set (OstreeBootconfigParser *self,
g_hash_table_replace (self->options, g_strdup (key), g_strdup (value));
}
+/**
+ * ostree_bootconfig_parser_get:
+ * @self: Parser
+ * @key: the key name to retrieve
+ *
+ * Get the value corresponding to @key from the boot configuration dictionary.
+ *
+ * Returns: (nullable): The corresponding value, or %NULL if the key hasn't been
+ * found.
+ */
const char *
ostree_bootconfig_parser_get (OstreeBootconfigParser *self,
const char *key)