2
Copyright (C) 2004,2005 Oswald Buddenhagen <ossi@kde.org>
3
Copyright (C) 2005 Stephan Kulow <coolo@kde.org>
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the Lesser GNU General Public
7
License as published by the Free Software Foundation; either
8
version 2 of the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
General Public License for more details.
15
You should have received a copy of the Lesser GNU General Public License
16
along with this program; see the file COPYING. If not, write to
17
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
Boston, MA 02110-1301, USA.
21
#ifndef KDISPLAYMANAGER_H
22
#define KDISPLAYMANAGER_H
24
#include "kworkspace.h"
25
#include <kdemacros.h>
26
#include <QtCore/QString>
27
#include <QtCore/QList>
28
#include <QtCore/QByteArray>
30
struct KDE_EXPORT SessEnt {
31
QString display, from, user, session;
36
typedef QList<SessEnt> SessList;
38
class KDE_EXPORT KDisplayManager {
47
void shutdown(KWorkSpace::ShutdownType shutdownType,
48
KWorkSpace::ShutdownMode shutdownMode,
49
const QString &bootOption = QString());
51
void setLock(bool on);
56
bool localSessions(SessList &list);
57
bool switchVT(int vt);
58
void lockSwitchVT(int vt);
60
bool bootOptions(QStringList &opts, int &dflt, int &curr);
62
static QString sess2Str(const SessEnt &se);
63
static void sess2Str2(const SessEnt &se, QString &user, QString &loc);
66
bool exec(const char *cmd, QByteArray &ret);
67
bool exec(const char *cmd);
69
void GDMAuthenticate();
76
bool canShutdown() { return false; }
77
void shutdown(KWorkSpace::ShutdownType shutdownType,
78
KWorkSpace::ShutdownMode shutdownMode,
79
const QString &bootOption = QString()) {}
83
bool isSwitchable() { return false; }
84
int numReserve() { return -1; }
85
void startReserve() {}
86
bool localSessions(SessList &list) { return false; }
87
void switchVT(int vt) {}
89
bool bootOptions(QStringList &opts, int &dflt, int &curr);
99
}; // class KDisplayManager
101
#endif // KDISPLAYMANAGER_H