|
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 PBAPFOLDERNODECH_H |
|
17 #define PBAPFOLDERNODECH_H |
|
18 |
|
19 #include "pbapfoldernode.h" |
|
20 #include "pbaprequest.h" |
|
21 #include "pbapexporter.h" |
|
22 #include "pbapchviewobserver.h" |
|
23 |
|
24 //forward declarations |
|
25 class CVirtualFolders; |
|
26 class MVirtualFolderClient; |
|
27 class CPbapAppHeader; |
|
28 class CPbapChView; |
|
29 class CPbapChExporter; |
|
30 |
|
31 /** |
|
32 Base class for all of the "?ch" nodes |
|
33 */ |
|
34 class CFolderNodeCallHistory : public CFolderNode, public MPbapExporterCallback, public MPbapChViewObserver |
|
35 { |
|
36 public: |
|
37 enum THistoryType |
|
38 { |
|
39 EIncoming, |
|
40 EOutgoing, |
|
41 EMissed, |
|
42 ECombined |
|
43 }; |
|
44 |
|
45 protected: |
|
46 CFolderNodeCallHistory(MVirtualFolderClient& aClient, const TDesC& aFolderName, THistoryType aHistoryType); |
|
47 void ConstructL(); |
|
48 ~CFolderNodeCallHistory(); |
|
49 |
|
50 // from MPbapExporterCallback |
|
51 virtual void HandleExportComplete(TInt aError); |
|
52 |
|
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 MPbapChViewObserver |
|
64 virtual void CallHistoryViewReady(TInt aError); |
|
65 virtual void CallHistoryChangeNotification(TBool aViewReady = ETrue); |
|
66 |
|
67 private: |
|
68 enum TExportType |
|
69 { |
|
70 ENoExport, |
|
71 EExportItem, |
|
72 EExportListing, |
|
73 EExportCount, |
|
74 EExportFolder |
|
75 }; |
|
76 |
|
77 private: |
|
78 TInt DoExport(TExportType aExportType, TInt aHandle = 0); |
|
79 TInt StartExport(TExportType aExportType, TInt aHandle); |
|
80 |
|
81 void CancelPendingExport(TInt err); |
|
82 |
|
83 private: |
|
84 CPbapChExporter* iAsyncExporter; |
|
85 |
|
86 THistoryType iHistoryType; |
|
87 |
|
88 CPbapChView* iFolderView; |
|
89 CPbapChView* iReadFolderView; |
|
90 |
|
91 TExportType iPendingExport; |
|
92 TInt iPendingHandle; |
|
93 |
|
94 TBool iReadyToExport; |
|
95 TBool iCallHistoryChanged; |
|
96 }; |
|
97 |
|
98 |
|
99 /** |
|
100 Incoming call history phonebook folder |
|
101 */ |
|
102 class CFolderNodeIch : public CFolderNodeCallHistory |
|
103 { |
|
104 public: |
|
105 static CFolderNodeIch* NewL(MVirtualFolderClient& aClient); |
|
106 |
|
107 private: |
|
108 CFolderNodeIch(MVirtualFolderClient& aClient); |
|
109 }; |
|
110 |
|
111 |
|
112 /** |
|
113 Outgoing call history phonebook folder |
|
114 */ |
|
115 class CFolderNodeOch : public CFolderNodeCallHistory |
|
116 { |
|
117 public: |
|
118 static CFolderNodeOch* NewL(MVirtualFolderClient& aClient); |
|
119 |
|
120 private: |
|
121 CFolderNodeOch(MVirtualFolderClient& aClient); |
|
122 }; |
|
123 |
|
124 |
|
125 /** |
|
126 Missed call history phonebook folder |
|
127 */ |
|
128 class CFolderNodeMch : public CFolderNodeCallHistory |
|
129 { |
|
130 public: |
|
131 static CFolderNodeMch* NewL(MVirtualFolderClient& aClient); |
|
132 |
|
133 private: |
|
134 CFolderNodeMch(MVirtualFolderClient& aClient); |
|
135 }; |
|
136 |
|
137 |
|
138 /** |
|
139 Combined call history phonebook folder |
|
140 */ |
|
141 class CFolderNodeCch : public CFolderNodeCallHistory |
|
142 { |
|
143 public: |
|
144 static CFolderNodeCch* NewL(MVirtualFolderClient& aClient); |
|
145 |
|
146 private: |
|
147 CFolderNodeCch(MVirtualFolderClient& aClient); |
|
148 }; |
|
149 |
|
150 #endif //PBAPFOLDERNODECH_H |