File indexing completed on 2024-10-13 03:42:25
0001 /* 0002 SPDX-FileCopyrightText: 2014 Alejandro Fiestas Olivares <afiestas@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SOLID_FAKE_LOGIND_H 0008 #define SOLID_FAKE_LOGIND_H 0009 0010 #include <QDBusObjectPath> 0011 #include <QDBusUnixFileDescriptor> 0012 #include <QString> 0013 0014 class FakeLogind : public QObject 0015 { 0016 Q_OBJECT 0017 Q_CLASSINFO("D-Bus Interface", "org.freedesktop.login1.Manager") 0018 public: 0019 explicit FakeLogind(QObject *parent); 0020 0021 public Q_SLOTS: 0022 QDBusUnixFileDescriptor Inhibit(const QString &what, const QString &who, const QString &why, const QString &mode); 0023 0024 void checkFd(); 0025 0026 Q_SIGNALS: 0027 void inhibitionRemoved(); 0028 void newInhibition(const QString &what, const QString &who, const QString &why, const QString &mode); 0029 0030 private: 0031 int m_fd; 0032 }; 0033 0034 #endif // SOLID_FAKE_LOGIND_H