|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef PBAPFOLDERNODEPB_H |
|
17 #define PBAPFOLDERNODEPB_H |
|
18 |
|
19 #include "pbapfoldernode.h" |
|
20 #include "pbapcontactdbviews.h" |
|
21 #include "pbappbhandlecache.h" |
|
22 #include "pbappbexporter.h" |
|
23 #include "pbapexporter.h" |
|
24 |
|
25 //forward declarations |
|
26 class MVirtualFolderClient; |
|
27 class CPbapAppHeader; |
|
28 class CContactIdArray; |
|
29 class MPbapExporterCallback; |
|
30 |
|
31 |
|
32 class CFolderNodePb : public CFolderNode, public MPbHandleCacheObserver, |
|
33 public MPbapContactDbViewsCallback, |
|
34 public MPbapExporterCallback |
|
35 { |
|
36 public: |
|
37 static CFolderNodePb* NewL(MVirtualFolderClient& aClient); |
|
38 ~CFolderNodePb(); |
|
39 |
|
40 private: |
|
41 CFolderNodePb(MVirtualFolderClient& aClient); |
|
42 void ConstructL(); |
|
43 |
|
44 TInt HandleCount(); |
|
45 |
|
46 void SearchAndSortItemsL(); |
|
47 void ExportIndexSortedListingL(); |
|
48 void ExportSearchAndSortResultsL(); |
|
49 |
|
50 void Reset(); |
|
51 |
|
52 private: |
|
53 // from CFolderBase |
|
54 virtual void CancelGet(); |
|
55 virtual void GetComplete(); |
|
56 |
|
57 // from CFolderNode |
|
58 virtual TInt DoGetItem(TInt aHandle); |
|
59 virtual TInt DoGetListing(); |
|
60 virtual TInt DoGetCount(); |
|
61 virtual TInt DoGetFolder(); |
|
62 |
|
63 // from MPbHandleCacheObserver |
|
64 virtual void HandleCacheChanged(); |
|
65 |
|
66 // from MPbapContactDbViewsCallback |
|
67 virtual void HandleSearchAndSortComplete(TInt aError); |
|
68 |
|
69 // from MPbapExporterCallback |
|
70 virtual void HandleExportComplete(TInt aError); |
|
71 |
|
72 private: |
|
73 CPbapPbHandleCache* iHandleCache; |
|
74 TBool iPhonebookChanged; |
|
75 CContactIdArray* iSearchResults; |
|
76 |
|
77 CPbapPbExporter* iAsyncExporter; |
|
78 RArray<TInt> iCacheIndexesToExport; |
|
79 }; |
|
80 |
|
81 |
|
82 #endif //PBAPFOLDERNODEPB_H |