summaryrefslogtreecommitdiff
path: root/gio/gappinfo.h
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-01-22 15:39:15 +0100
committerOndrej Holy <oholy@redhat.com>2019-01-28 16:42:34 +0100
commitcec5778cad6fffd829872062eff30b27f196b758 (patch)
treec445218942dc1b55cfd03e6c96ddee23344dc362 /gio/gappinfo.h
parentf72a5d65e0e762a16c33f91e180b2edbd46e95eb (diff)
downloadglib-cec5778cad6fffd829872062eff30b27f196b758.tar.gz
gappinfo: Add launch_uris_async() and launch_uris_finish() vfuncs
The g_app_info_launch_uris_async() and g_app_info_launch_uris_finish() functions are crucial to fix g_app_info_launch_default_for_uri_async() to be really asynchronous. This patch also adds GDesktopAppInfo implementation of that vfuncs. The implementation may still use some synchronous calls to local MIME DB. https://gitlab.gnome.org/GNOME/glib/issues/1347 https://gitlab.gnome.org/GNOME/glib/issues/1249
Diffstat (limited to 'gio/gappinfo.h')
-rw-r--r--gio/gappinfo.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/gio/gappinfo.h b/gio/gappinfo.h
index 4889be923..d26d048a5 100644
--- a/gio/gappinfo.h
+++ b/gio/gappinfo.h
@@ -78,7 +78,9 @@ typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate;
* @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
* @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type().
* @get_supported_types: Retrieves the list of content types that @app_info claims to support.
- *
+ * @launch_uris_async: Asynchronously launches an application with a list of URIs. (Since: 2.60)
+ * @launch_uris_finish: Finishes an operation started with @launch_uris_async. (Since: 2.60)
+
* Application Information interface, for operating system portability.
*/
typedef struct _GAppInfoIface GAppInfoIface;
@@ -131,6 +133,15 @@ struct _GAppInfoIface
const char *content_type,
GError **error);
const char ** (* get_supported_types) (GAppInfo *appinfo);
+ void (* launch_uris_async) (GAppInfo *appinfo,
+ GList *uris,
+ GAppLaunchContext *context,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* launch_uris_finish) (GAppInfo *appinfo,
+ GAsyncResult *result,
+ GError **error);
};
GLIB_AVAILABLE_IN_ALL
@@ -173,6 +184,18 @@ gboolean g_app_info_launch_uris (GAppInfo *appin
GList *uris,
GAppLaunchContext *context,
GError **error);
+GLIB_AVAILABLE_IN_2_60
+void g_app_info_launch_uris_async (GAppInfo *appinfo,
+ GList *uris,
+ GAppLaunchContext *context,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+GLIB_AVAILABLE_IN_2_60
+gboolean g_app_info_launch_uris_finish (GAppInfo *appinfo,
+ GAsyncResult *result,
+ GError **error);
+
GLIB_AVAILABLE_IN_ALL
gboolean g_app_info_should_show (GAppInfo *appinfo);