![]() |
Home · All Namespaces · All Classes |
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 00004 ** All rights reserved. 00005 ** Contact: Nokia Corporation (directui@nokia.com) 00006 ** 00007 ** This file is part of systemui. 00008 ** 00009 ** If you have questions regarding the use of this file, please contact 00010 ** Nokia at directui@nokia.com. 00011 ** 00012 ** This library is free software; you can redistribute it and/or 00013 ** modify it under the terms of the GNU Lesser General Public 00014 ** License version 2.1 as published by the Free Software Foundation 00015 ** and appearing in the file LICENSE.LGPL included in the packaging 00016 ** of this file. 00017 ** 00018 ****************************************************************************/ 00019 #ifndef SCREENLOCKBUSINESSLOGIC_H 00020 #define SCREENLOCKBUSINESSLOGIC_H 00021 00022 #include <QObject> 00023 00024 #ifdef HAVE_QMSYSTEM 00025 #include <qmdisplaystate.h> 00026 #include <qmsystemstate.h> 00027 #endif 00028 00029 class ScreenLockWindow; 00030 class EventEater; 00031 class MApplicationExtensionArea; 00032 class MApplicationExtensionInterface; 00033 class ScreenLockExtensionInterface; 00034 class QDBusInterface; 00035 00040 class ScreenLockBusinessLogic : public QObject 00041 { 00042 Q_OBJECT 00043 00044 public: 00050 ScreenLockBusinessLogic(QObject *parent = NULL); 00051 00055 virtual ~ScreenLockBusinessLogic(); 00056 00068 int tklock_open(const QString &service, const QString &path, const QString &interface, const QString &method, uint mode, bool silent, bool flicker); 00069 00075 int tklock_close(bool silent); 00076 00082 bool isScreenLocked() const; 00083 00084 public slots: 00086 void unlockScreen(); 00087 00088 private slots: 00090 void toggleScreenLockUI(bool toggle); 00091 00093 void toggleEventEater(bool toggle); 00094 00096 void registerExtension(MApplicationExtensionInterface *extension); 00097 00099 void unregisterExtension(MApplicationExtensionInterface *extension); 00100 00102 void reset(); 00103 00105 void showScreenLock(); 00106 00108 void showLowPowerMode(); 00109 00111 void setDisplayOffMode(); 00112 00114 void hideScreenLockAndEventEater(); 00115 00117 void showEventEater(); 00118 00120 void hideEventEater(); 00121 00122 #ifdef HAVE_QMSYSTEM 00123 00124 void displayStateChanged(MeeGo::QmDisplayState::DisplayState state); 00125 00127 void systemStateChanged(MeeGo::QmSystemState::StateIndication what); 00128 #endif 00129 00130 signals: 00132 void screenIsLocked(bool locked); 00133 00134 private: 00135 enum TkLockReply { 00136 TkLockReplyFailed = 0, 00137 TkLockReplyOk 00138 }; 00139 00140 enum TkLockMode { 00141 TkLockModeNone, // Deprecated 00142 TkLockModeEnable, // Show the lock UI in lock mode 00143 TkLockModeHelp, // Deprecated 00144 TkLockModeSelect, // Deprecated 00145 TkLockModeOneInput, // Turn the event eater on 00146 TkLockEnableVisual, // Show unlock UI 00147 TkLockEnableLowPowerMode, // Show low power UI 00148 TkLockRealBlankMode // Display completely off 00149 }; 00150 00151 enum TkLockStatus { 00152 TkLockUnlock = 1, 00153 TkLockRetry, 00154 TkLockTimeout, 00155 TkLockClosed 00156 }; 00157 00159 void ensureScreenLockWindowExists(); 00160 00162 ScreenLockWindow *screenLockWindow; 00163 00165 EventEater *eventEaterWindow; 00166 00168 MApplicationExtensionArea *extensionArea; 00169 00171 QList<ScreenLockExtensionInterface *> screenLockExtensions; 00172 00174 QDBusInterface *callbackInterface; 00175 00177 QString callbackMethod; 00178 00180 bool shuttingDown; 00181 00182 #ifdef HAVE_QMSYSTEM 00183 00184 MeeGo::QmDisplayState displayState; 00185 00187 MeeGo::QmSystemState systemState; 00188 #endif 00189 00190 #ifdef UNIT_TEST 00191 friend class Ut_ScreenLockBusinessLogic; 00192 friend class Ft_LockScreenBusinessLogic; 00193 #endif 00194 }; 00195 00196 #endif
Copyright © 2011 Nokia Corporation | Generated on Tue Aug 30 2011 16:38:12 Doxygen 1.7.1 |
MeeGo Touch |