connectionutilities/ConnectionDialogs/ConnectionUiUtilities/NotifInc/ConfirmationQuery.h
branchRCL_3
changeset 25 83ca720e2b9a
equal deleted inserted replaced
24:05bc53fe583b 25:83ca720e2b9a
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Implementation of class CConfirmationQuery.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CONFIRMATION_QUERY_H__
       
    20 #define __CONFIRMATION_QUERY_H__
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknmessagequerydialog.h>
       
    24 #include <ConnectionUiUtilities.h>
       
    25 #include "ExpiryTimerCallback.h"
       
    26 // FORWARD DECLARATIONS
       
    27 class CConfirmationQueryNotif;
       
    28 class CExpiryTimer;
       
    29 
       
    30 // CLASS DECLARATIONS
       
    31 
       
    32 /**
       
    33  * Class implements a query dialog in home network.
       
    34  */
       
    35 NONSHARABLE_CLASS( CConfirmationQuery ) : public CAknListQueryDialog, public MExpiryTimerCallback
       
    36     {
       
    37     public:
       
    38         /**
       
    39         * Constructor the CConfirmationQuery class
       
    40         * @param aNotif notifier pointer
       
    41         * @param aNameOfConnMethod 
       
    42         * @param aUIId    
       
    43         * @return -
       
    44         */
       
    45         CConfirmationQuery( CConfirmationQueryNotif* aNotif );
       
    46 
       
    47         /**
       
    48         * Exit function the CConfirmationQuery
       
    49         * @param aButtonId 
       
    50         * @return TBool exit or no
       
    51         */
       
    52         virtual TBool OkToExitL( TInt aButtonId );
       
    53     
       
    54         /**
       
    55         * Dialog expiration timeout callback
       
    56         */
       
    57         void HandleTimedOut();
       
    58         
       
    59         /**
       
    60         * Destructor
       
    61         */
       
    62         virtual ~CConfirmationQuery();     
       
    63 
       
    64         /**
       
    65         * Tries to exit the dialog when the specified button is pressed, if this 
       
    66         * button should exit the dialog.
       
    67         *
       
    68         * See @c OkToExitL() to determine which buttons can exit the dialog.
       
    69         * 
       
    70         * This will fail if user exit is prevented by the 
       
    71         * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag
       
    72         * is not set and the dialog has been cancelled it immediately deletes 
       
    73         * itself.
       
    74         * 
       
    75         * @param aButtonId The id of the pressed button.
       
    76         */
       
    77         void TryExitL( TInt aButtonId );
       
    78         
       
    79         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
       
    80                                      TEventCode aType);
       
    81         
       
    82         /**
       
    83         * Sets the available choices for the query into the class variable
       
    84         * @param    aChoices RArray<TInt>
       
    85         */
       
    86         void SetChoices( RArray<TMsgQueryLinkedResults> aChoices );
       
    87 
       
    88     private:
       
    89         /**
       
    90         * PreLayoutDynInitL
       
    91         * @param    -
       
    92         */
       
    93         virtual void PreLayoutDynInitL();    
       
    94 
       
    95     private:
       
    96         CConfirmationQueryNotif* iNotif;  // Pointer to the Notifier, not owned
       
    97         TBool iButtonGroupPreviouslyChanged;    // Was ButtonGroup modified?
       
    98         
       
    99         RArray<TMsgQueryLinkedResults> iChoiceIds;
       
   100         // For base class, unused.
       
   101         TInt iDummy;
       
   102 		
       
   103         // Pointer for dialog expiration timer
       
   104         CExpiryTimer* iExpiryTimer;
       
   105     };
       
   106 
       
   107 
       
   108 /**
       
   109  * Class implements a query dialog in visitor network.
       
   110  */
       
   111 NONSHARABLE_CLASS( CConfirmationQueryVisitor ) : public CAknMessageQueryDialog, public MExpiryTimerCallback
       
   112     {
       
   113     public:
       
   114         /**
       
   115         * Constructor the CConfirmationQuery class
       
   116         * @param aNotif notifier pointer
       
   117         * @param aNameOfConnMethod 
       
   118         * @param aUIId    
       
   119         * @return -
       
   120         */
       
   121         CConfirmationQueryVisitor( CConfirmationQueryNotif* aNotif );
       
   122 
       
   123         /**
       
   124         * Exit function the CConfirmationQuery
       
   125         * @param aButtonId 
       
   126         * @return TBool exit or no
       
   127         */
       
   128         virtual TBool OkToExitL( TInt aButtonId );
       
   129     
       
   130         /**
       
   131         * Dialog expiration timeout callback
       
   132         */
       
   133         void HandleTimedOut();
       
   134         
       
   135         /**
       
   136         * Destructor
       
   137         */
       
   138         virtual ~CConfirmationQueryVisitor();     
       
   139 
       
   140         /**
       
   141         * Tries to exit the dialog when the specified button is pressed, if this 
       
   142         * button should exit the dialog.
       
   143         *
       
   144         * See @c OkToExitL() to determine which buttons can exit the dialog.
       
   145         * 
       
   146         * This will fail if user exit is prevented by the 
       
   147         * @c EEikDialogFlagNoUserExit flag. If the @c EEikDialogFlagNotifyEsc flag
       
   148         * is not set and the dialog has been cancelled it immediately deletes 
       
   149         * itself.
       
   150         * 
       
   151         * @param aButtonId The id of the pressed button.
       
   152         */
       
   153         void TryExitL( TInt aButtonId );
       
   154         
       
   155         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
       
   156                                      TEventCode aType);
       
   157         
       
   158 
       
   159     private:
       
   160         /**
       
   161         * PreLayoutDynInitL
       
   162         * @param    -
       
   163         */
       
   164         virtual void PreLayoutDynInitL();    
       
   165 
       
   166     private:
       
   167         CConfirmationQueryNotif* iNotif;  // Pointer to the Notifier, not owned
       
   168                 
       
   169         // Pointer for dialog expiration timer
       
   170         CExpiryTimer* iExpiryTimer;
       
   171     };
       
   172 
       
   173 
       
   174 #endif  // __CONFIRMATION_QUERY_H__
       
   175 
       
   176 // End of File