| 1 |
/* exported FlatpakSystemBusModel */ |
| 2 |
|
| 3 |
/* sessionBus.js |
| 4 |
* |
| 5 |
* Copyright 2020 Martin Abente Lahaye |
| 6 |
* |
| 7 |
* This program is free software: you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation, either version 3 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
*/ |
| 20 |
|
| 21 |
const {GObject} = imports.gi; |
| 22 |
|
| 23 |
const {FlatpakSessionBusModel} = imports.models.sessionBus; |
| 24 |
|
| 25 |
|
| 26 |
var FlatpakSystemBusModel = GObject.registerClass({ |
| 27 |
GTypeName: 'FlatpakSystemBusModel', |
| 28 |
}, class FlatpakSystemBusModel extends FlatpakSessionBusModel { |
| 29 |
_init() { |
| 30 |
super._init({}); |
| 31 |
} |
| 32 |
|
| 33 |
getPermissions() { |
| 34 |
return { |
| 35 |
'system-talk': { |
| 36 |
supported: this._info.supports('0.4.0'), |
| 37 |
description: _('Talks'), |
| 38 |
option: 'talk', |
| 39 |
value: this.constructor.getDefault(), |
| 40 |
example: 'e.g. org.freedesktop.Accounts', |
| 41 |
}, |
| 42 |
'system-own': { |
| 43 |
supported: this._info.supports('0.4.0'), |
| 44 |
description: _('Owns'), |
| 45 |
option: 'own', |
| 46 |
value: this.constructor.getDefault(), |
| 47 |
example: 'e.g. org.freedesktop.GeoClue2', |
| 48 |
}, |
| 49 |
}; |
| 50 |
} |
| 51 |
|
| 52 |
static getGroup() { |
| 53 |
return 'System Bus Policy'; |
| 54 |
} |
| 55 |
|
| 56 |
static getKey() { |
| 57 |
return null; |
| 58 |
} |
| 59 |
|
| 60 |
static getPrefix() { |
| 61 |
return 'system'; |
| 62 |
} |
| 63 |
|
| 64 |
static getStyle() { |
| 65 |
return 'system'; |
| 66 |
} |
| 67 |
|
| 68 |
static getTitle() { |
| 69 |
return 'System Bus'; |
| 70 |
} |
| 71 |
|
| 72 |
static getDescription() { |
| 73 |
return _('List of well-known names on the system bus'); |
| 74 |
} |
| 75 |
}); |