#ifndef __LOGIN1_DBUS_H__
#define __LOGIN1_DBUS_H__
#include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusConnectionInterface>
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusReply>
#include <QCoreApplication>
#include <QDBusInterface>
#include <QTime>
#include <QDBusUnixFileDescriptor>
class login1dbusManager: public QObject
{
    Q_OBJECT
public:
    enum INHIBIT_TYPE
    {
        INHIBIT_SLEEP = 0,
        INHIBIT_SHUTDOWN = 1
    };
    login1dbusManager();
    ~login1dbusManager();
public:
    bool inhibit(INHIBIT_TYPE type);
    void unInhibit();
Q_SIGNALS:
    void goingToSleep(bool in);
    void shuttingDown();
    void locking(bool in);
    void changeUserLocking(bool);
private slots:
    void login1PrepareForSleep(bool);
    void login1PrepareForShutdown(bool);
    void screenSaverLocked();
    void screenSaverUnlocked();
    void changeUserLock();
    void changeUserUnLock();
private:
    QDBusUnixFileDescriptor m_inhibitShutdownFD;
    QDBusUnixFileDescriptor m_inhibitSleepFD;
};
#endif
