codhandler/codui/inc/CodWaitDialog.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 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 the License "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:  Declaration of class CCodWaitDialog.   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef COD_WAIT_DIALOG_H
       
    20 #define COD_WAIT_DIALOG_H
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <AknWaitDialog.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 * Mixin protocol for handling commands for wait dialog.
       
    30 */
       
    31 class MCodDialogCommandObserver
       
    32     {
       
    33     public:     // new methods
       
    34 
       
    35         /**
       
    36         * Handle dialog command.
       
    37         * @param aCommand Dialog command id.
       
    38         */
       
    39         virtual void HandleDialogCommandL( TInt aCommand ) = 0;
       
    40 
       
    41     };
       
    42 
       
    43 /**
       
    44 * A dialog which forwards dialog commands to its observer.
       
    45 */
       
    46 NONSHARABLE_CLASS( CCodWaitDialog ): public CAknWaitDialog
       
    47     {
       
    48     public:     // construction
       
    49 
       
    50         /**
       
    51         * Constructor.
       
    52         * @param aSelfPtr Self pointer.
       
    53         * @param aObserver Commands arriving to the dialog are forwarded
       
    54         * to this observer.
       
    55         */
       
    56         CCodWaitDialog
       
    57             ( CEikDialog** aSelfPtr, MCodDialogCommandObserver& aObserver );
       
    58 
       
    59     public:     // new methods
       
    60 
       
    61         /**
       
    62         * Set text from resource.
       
    63         * @param aResourceId Resource id (RESOURCE TBUF).
       
    64         */
       
    65         void SetTextL( TInt aResourceId );
       
    66 
       
    67     protected:  // from CAknNoteDialog (CEikDialog)
       
    68 
       
    69         /**
       
    70         * Handle key event.
       
    71         * @param aKeyEvent Key event.
       
    72         * @param aType Event type.
       
    73         * @return Key response.
       
    74         */
       
    75         TKeyResponse OfferKeyEventL
       
    76             ( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    77 
       
    78         /**
       
    79         * Handle button press (forward to observer).
       
    80         * @param Id of button pressed.
       
    81         * @return Always EFalse - delete the dialog to dismiss it.
       
    82         */
       
    83         TBool OkToExitL( TInt aButtonId );
       
    84 
       
    85     private:    // data
       
    86 
       
    87         MCodDialogCommandObserver* iObserver;   ///< Command observer.
       
    88 
       
    89     };
       
    90 
       
    91 #endif /* def COD_WAIT_DIALOG_H */