Skip to content

Commit

Permalink
Add version property to all dbus interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlarsson committed May 19, 2017
1 parent 6c5ee01 commit bda7575
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/org.freedesktop.Flatpak.xml
Expand Up @@ -25,13 +25,15 @@

<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
<interface name='org.freedesktop.Flatpak.SessionHelper'>
<property name="version" type="u" access="read"/>

<method name="RequestMonitor">
<arg type='ay' name='path' direction='out'/>
</method>
</interface>

<interface name='org.freedesktop.Flatpak.Development'>
<property name="version" type="u" access="read"/>

<!-- This methods let you start processes, sandboxed or not on the
host, so its not generally safe to allow access to it to any
Expand Down Expand Up @@ -59,6 +61,8 @@
</interface>

<interface name='org.freedesktop.Flatpak.SystemHelper'>
<property name="version" type="u" access="read"/>

<method name="Deploy">
<arg type='ay' name='repo_path' direction='in'/>
<arg type='u' name='flags' direction='in'/>
Expand Down
1 change: 1 addition & 0 deletions data/org.freedesktop.impl.portal.PermissionStore.xml
Expand Up @@ -42,6 +42,7 @@
(in the form of a GVariant) with each resource.
-->
<interface name='org.freedesktop.impl.portal.PermissionStore'>
<property name="version" type="u" access="read"/>

<!--
Lookup:
Expand Down
1 change: 1 addition & 0 deletions data/org.freedesktop.portal.Documents.xml
Expand Up @@ -47,6 +47,7 @@
in the POSIX mode bits in the fuse filesystem.
-->
<interface name='org.freedesktop.portal.Documents'>
<property name="version" type="u" access="read"/>

<!--
GetMountPoint:
Expand Down
2 changes: 2 additions & 0 deletions document-portal/xdp-main.c
Expand Up @@ -873,6 +873,8 @@ on_bus_acquired (GDBusConnection *connection,

dbus_api = xdp_dbus_documents_skeleton_new ();

xdp_dbus_documents_set_version (XDP_DBUS_DOCUMENTS (dbus_api), 1);

g_signal_connect_swapped (dbus_api, "handle-get-mount-point", G_CALLBACK (handle_get_mount_point), NULL);
g_signal_connect_swapped (dbus_api, "handle-add", G_CALLBACK (handle_method), portal_add);
g_signal_connect_swapped (dbus_api, "handle-add-named", G_CALLBACK (handle_method), portal_add_named);
Expand Down
2 changes: 2 additions & 0 deletions permission-store/xdg-permission-store.c
Expand Up @@ -448,6 +448,8 @@ xdg_permission_store_start (GDBusConnection *connection)

store = xdg_permission_store_skeleton_new ();

xdg_permission_store_set_version (XDG_PERMISSION_STORE (store), 1);

g_signal_connect (store, "handle-list", G_CALLBACK (handle_list), NULL);
g_signal_connect (store, "handle-lookup", G_CALLBACK (handle_lookup), NULL);
g_signal_connect (store, "handle-set", G_CALLBACK (handle_set), NULL);
Expand Down
4 changes: 4 additions & 0 deletions session-helper/flatpak-session-helper.c
Expand Up @@ -359,6 +359,9 @@ on_bus_acquired (GDBusConnection *connection,
GError *error = NULL;

helper = flatpak_session_helper_skeleton_new ();

flatpak_session_helper_set_version (FLATPAK_SESSION_HELPER (helper), 1);

g_signal_connect (helper, "handle-request-monitor", G_CALLBACK (handle_request_monitor), NULL);

if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (helper),
Expand All @@ -371,6 +374,7 @@ on_bus_acquired (GDBusConnection *connection,
}

devel = flatpak_development_skeleton_new ();
flatpak_development_set_version (FLATPAK_DEVELOPMENT (devel), 1);
g_signal_connect (devel, "handle-host-command", G_CALLBACK (handle_host_command), NULL);
g_signal_connect (devel, "handle-host-command-signal", G_CALLBACK (handle_host_command_signal), NULL);

Expand Down
2 changes: 2 additions & 0 deletions system-helper/flatpak-system-helper.c
Expand Up @@ -922,6 +922,8 @@ on_bus_acquired (GDBusConnection *connection,

helper = flatpak_system_helper_skeleton_new ();

flatpak_system_helper_set_version (FLATPAK_SYSTEM_HELPER (helper), 1);

g_object_set_data_full (G_OBJECT(helper), "track-alive", GINT_TO_POINTER(42), skeleton_died_cb);

g_dbus_interface_skeleton_set_flags (G_DBUS_INTERFACE_SKELETON (helper),
Expand Down

0 comments on commit bda7575

Please sign in to comment.