gnome-shell/js/misc/permissionStore.js
Florian Müllner c3428f1efa weather: Follow GNOME Weather's location permissions
Our weather integration should follow GNOME Weather as closely as
possible, which means that we should respect its location permission
rather than using our own or none at all (which we can as a "system"
component and as geoclue's authorization agent).

https://bugzilla.gnome.org/show_bug.cgi?id=780252
2017-03-20 19:13:20 +01:00

38 lines
1.5 KiB
JavaScript

// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Gio = imports.gi.Gio;
const PermissionStoreIface = '<node> \
<interface name="org.freedesktop.impl.portal.PermissionStore"> \
<method name="Lookup"> \
<arg name="table" type="s" direction="in"/> \
<arg name="id" type="s" direction="in"/> \
<arg name="permissions" type="a{sas}" direction="out"/> \
<arg name="data" type="v" direction="out"/> \
</method> \
<method name="Set"> \
<arg name="table" type="s" direction="in"/> \
<arg name="create" type="b" direction="in"/> \
<arg name="id" type="s" direction="in"/> \
<arg name="app_permissions" type="a{sas}" direction="in"/> \
<arg name="data" type="v" direction="in"/> \
</method> \
<signal name="Changed"> \
<arg name="table" type="s" direction="out"/> \
<arg name="id" type="s" direction="out"/> \
<arg name="deleted" type="b" direction="out"/> \
<arg name="data" type="v" direction="out"/> \
<arg name="permissions" type="a{sas}" direction="out"/> \
</signal> \
</interface> \
</node>';
const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface);
function PermissionStore(initCallback, cancellable) {
return new PermissionStoreProxy(Gio.DBus.session,
'org.freedesktop.impl.portal.PermissionStore',
'/org/freedesktop/impl/portal/PermissionStore',
initCallback, cancellable);
};