Go to the documentation of this file.00001
00033 #ifndef QMLOCKS_H
00034 #define QMLOCKS_H
00035 #include "system_global.h"
00036 #include <QtCore/qobject.h>
00037
00038 QT_BEGIN_HEADER
00039
00040 namespace MeeGo {
00041
00042 class QmLocksPrivate;
00043
00049 class MEEGO_SYSTEM_EXPORT QmLocks : public QObject
00050 {
00051 Q_OBJECT
00052 Q_ENUMS(Lock)
00053 Q_ENUMS(State)
00054
00055 public:
00057 enum Lock
00058 {
00063 Device = 0,
00067 TouchAndKeyboard
00068 };
00069
00071 enum State
00072 {
00076 Unlocked = 0,
00080 Locked,
00084 Unknown
00085 };
00086
00087 public:
00088 QmLocks(QObject *parent = 0);
00089 ~QmLocks();
00090
00099 QmLocks::State getState(QmLocks::Lock what) const;
00100
00109 QmLocks::State getStateAsync(QmLocks::Lock what) const;
00110
00119 bool setState(QmLocks::Lock what, QmLocks::State how);
00120
00129 bool setDeviceAutolockTime(int seconds);
00130
00136 int getDeviceAutolockTime();
00137
00138 Q_SIGNALS:
00144 void stateChanged(MeeGo::QmLocks::Lock what, MeeGo::QmLocks::State how);
00145
00146 protected:
00147 void connectNotify(const char *signal);
00148 void disconnectNotify(const char *signal);
00149
00150 private:
00151 Q_DISABLE_COPY(QmLocks)
00152 MEEGO_DECLARE_PRIVATE(QmLocks)
00153 };
00154
00155 }
00156
00157 QT_END_HEADER
00158
00159 #endif
00160
00161