|
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. |
|
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 TBool NeedToDismissQueryL(const TKeyEvent& aKeyEvent); |
|
80 |
|
81 /** |
|
82 * Sets the available choices for the query into the class variable |
|
83 * @param aChoices RArray<TInt> |
|
84 */ |
|
85 void SetChoices( RArray<TMsgQueryLinkedResults> aChoices ); |
|
86 |
|
87 private: |
|
88 /** |
|
89 * PreLayoutDynInitL |
|
90 * @param - |
|
91 */ |
|
92 virtual void PreLayoutDynInitL(); |
|
93 |
|
94 private: |
|
95 CConfirmationQueryNotif* iNotif; // Pointer to the Notifier, not owned |
|
96 TBool iButtonGroupPreviouslyChanged; // Was ButtonGroup modified? |
|
97 |
|
98 RArray<TMsgQueryLinkedResults> iChoiceIds; |
|
99 // For base class, unused. |
|
100 TInt iDummy; |
|
101 |
|
102 // Pointer for dialog expiration timer |
|
103 CExpiryTimer* iExpiryTimer; |
|
104 }; |
|
105 |
|
106 |
|
107 #endif // __CONFIRMATION_QUERY_H__ |
|
108 |
|
109 // End of File |