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