LoginManager: Add canRebootToBootLoaderMenu and setRebootToBootLoaderMenu methods
Add wrappers for the new logind Manager CanRebootToBootLoaderMenu and SetRebootToBootLoaderMenu dbus methods. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/199
This commit is contained in:

committed by
Florian Müllner

parent
a96c8d91b5
commit
2af7264cff
@ -158,6 +158,23 @@ var LoginManagerSystemd = class {
|
||||
});
|
||||
}
|
||||
|
||||
canRebootToBootLoaderMenu(asyncCallback) {
|
||||
this._proxy.CanRebootToBootLoaderMenuRemote((result, error) => {
|
||||
if (error) {
|
||||
asyncCallback(false, false);
|
||||
} else {
|
||||
const needsAuth = result[0] === 'challenge';
|
||||
const canRebootToBootLoaderMenu = needsAuth || result[0] === 'yes';
|
||||
asyncCallback(canRebootToBootLoaderMenu, needsAuth);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setRebootToBootLoaderMenu() {
|
||||
/* Parameter is timeout in usec, show to menu for 60 seconds */
|
||||
this._proxy.SetRebootToBootLoaderMenuRemote(60000000);
|
||||
}
|
||||
|
||||
listSessions(asyncCallback) {
|
||||
this._proxy.ListSessionsRemote((result, error) => {
|
||||
if (error)
|
||||
@ -203,6 +220,13 @@ var LoginManagerDummy = class {
|
||||
asyncCallback(false, false);
|
||||
}
|
||||
|
||||
canRebootToBootLoaderMenu(asyncCallback) {
|
||||
asyncCallback(false, false);
|
||||
}
|
||||
|
||||
setRebootToBootLoaderMenu() {
|
||||
}
|
||||
|
||||
listSessions(asyncCallback) {
|
||||
asyncCallback([]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user