21 #include <CPbk2UIExtensionPlugin.h> |
21 #include <CPbk2UIExtensionPlugin.h> |
22 #include <Pbk2PluginCommandListerner.h> |
22 #include <Pbk2PluginCommandListerner.h> |
23 |
23 |
24 #include <Pbk2Commands.hrh> |
24 #include <Pbk2Commands.hrh> |
25 #include <MVPbkBaseContact.h> |
25 #include <MVPbkBaseContact.h> |
|
26 #include <MVPbkContactStoreObserver.h> |
26 |
27 |
27 #ifndef NAMESLISTUIEXTENTIONPLUGIN_H |
28 #ifndef NAMESLISTUIEXTENTIONPLUGIN_H |
28 #define NAMESLISTUIEXTENTIONPLUGIN_H |
29 #define NAMESLISTUIEXTENTIONPLUGIN_H |
29 |
30 |
30 // FORWARD DECLARATIONS |
31 // FORWARD DECLARATIONS |
32 class CPbk2AppGlobalsBase; |
33 class CPbk2AppGlobalsBase; |
33 class MPbk2ContactUiControl; |
34 class MPbk2ContactUiControl; |
34 class CPbk2PresentationContact; |
35 class CPbk2PresentationContact; |
35 class MPbk2ContactEditorControl; |
36 class MPbk2ContactEditorControl; |
36 class CAiwServiceHandler; |
37 class CAiwServiceHandler; |
37 class CPbk2NamesListExView; |
38 class CPbk2NamesListExView; |
|
39 class CPbk2ApplicationServices; |
|
40 |
38 // CCA |
41 // CCA |
39 class MCCAConnection; |
42 class MCCAConnection; |
40 class MCCAParameter; |
43 class MCCAParameter; |
41 class CSpbContentProvider; |
44 class CSpbContentProvider; |
42 // CLASS DECLARATION |
45 // CLASS DECLARATION |
44 /** |
47 /** |
45 * Phonebook 2 Names List UI extension plug-in. |
48 * Phonebook 2 Names List UI extension plug-in. |
46 * Creates instances of the extension classes. |
49 * Creates instances of the extension classes. |
47 */ |
50 */ |
48 class CNamesListUIExtensionPlugin : public CPbk2UIExtensionPlugin, |
51 class CNamesListUIExtensionPlugin : public CPbk2UIExtensionPlugin, |
49 public MPbk2PluginCommandListerner |
52 public MPbk2PluginCommandListerner, |
|
53 private MVPbkContactStoreObserver |
50 { |
54 { |
51 public: // Construction and destruction |
55 public: // Construction and destruction |
52 |
56 |
53 /** |
57 /** |
54 * Creates a new instance of this class. |
58 * Creates a new instance of this class. |
127 MPbk2ContactUiControl& aUiControl ); |
131 MPbk2ContactUiControl& aUiControl ); |
128 |
132 |
129 MPbk2AiwInterestItem* CreatePbk2AiwInterestForIdL( |
133 MPbk2AiwInterestItem* CreatePbk2AiwInterestForIdL( |
130 TInt aInterestId, |
134 TInt aInterestId, |
131 CAiwServiceHandler& aServiceHandler ); |
135 CAiwServiceHandler& aServiceHandler ); |
132 |
136 |
|
137 private: // From MVPbkContactStoreObserver |
|
138 |
|
139 void StoreReady( |
|
140 MVPbkContactStore& aContactStore ); |
|
141 |
|
142 void StoreUnavailable( |
|
143 MVPbkContactStore& aContactStore, |
|
144 TInt aReason ); |
|
145 |
|
146 void HandleStoreEventL( |
|
147 MVPbkContactStore& aContactStore, |
|
148 TVPbkContactStoreEvent aStoreEvent ); |
|
149 |
133 private: // Implementation |
150 private: // Implementation |
134 CNamesListUIExtensionPlugin(); |
151 CNamesListUIExtensionPlugin(); |
135 void ConstructL(); |
152 void ConstructL(); |
136 void CmdOpenGroupL( MPbk2ContactUiControl& aUiControl ) const; |
153 void CmdOpenGroupL( MPbk2ContactUiControl& aUiControl ) const; |
137 void DimItem( CEikMenuPane* aMenuPane, TInt aCmd ); |
154 void DimItem( CEikMenuPane* aMenuPane, TInt aCmd ); |
138 TBool IsTopContact( const MVPbkBaseContact* aContact ); |
155 TBool IsTopContact( const MVPbkBaseContact* aContact ); |
139 MVPbkContactLink* MyCardLink() const; |
156 MVPbkContactLink* MyCardLink() const; |
|
157 void InitLocalStoreObserverL(); |
140 |
158 |
141 private: // Data |
159 private: // Data |
142 MCCAConnection* iCCAConnection; // own |
160 MCCAConnection* iCCAConnection; // own |
143 CPbk2NamesListExView* iNamesListExViewRef; //ref |
161 CPbk2NamesListExView* iNamesListExViewRef; //ref |
144 //OWN: |
162 //OWN: |
145 CSpbContentProvider* iContentProvider; |
163 CSpbContentProvider* iContentProvider; |
|
164 // number of contacts in local store |
|
165 TInt iLocalStoreContactsCount; |
|
166 // Not own: |
|
167 MVPbkContactStore* iLocalStore; |
|
168 // Own |
|
169 CPbk2ApplicationServices* iAppServices; |
146 }; |
170 }; |
147 |
171 |
148 #endif // NAMESLISTUIEXTENTIONPLUGIN_H |
172 #endif // NAMESLISTUIEXTENTIONPLUGIN_H |
149 |
173 |
150 // End of File |
174 // End of File |