inc/screensaverengine.h
branchRCL_3
changeset 11 b3594157d381
parent 0 040fcad49f44
child 13 4784a3bc2236
--- a/inc/screensaverengine.h	Fri Mar 12 15:42:50 2010 +0200
+++ b/inc/screensaverengine.h	Mon Mar 15 12:40:37 2010 +0200
@@ -30,6 +30,9 @@
 //delay before wserv timer is turned off
 #define KWSERVHEARTBEATTIMEOUT 15
 
+// Delay after screensaver is stopped and hided.
+const TInt KDefaultScreenSaverTimeout = 2 * 60 * 1000000; // 2 mins
+
 // FORWARD DECLARATIONS
 class CUserActivityManager;
 class CScreensaverSharedDataI;
@@ -126,6 +129,22 @@
     * Updates the indicator attributes.
     */
     void UpdateIndicatorAttributes( );
+
+    /*
+     * Start screensaver expiry timer. When the timer expires the screensaver
+     * will be stopped and hided.
+     * 
+     * @param aTimeout Timeout after the screensaver stops and hides itself in
+     * microseconds. 0 or negative value will disable the timer.
+     */
+    void SetExpiryTimerTimeout( TInt aTimeout );
+
+    
+    /**
+    * Informs the engine about changes in keyguard state
+    * @param aEnabled whether the keyguard is now on or off 
+    */
+    void HandleKeyguardStateChanged( TBool aEnabled );
     
 private:
     
@@ -227,6 +246,10 @@
     */
     TInt DisplayFlag();
 
+    /**
+    * Callback fuction. Called when the screensaver expiry timer time out.
+    */
+    static TInt HandleExpiryTimerExpiry( TAny* aPtr );
 
 private:
     
@@ -295,6 +318,15 @@
     * used to intercept and capture application key event.
     */
     RAknUiServer iAknUiServer;
+
+    /**
+    * The screensaver expiry timer. Screensaver will be stoped when this timer
+    * expires.
+    * 
+    * Owned.
+    */
+    CPeriodic* iExpiryTimer;
+
     };