|
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 contact editor dialog extension. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPMAPCONTACTEDITOREXTENSION_H |
|
19 #define CPMAPCONTACTEDITOREXTENSION_H |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32base.h> |
|
23 #include <MPbk2ContactEditorExtension.h> |
|
24 #include <MPbk2ContactEditorExtensionExtension.h> |
|
25 #include <Pbk2FieldProperty.hrh> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CEikMenuPane; |
|
29 class CVPbkContactManager; |
|
30 class MPbk2ContactEditorControl; |
|
31 class MPbk2ContactEditorUIField; |
|
32 class MPbk2UIField; |
|
33 class MPbk2Command; |
|
34 // CLASS DECLARATION |
|
35 class CPmapContactEditorExtension : public CBase, |
|
36 public MPbk2ContactEditorExtension, |
|
37 public MPbk2ContactEditorExtensionExtension |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Creates a new instance of this class. |
|
42 * |
|
43 * @param aContactManager Virtual Phonebook contact manager. |
|
44 * @param aContact The contact being edited. |
|
45 * @param aEditorControl Contact editor control. |
|
46 * @return A new instance of this class. |
|
47 */ |
|
48 static CPmapContactEditorExtension* NewL( |
|
49 CVPbkContactManager& aContactManager, |
|
50 MVPbkStoreContact& aContact, |
|
51 MPbk2ContactEditorControl& aEditorControl ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CPmapContactEditorExtension(); |
|
57 |
|
58 public: // From MPbk2ContactEditorExtension |
|
59 MPbk2ContactEditorField* CreateEditorFieldL( |
|
60 MVPbkStoreContactField& aField, |
|
61 const MPbk2FieldProperty& aFieldProperty, |
|
62 MPbk2ContactEditorUiBuilder& aUiBuilder, |
|
63 CPbk2IconInfoContainer& aIconInfoContainer ); |
|
64 |
|
65 MPbk2ContactEditorUIField* CreateFieldLC( |
|
66 MPbk2UIField& aField, |
|
67 TInt aCustomPosition, |
|
68 MPbk2ContactEditorUiBuilder& aUiBuilder, |
|
69 const TDesC& aCustomText, CPbk2IconInfoContainer& aIconInfoContainer ); |
|
70 |
|
71 void DynInitMenuPaneL( |
|
72 TInt aResourceId, |
|
73 CEikMenuPane* aMenuPane ); |
|
74 TBool ProcessCommandL( |
|
75 TInt aCommandId ); |
|
76 TBool OkToDeleteContactL( |
|
77 MPbk2ContactEditorEventObserver::TParams& aParams ); |
|
78 TBool OkToSaveContactL( |
|
79 MPbk2ContactEditorEventObserver::TParams& aParams ); |
|
80 void ModifyButtonGroupContainerL( |
|
81 CEikButtonGroupContainer& aButtonGroupContainer ); |
|
82 void DoRelease(); |
|
83 void ContactEditorOperationCompleted( |
|
84 MVPbkContactObserver::TContactOpResult aResult, |
|
85 TParams aParams ); |
|
86 void ContactEditorOperationFailed( |
|
87 MVPbkContactObserver::TContactOp aOpCode, |
|
88 TInt aErrorCode, |
|
89 TParams aParams, |
|
90 TFailParams& aFailParams ); |
|
91 TAny* ContactEditorExtensionExtension( |
|
92 TUid /*aExtensionUid*/ ); |
|
93 |
|
94 private: // Implementation |
|
95 CPmapContactEditorExtension( |
|
96 CVPbkContactManager& aContactManager, |
|
97 MVPbkStoreContact& aContact, |
|
98 MPbk2ContactEditorControl& aEditorControl ); |
|
99 void ConstructL(); |
|
100 |
|
101 private: // Data types |
|
102 |
|
103 private: // Data |
|
104 /// Ref: Virtual Phonebook contact manager |
|
105 CVPbkContactManager& iContactManager; |
|
106 /// Ref: The edited contact |
|
107 MVPbkStoreContact& iContact; |
|
108 /// Ref: Contact editor control |
|
109 MPbk2ContactEditorControl& iEditorControl; |
|
110 /// Own: Map command controller |
|
111 MPbk2Command* iCmd; |
|
112 }; |
|
113 |
|
114 #endif // CPMAPCONTACTEDITOREXTENSION_H |
|
115 |
|
116 // End of File |