+ indata->indicator_info.active = FALSE;
+ g_free(indata->indicator_info.devname);
+ indata->indicator_info.devname = NULL;
+ _indicator_stop_updater(s, plugin);
+ return TCORE_HOOK_RETURN_CONTINUE;
+}
+
+static TcoreHookReturn __on_hook_modem_plugin_added(Server *s,
+ TcoreServerNotification command,
+ guint data_len, void *data, void *user_data)
+{
+ TcorePlugin *modem_plugin;
+ TcorePlugin *indicator_plugin = (TcorePlugin *)user_data;
+
+ modem_plugin = (TcorePlugin *)data;
+ tcore_check_return_value_assert(NULL != modem_plugin, TCORE_HOOK_RETURN_STOP_PROPAGATION);
+
+ tcore_plugin_add_notification_hook(modem_plugin, TCORE_NOTIFICATION_MODEM_POWER,
+ __on_hook_modem_powered, indicator_plugin);
+ tcore_plugin_add_notification_hook(modem_plugin, TCORE_NOTIFICATION_PS_CALL_STATUS,
+ __on_hook_ps_callstatus, indicator_plugin);
+
+ return TCORE_HOOK_RETURN_CONTINUE;
+}
+
+static TcoreHookReturn __on_hook_modem_plugin_removed(Server *s,
+ TcoreServerNotification command,
+ guint data_len, void *data, void *user_data)
+{
+ TcorePlugin *modem_plugin;
+
+ modem_plugin = (TcorePlugin *)data;
+ tcore_check_return_value_assert(NULL != modem_plugin, TCORE_HOOK_RETURN_STOP_PROPAGATION);
+
+ tcore_plugin_remove_notification_hook(modem_plugin, TCORE_NOTIFICATION_MODEM_POWER,
+ __on_hook_modem_powered);
+ tcore_plugin_remove_notification_hook(modem_plugin, TCORE_NOTIFICATION_PS_CALL_STATUS,
+ __on_hook_ps_callstatus);