/** * gs_plugin_xdg_app_changed_cb: */ static void gs_plugin_xdg_app_changed_cb (GFileMonitor *monitor, GFile *child, GFile *other_file, GFileMonitorEvent event_type, GsPlugin *plugin) { gs_plugin_updates_changed (plugin); }
static void gs_plugin_systemd_updates_changed_cb (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type, gpointer user_data) { GsPlugin *plugin = GS_PLUGIN (user_data); /* update UI */ gs_plugin_updates_changed (plugin); }
static void gs_plugin_fwupd_device_changed_cb (FwupdClient *client, FwupdDevice *dev, GsPlugin *plugin) { /* limit number of UI refreshes */ if (!fwupd_device_has_flag (dev, FWUPD_DEVICE_FLAG_SUPPORTED)) { g_debug ("%s changed (not supported) so ignoring", fwupd_device_get_id (dev)); return; } /* If the flag is set the device matches something in the * metadata as therefor is worth refreshing the update list */ g_debug ("%s changed (supported) so reloading", fwupd_device_get_id (dev)); gs_plugin_updates_changed (plugin); }
static void gs_plugin_fedora_distro_upgrades_changed_cb (GFileMonitor *monitor, GFile *file, GFile *other_file, GFileMonitorEvent event_type, gpointer user_data) { GsPlugin *plugin = GS_PLUGIN (user_data); /* only reload the update list if the plugin is NOT running itself * and the time since it ran is greater than 5 seconds (inotify FTW) */ if (gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_RUNNING_SELF)) { g_debug ("no notify as plugin %s active", gs_plugin_get_name (plugin)); return; } if (gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_RECENT)) { g_debug ("no notify as plugin %s recently active", gs_plugin_get_name (plugin)); return; } g_debug ("cache file changed, so reloading upgrades list"); gs_plugin_updates_changed (plugin); }