summaryrefslogtreecommitdiff
path: root/document-portal/xdp-main.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-07-10 17:02:38 +0200
committerAlexander Larsson <alexl@redhat.com>2015-07-10 17:02:38 +0200
commit4c4c66fc2d5da54ebb3580da87c37795ffc79253 (patch)
treef401bfc4d26dc82dfbbd7d267b1b70189af90ec2 /document-portal/xdp-main.c
parent929071ad1083494f717f6a5ab6dfcf817d143700 (diff)
downloadxdg-app-4c4c66fc2d5da54ebb3580da87c37795ffc79253.tar.gz
Add GetMountPoint method for document portal
This is both to get the mount path and to have a nice way to activate the mount.
Diffstat (limited to 'document-portal/xdp-main.c')
-rw-r--r--document-portal/xdp-main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/document-portal/xdp-main.c b/document-portal/xdp-main.c
index 7cd1ad3..fc250f1 100644
--- a/document-portal/xdp-main.c
+++ b/document-portal/xdp-main.c
@@ -347,6 +347,13 @@ handle_method (GCallback method_callback,
return TRUE;
}
+static gboolean
+handle_get_mount_point (XdpDbusDocuments *object, GDBusMethodInvocation *invocation)
+{
+ xdp_dbus_documents_complete_get_mount_point (object, invocation, xdp_fuse_get_mountpoint ());
+ return TRUE;
+}
+
static void
on_bus_acquired (GDBusConnection *connection,
const gchar *name,
@@ -357,6 +364,7 @@ on_bus_acquired (GDBusConnection *connection,
helper = xdp_dbus_documents_skeleton_new ();
+ g_signal_connect_swapped (helper, "handle-get-mount-point", G_CALLBACK (handle_get_mount_point), NULL);
g_signal_connect_swapped (helper, "handle-add", G_CALLBACK (handle_method), portal_add);
g_signal_connect_swapped (helper, "handle-add-local", G_CALLBACK (handle_method), portal_add_local);
g_signal_connect_swapped (helper, "handle-grant-permissions", G_CALLBACK (handle_method), portal_grant_permissions);