|
1 /* |
|
2 * Copyright (c) 2002-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: A command for launching phonebook info dialog |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPBK2INFODIALOGCMD_H |
|
21 #define CPBK2INFODIALOGCMD_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <MPbk2Command.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPbk2ContactUiControl; |
|
29 class CVPbkContactStoreUriArray; |
|
30 class MPbk2CommandObserver; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * A command for launching phonebook info dialog |
|
36 */ |
|
37 NONSHARABLE_CLASS(CPbk2InfoDialogCmd) : |
|
38 public CActive, |
|
39 public MPbk2Command |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aUiControl ui control |
|
45 * @return a new instance of this class |
|
46 */ |
|
47 static CPbk2InfoDialogCmd* NewL( |
|
48 MPbk2ContactUiControl& aUiControl); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CPbk2InfoDialogCmd(); |
|
54 |
|
55 public: // From MPbk2Command. |
|
56 void ExecuteLD(); |
|
57 void AddObserver(MPbk2CommandObserver& aObserver); |
|
58 void ResetUiControl(MPbk2ContactUiControl& aUiControl); |
|
59 |
|
60 private: // From CActive |
|
61 void RunL(); |
|
62 void DoCancel(); |
|
63 TInt RunError(TInt aError); |
|
64 |
|
65 private: // implementation |
|
66 CPbk2InfoDialogCmd(MPbk2ContactUiControl& aUiControl); |
|
67 void ConstructL(); |
|
68 void IssueRequest(); |
|
69 void QueryL(); |
|
70 void LaunchDialogL(); |
|
71 void HandleError(TInt aError); |
|
72 |
|
73 private: // Data |
|
74 /// Own: Currently valid stores |
|
75 CVPbkContactStoreUriArray* iValidStores; |
|
76 /// Ref: Observer for the command |
|
77 MPbk2CommandObserver* iCommandObserver; |
|
78 /// Own: State of the active object |
|
79 TInt iState; |
|
80 }; |
|
81 |
|
82 #endif // CPBK2INFODIALOGCMD_H |
|
83 |
|
84 // End of File |