Plasma-workspace

kdisplaymanager.h
1/*
2 SPDX-FileCopyrightText: 2004, 2005 Oswald Buddenhagen <ossi@kde.org>
3 SPDX-FileCopyrightText: 2005 Stephan Kulow <coolo@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "kworkspace.h"
11#include "kworkspace_export.h"
12#include <QByteArray>
13#include <QList>
14#include <QString>
15
16struct KWORKSPACE_EXPORT SessEnt {
17 QString display, from, user, session;
18 int vt;
19 bool self : 1, tty : 1;
20};
21
23
24class KWORKSPACE_EXPORT KDisplayManager
25{
26public:
27 KDisplayManager();
28 ~KDisplayManager();
29
30 bool canShutdown();
31 void shutdown(KWorkSpace::ShutdownType shutdownType, KWorkSpace::ShutdownMode shutdownMode, const QString &bootOption = QString());
32
33 bool isSwitchable();
34 int numReserve();
35 void startReserve();
36 bool localSessions(SessList &list);
37 bool switchVT(int vt);
38 void lockSwitchVT(int vt);
39
40 bool bootOptions(QStringList &opts, int &dflt, int &curr);
41
42 static QString sess2Str(const SessEnt &se);
43 static void sess2Str2(const SessEnt &se, QString &user, QString &loc);
44
45private:
46 bool exec(const char *cmd, QByteArray &ret);
47 bool exec(const char *cmd);
48
49 void GDMAuthenticate();
50
51private:
52 class Private;
53 Private *const d;
54
55}; // class KDisplayManager
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.