[Libosinfo] [libosinfo PATCH 08/20] Add "Since: 0.2.3" to the documentation
Fabiano Fidêncio
fidencio at redhat.com
Mon Jul 15 13:01:46 UTC 2019
Let's add the "Since: ..." information as part of the function's
documentation. It helps developers reading our docs to easily figure out
when a function has been introduced.
Together with this change, documentation has been added to the functions
missing them.
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
osinfo/osinfo_datamap.c | 39 ++++++++++++++++++++++++
osinfo/osinfo_datamaplist.c | 2 ++
osinfo/osinfo_db.c | 7 +++++
osinfo/osinfo_install_config_paramlist.c | 2 ++
osinfo/osinfo_install_script.c | 4 +++
osinfo/osinfo_media.c | 4 +++
6 files changed, 58 insertions(+)
diff --git a/osinfo/osinfo_datamap.c b/osinfo/osinfo_datamap.c
index 05e4631..f8f81a9 100644
--- a/osinfo/osinfo_datamap.c
+++ b/osinfo/osinfo_datamap.c
@@ -85,6 +85,16 @@ osinfo_datamap_init(OsinfoDatamap *list)
}
+/**
+ * osinfo_datamap_new:
+ * @id: the unique identifier
+ *
+ * Construct a new datamapa that is initially empty.
+ *
+ * Returns: (transfer full): an empty datamap
+ *
+ * Since: 0.2.3
+ */
OsinfoDatamap *osinfo_datamap_new(const gchar *id)
{
return g_object_new(OSINFO_TYPE_DATAMAP,
@@ -93,6 +103,17 @@ OsinfoDatamap *osinfo_datamap_new(const gchar *id)
}
+/**
+ * osinfo_datamap_insert:
+ * @map: the OS datamap
+ * @inval: the input value
+ * @outval: the output value
+ *
+ * Adds the input value and the output value associated to it to
+ * the @map.
+ *
+ * Since: 0.2.3
+ */
void osinfo_datamap_insert(OsinfoDatamap *map,
const gchar *inval,
const gchar *outval)
@@ -108,12 +129,30 @@ void osinfo_datamap_insert(OsinfoDatamap *map,
g_hash_table_insert(map->priv->reverse_map, dup_outval, dup_inval);
}
+/**
+ * osinfo_datamap_lookup:
+ * @map: the OS datamap
+ * @inval: the input value
+ *
+ * Returns the output value with which @inval is associated to.
+ *
+ * Since: 0.2.3
+ */
const gchar *osinfo_datamap_lookup(OsinfoDatamap *map,
const gchar *inval)
{
return g_hash_table_lookup(map->priv->map, inval);
}
+/**
+ * osinfo_datamap_reverse_lookup:
+ * @map: the OS datamap
+ * @outval: the output value
+ *
+ * Returns the input value with which @outval is associated to.
+ *
+ * Since: 0.2.3
+ */
const gchar *osinfo_datamap_reverse_lookup(OsinfoDatamap *map,
const gchar *outval)
{
diff --git a/osinfo/osinfo_datamaplist.c b/osinfo/osinfo_datamaplist.c
index 1e45756..e3593b7 100644
--- a/osinfo/osinfo_datamaplist.c
+++ b/osinfo/osinfo_datamaplist.c
@@ -73,6 +73,8 @@ osinfo_datamaplist_init(OsinfoDatamapList *list)
* Construct a new install_datamap list that is initially empty.
*
* Returns: (transfer full): an empty install_datamap list
+ *
+ * Since: 0.2.3
*/
OsinfoDatamapList *osinfo_datamaplist_new(void)
{
diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c
index 29f40b5..a2fc8bc 100644
--- a/osinfo/osinfo_db.c
+++ b/osinfo/osinfo_db.c
@@ -261,6 +261,8 @@ OsinfoDeployment *osinfo_db_get_deployment(OsinfoDb *db, const gchar *id)
* @id: the unique operating system identifier
*
* Returns: (transfer none): the install datamap, or NULL if none is found
+ *
+ * Since: 0.2.3
*/
OsinfoDatamap *osinfo_db_get_datamap(OsinfoDb *db, const gchar *id)
{
@@ -402,6 +404,8 @@ OsinfoDeploymentList *osinfo_db_get_deployment_list(OsinfoDb *db)
* @db: the database
*
* Returns: (transfer full): the list of install datamaps
+ *
+ * Since: 0.2.3
*/
OsinfoDatamapList *osinfo_db_get_datamap_list(OsinfoDb *db)
{
@@ -498,6 +502,7 @@ void osinfo_db_add_deployment(OsinfoDb *db, OsinfoDeployment *deployment)
* @db: the database
* @datamap: (transfer none): an install datamap
*
+ * Since: 0.2.3
*/
void osinfo_db_add_datamap(OsinfoDb *db, OsinfoDatamap *datamap)
{
@@ -753,6 +758,8 @@ static void fill_media(OsinfoDb *db, OsinfoMedia *media,
* properties will be set.
*
* Returns: TRUE if @media was found in @db, FALSE otherwise
+ *
+ * Since: 0.2.3
*/
gboolean osinfo_db_identify_media(OsinfoDb *db, OsinfoMedia *media)
{
diff --git a/osinfo/osinfo_install_config_paramlist.c b/osinfo/osinfo_install_config_paramlist.c
index 9925cbf..d5390ed 100644
--- a/osinfo/osinfo_install_config_paramlist.c
+++ b/osinfo/osinfo_install_config_paramlist.c
@@ -75,6 +75,8 @@ osinfo_install_config_paramlist_init(OsinfoInstallConfigParamList *list)
* Construct a new install_config_param list that is initially empty.
*
* Returns: (transfer full): an empty install_config_param list
+ *
+ * Since: 0.2.3
*/
OsinfoInstallConfigParamList *osinfo_install_config_paramlist_new(void)
{
diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
index 7e242c9..934f25c 100644
--- a/osinfo/osinfo_install_script.c
+++ b/osinfo/osinfo_install_script.c
@@ -368,6 +368,8 @@ GList *osinfo_install_script_get_config_param_list(OsinfoInstallScript *script)
*
* Returns: (transfer none): the list of valid #OsinfoInstallConfigParam
* parameters.
+ *
+ * Since: 0.2.3
*/
OsinfoInstallConfigParamList *osinfo_install_script_get_config_params(OsinfoInstallScript *script)
{
@@ -1196,6 +1198,8 @@ gchar *osinfo_install_script_generate_for_media_finish(OsinfoInstallScript *scri
* @error: The location where to store any error, or NULL
*
* Returns: (transfer full): a file containing the script, or NULL on error
+ *
+ * Since: 0.2.3
*/
GFile *osinfo_install_script_generate_output_finish(OsinfoInstallScript *script,
GAsyncResult *res,
diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
index 86d9696..ccfc704 100644
--- a/osinfo/osinfo_media.c
+++ b/osinfo/osinfo_media.c
@@ -1615,6 +1615,8 @@ gint osinfo_media_get_installer_reboots(OsinfoMedia *media)
* @media: an #OsinfoMedia instance
*
* Returns: (transfer full): the operating system, or NULL
+ *
+ * Since: 0.2.3
*/
OsinfoOs *osinfo_media_get_os(OsinfoMedia *media)
{
@@ -1691,6 +1693,8 @@ OsinfoOsVariantList *osinfo_media_get_os_variants(OsinfoMedia *media)
* containing the list of the UI languages this media supports. The list
* must be freed with g_list_free() when no longer needed. If the
* supported languages are unknown, NULL will be returned.
+ *
+ * Since: 0.2.3
*/
GList *osinfo_media_get_languages(OsinfoMedia *media)
{
--
2.21.0
More information about the Libosinfo
mailing list