diff mbox series

[2/2] service: Document '{clear,set}_error'.

Message ID 20231120215329.786768-3-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series service: Add and Leverage 'clear_error' | expand

Commit Message

Grant Erickson Nov. 20, 2023, 9:53 p.m. UTC
This adds documentation to the '{clear,set}_error' functions.
---
 src/service.c | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
diff mbox series

Patch

diff --git a/src/service.c b/src/service.c
index b30e75b9ac13..85315548c2fe 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4650,6 +4650,24 @@  static DBusMessage *set_property(DBusConnection *conn,
 	return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
 }
 
+/**
+ *  @brief
+ *    Set the specified network service "Error" property.
+ *
+ *  This sets the specified network service "Error" property to the
+ *  provided value.
+ *
+ *  @note
+ *    This function results in a D-Bus property changed signal for the
+ *    network service "Error" property.
+ *
+ *  @param[in,out]  service  A pointer to the mutable network service
+ *                           for which to set the "Error" property.
+ *  @param[in]      error    The error value to set.
+ *
+ *  @sa clear_error
+ *
+ */
 static void set_error(struct connman_service *service,
 					enum connman_service_error error)
 {
@@ -4676,6 +4694,25 @@  static void set_error(struct connman_service *service,
 				DBUS_TYPE_STRING, &str);
 }
 
+/**
+ *  @brief
+ *    Clear or reset the specified network service "Error" property.
+ *
+ *  This sets the specified network service "Error" property to the
+ *  initialization value of #CONNMAN_SERVICE_ERROR_UNKNOWN,
+ *  effectively clearing or resetting the property.
+ *
+ *  @note
+ *    This function results in a D-Bus property changed signal for the
+ *    network service "Error" property.
+ *
+ *  @param[in,out]  service  A pointer to the mutable network service
+ *                           for which to clear or reset the "Error"
+ *                           property.
+ *
+ *  @sa set_error
+ *
+ */
 static void clear_error(struct connman_service *service)
 {
 	set_error(service, CONNMAN_SERVICE_ERROR_UNKNOWN);