This change introduces a new signal, tcs_conf_reload, which is emitted
in response to a successful config file reload.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
*/
#define TOOLS_CORE_SIG_CAPABILITIES "tcs_capabilities"
+/**
+ * Signal sent when the config file is reloaded.
+ *
+ * @param[in] src The source object.
+ * @param[in] ctx ToolsAppCtx *: The application context.
+ * @param[in] data Client data.
+ */
+#define TOOLS_CORE_SIG_CONF_RELOAD "tcs_conf_reload"
+
/**
* Signal sent when the service receives a request to dump its internal
* state to the log. This is for debugging purposes, and plugins can
&state->ctx.config,
&state->configMtime)) {
g_debug("Config file reloaded.\n");
+
+ /* Inform plugins of config file update. */
+ g_signal_emit_by_name(state->ctx.serviceObj,
+ TOOLS_CORE_SIG_CONF_RELOAD,
+ &state->ctx);
} else {
loaded = FALSE;
}
2,
G_TYPE_POINTER,
G_TYPE_BOOLEAN);
+ g_signal_new(TOOLS_CORE_SIG_CONF_RELOAD,
+ G_OBJECT_CLASS_TYPE(klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE,
+ 1,
+ G_TYPE_POINTER);
g_signal_new(TOOLS_CORE_SIG_DUMP_STATE,
G_OBJECT_CLASS_TYPE(klass),
G_SIGNAL_RUN_LAST,