windowing/windowserver/nga/SERVER/password.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // CWsPassword Class definitions
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __PASSWORD_H__
       
    19 #define __PASSWORD_H__
       
    20 
       
    21 #include "server.h"
       
    22 
       
    23 class CWsPassword
       
    24 	{
       
    25 private:
       
    26 	enum {EPasswordMidnightOffset=4};	// Hours past midnight to trigger next days password
       
    27 public:
       
    28 	static void WindowDestroyed(CWsClientWindow *aWindow);
       
    29 	static void SetPasswordWindowL(CWsClientWindow *aWindow, TPasswordMode aPasswordMode);
       
    30 	static inline CWsClientWindow *PasswordWindow();
       
    31 	static inline TBool PasswordModeActive();
       
    32 	static void SwitchOn();
       
    33 	static void PasswordEntered(CWsClient *aClient);
       
    34 private:
       
    35 	static void CancelPasswordWindow();
       
    36 	static TInt Day();
       
    37 private:
       
    38 	static TBool iPasswordModeActive;
       
    39 	static TPasswordMode iPasswordMode;
       
    40 	static CWsClientWindow *iPasswordWindow;
       
    41 	static TInt iPrevPasswordDay;
       
    42 	};
       
    43 
       
    44 inline TBool CWsPassword::PasswordModeActive()
       
    45 	{
       
    46 	return iPasswordModeActive;
       
    47 	}
       
    48 	
       
    49 inline CWsClientWindow *CWsPassword::PasswordWindow()
       
    50 	{
       
    51 	return iPasswordWindow;
       
    52 	}
       
    53 
       
    54 #endif