|
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 create new group command object. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPGUCREATENEWGROUPCMD_H |
|
20 #define CPGUCREATENEWGROUPCMD_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "MPbk2Command.h" |
|
25 #include <MVPbkContactObserver.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPbk2ContactUiControl; |
|
29 class MVPbkContactGroup; |
|
30 class MVPbkContactStore; |
|
31 class MVPbkContactViewBase; |
|
32 class CPbk2InputAbsorber; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * Phonebook 2 create new group command object. |
|
38 */ |
|
39 class CPguCreateNewGroupCmd : public CBase, |
|
40 public MPbk2Command, |
|
41 private MVPbkContactObserver |
|
42 { |
|
43 public: // Construction and destruction |
|
44 |
|
45 /** |
|
46 * Creates a new instance of this class. |
|
47 * |
|
48 * @param aUiControl Contact UI control. |
|
49 * @return A new instance of this class. |
|
50 */ |
|
51 static CPguCreateNewGroupCmd* NewL( |
|
52 MPbk2ContactUiControl& aUiControl ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CPguCreateNewGroupCmd(); |
|
58 |
|
59 public: // From MPbk2Command |
|
60 void ExecuteLD(); |
|
61 void AddObserver( |
|
62 MPbk2CommandObserver& aObserver ); |
|
63 void ResetUiControl( |
|
64 MPbk2ContactUiControl& aUiControl ); |
|
65 |
|
66 public: // From MVPbkContactObserver |
|
67 void ContactOperationCompleted( |
|
68 TContactOpResult aResult ); |
|
69 void ContactOperationFailed( |
|
70 TContactOp aOpCode, |
|
71 TInt aErrorCode, |
|
72 TBool aErrorNotified ); |
|
73 |
|
74 private: // Implementation |
|
75 CPguCreateNewGroupCmd( |
|
76 MPbk2ContactUiControl& aUiControl ); |
|
77 void ConstructL(); |
|
78 void AddNewGroupL(); |
|
79 void CheckDefaultSavingStorageL(); |
|
80 void FinishCommandL(); |
|
81 |
|
82 private: // Data |
|
83 /// Ref: UI control |
|
84 MPbk2ContactUiControl* iUiControl; |
|
85 /// Ref: Target store |
|
86 MVPbkContactStore* iTargetStore; |
|
87 /// Ref: Command observer |
|
88 MPbk2CommandObserver* iCommandObserver; |
|
89 /// Own: The newly added contact group |
|
90 MVPbkContactGroup* iNewGroup; |
|
91 /// Ref: Groups view |
|
92 MVPbkContactViewBase* iGroupsListView; |
|
93 /// Own: Input absorber |
|
94 CPbk2InputAbsorber* iInputAbsorber; |
|
95 }; |
|
96 |
|
97 #endif // CPGUCREATENEWGROUPCMD_H |
|
98 |
|
99 // End of File |