summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2012-08-07 13:57:50 +0100
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-08-07 14:46:36 +0100
commitbddbe4bf80aba9a3e01559275d61df5c6a389848 (patch)
tree355195b5eda1231334a395d8888a1576f983f1ce
parent86f4c186aac58178f290777d703de49937f19c70 (diff)
downloadnode-startup-controller-bddbe4bf80aba9a3e01559275d61df5c6a389848.tar.gz
Add documentation to the TargetStartupMonitor class
-rw-r--r--NEWS1
-rw-r--r--node-startup-controller/target-startup-monitor.c35
2 files changed, 36 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 922c6f3..9451811 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ x.y.z
GLib)
* Add documentation for the JobManager class
* Add documentation for the LAHandlerService class
+* Add documentation for the TargetStartupMonitor class
0.9.1
=====
diff --git a/node-startup-controller/target-startup-monitor.c b/node-startup-controller/target-startup-monitor.c
index 1c85dec..2597505 100644
--- a/node-startup-controller/target-startup-monitor.c
+++ b/node-startup-controller/target-startup-monitor.c
@@ -24,6 +24,31 @@
+/**
+ * SECTION: target-startup-monitor
+ * @title: TargetStartupMonitor
+ * @short_description: Listens to JobRemoved signals and sets the node state.
+ * @stability: Internal
+ *
+ * The TargetStartupMonitor is responsible for setting the state of the Node State
+ * Manager using states from #NSMNodeState. It sets the node state under the following
+ * circumstances:
+ *
+ * The TargetStartupMonitor has started up - set the state to
+ * %NSM_NODE_STATE_BASE_RUNNING.
+ *
+ * The systemd unit %focussed.target has started - set the state to
+ * %NSM_NODE_STATE_LUC_RUNNING.
+ *
+ * The systemd unit %unfocussed.target has started - set the state to
+ * %NSM_NODE_STATE_FULLY_RUNNING.
+ *
+ * The systemd unit %lazy.target has started - set the state to
+ * %NSM_NODE_STATE_FULLY_OPERATIONAL.
+ */
+
+
+
DLT_IMPORT_CONTEXT (controller_context);
@@ -440,6 +465,16 @@ target_startup_monitor_set_node_state_finish (GObject *object,
+/**
+ * target_startup_monitor_new:
+ * @systemd_manager: An interface to the systemd manager created with
+ * systemd_manager_proxy_new_for_bus_sync()
+ *
+ * Creates a new target startup monitor and begins listening to %JobRemoved signals from
+ * systemd.
+ *
+ * Returns: A new instance of the #TargetStartupMonitor.
+ */
TargetStartupMonitor *
target_startup_monitor_new (SystemdManager *systemd_manager)
{