phonebookui/Phonebook2/ServerApplication/inc/CPbk2KeyEventDealer.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Phonebook 2 key event dealer.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2KEYEVENTDEALER_H
       
    20 #define CPBK2KEYEVENTDEALER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecntrl.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class MPbk2KeyEventHandler;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31  * Phonebook 2 key event dealer.
       
    32  * Responsible for listening key events and dealing them
       
    33  * to a key event handler. Listens the key events with
       
    34  * higher priority than standard dialogs.
       
    35  */
       
    36 class CPbk2KeyEventDealer : public CCoeControl
       
    37     {
       
    38     public: // Construction and destruction
       
    39 
       
    40         /**
       
    41          * Creates a new instance of this class.
       
    42          *
       
    43          * @param aKeyEventHandler      Handler for the key events.
       
    44          * @return  A new instance of this class.
       
    45          */
       
    46         static CPbk2KeyEventDealer* NewL(
       
    47                 MPbk2KeyEventHandler& aKeyEventHandler );
       
    48 
       
    49         /**
       
    50          * Destructor.
       
    51          */
       
    52         ~CPbk2KeyEventDealer();
       
    53 
       
    54     private: // From CCoeControl
       
    55         TKeyResponse OfferKeyEventL(
       
    56                 const TKeyEvent& aKeyEvent,
       
    57                 TEventCode aType );
       
    58 
       
    59     private: // Implementation
       
    60         CPbk2KeyEventDealer(
       
    61                 MPbk2KeyEventHandler& aKeyEventHandler );
       
    62         void ConstructL();
       
    63 
       
    64     private: // Data
       
    65         /// Ref: Key event handler
       
    66         MPbk2KeyEventHandler& iKeyEventHandler;
       
    67     };
       
    68 
       
    69 #endif // CPBK2KEYEVENTDEALER_H
       
    70 
       
    71 // End of File