static void infinoted_plugin_dbus_method_call_func(GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { /* Dispatch to the main thread */ InfinotedPluginDbus* plugin; InfinotedPluginDbusInvocation* thread_invocation; InfIo* io; plugin = (InfinotedPluginDbus*)user_data; thread_invocation = g_slice_new(InfinotedPluginDbusInvocation); thread_invocation->plugin = plugin; thread_invocation->ref_count = 1; thread_invocation->method_name = g_strdup(method_name); thread_invocation->parameters = g_variant_ref(parameters); thread_invocation->invocation = g_object_ref(invocation); thread_invocation->navigate = NULL; thread_invocation->request = NULL; thread_invocation->request_func = NULL; io = infinoted_plugin_manager_get_io(plugin->manager); inf_io_add_dispatch( io, infinoted_plugin_dbus_main_invocation, thread_invocation, infinoted_plugin_dbus_invocation_unref ); }
static void infinoted_plugin_linekeeper_text_erased_cb(InfTextBuffer* buffer, guint pos, InfTextChunk* chunk, InfUser* user, gpointer user_data) { InfinotedPluginLinekeeperSessionInfo* info; InfdDirectory* directory; info = (InfinotedPluginLinekeeperSessionInfo*)user_data; if(info->dispatch == NULL) { directory = infinoted_plugin_manager_get_directory(info->plugin->manager); info->dispatch = inf_io_add_dispatch( infd_directory_get_io(directory), infinoted_plugin_linekeeper_run_dispatch_func, info, NULL ); } }