epoc32/include/mw/aknkeylock.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mw/aknkeylock.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,114 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  Avkon keylock client class definition.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef __AKNKEYLOCK_H__
    1.23 +#define __AKNKEYLOCK_H__
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <AknNotifyStd.h>
    1.27 +
    1.28 +/**
    1.29 + * A handle class API disabling/enabling keylock state. 
    1.30 + *
    1.31 + * @lib avkon.lib
    1.32 + * @since S60 0.9
    1.33 + */
    1.34 +class RAknKeyLock : public RNotifier
    1.35 +    {
    1.36 +public:
    1.37 +    /**
    1.38 +     * Locks the keys of the device and shows a keys locked note.
    1.39 +     */
    1.40 +    IMPORT_C void EnableKeyLock();
    1.41 +
    1.42 +    /**
    1.43 +     * Unlocks the keys of the device and shows a keys unlocked note.
    1.44 +     */  
    1.45 +    IMPORT_C void DisableKeyLock();
    1.46 +
    1.47 +    /**
    1.48 +     * Returns whether the phone keys have been locked or not.
    1.49 +     *
    1.50 +     * @return ETrue if the keys have been locked normally or the phone is in 
    1.51 +     *         autolock state.
    1.52 +     */
    1.53 +    IMPORT_C TBool IsKeyLockEnabled();
    1.54 +
    1.55 +    /**
    1.56 +     * Controls whether soft notifications will be shown at all.
    1.57 +     *
    1.58 +     * @param ETrue if soft notifications should be shown.
    1.59 +     */  
    1.60 +    IMPORT_C void EnableSoftNotifications(TBool aEnable);
    1.61 +
    1.62 +    /**
    1.63 +     * Shows a note on the screen asking the user permission to lock the keypad.
    1.64 +     */
    1.65 +    IMPORT_C void OfferKeyLock();
    1.66 +    
    1.67 +    /**
    1.68 +     * All notifications queued to be shown are cancelled.
    1.69 +     */
    1.70 +    IMPORT_C void CancelAllNotifications();
    1.71 +    
    1.72 +    /**
    1.73 +     * Locks the device keys similar to autolock/device lock state.
    1.74 +     *
    1.75 +     * @internal
    1.76 +     * @since S60 2.0  
    1.77 +     */
    1.78 +    IMPORT_C void EnableAutoLockEmulation();
    1.79 +    
    1.80 +    /**
    1.81 +     * Unlocks the keys of the device without showing the keys unlocked note.
    1.82 +     *
    1.83 +     * @since S60 2.0     
    1.84 +     */
    1.85 +    IMPORT_C void DisableWithoutNote();
    1.86 +    
    1.87 +    /**
    1.88 +     * Locks the keys of the device without showing the keys locked note.
    1.89 +     *
    1.90 +     * @since S60 2.1     
    1.91 +     */
    1.92 +    IMPORT_C void EnableWithoutNote();
    1.93 +    
    1.94 +private:
    1.95 +    void SendMessage(TKeyLockNotifierReason aMessage);
    1.96 +    };
    1.97 +
    1.98 +/**
    1.99 + * Direct client to AknCapServer. 
   1.100 + *
   1.101 + * @lib avkon.lib
   1.102 + * @since S60 3.0
   1.103 + */
   1.104 +class RAknKeylock2 : public RAknKeyLock
   1.105 +    {
   1.106 +public:
   1.107 +    /**
   1.108 +     * Connects to the AknCapServer.
   1.109 +     *
   1.110 +     * @return KErrNone if connection was successful, KErrNotSupported if 
   1.111 +     *         CCoeEnv is not accessible. Other system wide error codes are 
   1.112 +     *         also possible in error situations.
   1.113 +     */
   1.114 +    IMPORT_C TInt Connect();
   1.115 +    };
   1.116 +
   1.117 +#endif // __AKNKEYLOCK_H__