2017-03-19 10:37:15 -04:00
|
|
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
2023-07-10 05:53:00 -04:00
|
|
|
import Gio from 'gi://Gio';
|
2017-03-19 10:37:15 -04:00
|
|
|
|
2023-07-10 05:53:00 -04:00
|
|
|
import {loadInterfaceXML} from './fileUtils.js';
|
2017-03-19 10:37:15 -04:00
|
|
|
|
2018-09-05 20:55:20 -04:00
|
|
|
const PermissionStoreIface = loadInterfaceXML('org.freedesktop.impl.portal.PermissionStore');
|
2017-03-19 10:37:15 -04:00
|
|
|
const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface);
|
|
|
|
|
2023-07-30 08:56:59 -04:00
|
|
|
/**
|
|
|
|
* @param {Function} initCallback
|
|
|
|
* @param {Gio.Cancellable} cancellable
|
|
|
|
* @returns {Gio.DBusProxy}
|
|
|
|
*/
|
2023-07-10 05:53:00 -04:00
|
|
|
export function PermissionStore(initCallback, cancellable) {
|
2017-03-19 10:37:15 -04:00
|
|
|
return new PermissionStoreProxy(Gio.DBus.session,
|
2023-08-06 19:45:22 -04:00
|
|
|
'org.freedesktop.impl.portal.PermissionStore',
|
|
|
|
'/org/freedesktop/impl/portal/PermissionStore',
|
|
|
|
initCallback, cancellable);
|
2019-01-28 20:18:52 -05:00
|
|
|
}
|