|
1 /* |
|
2 * Copyright (c) 2007-2008 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: email list iterator |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CFSMAILITERATOR_H |
|
20 #define CFSMAILITERATOR_H |
|
21 |
|
22 // INCLUDES |
|
23 //<cmail> |
|
24 #include "mfsmailiterator.h" |
|
25 #include "cfsmailmessage.h" |
|
26 //</cmail> |
|
27 |
|
28 /** |
|
29 * Email framework list iterator. First call should contain NULL id as begin id : |
|
30 * eg. NextL(TFSMailId(), count, messages); |
|
31 * |
|
32 * @lib FSFWCommonLib |
|
33 * @since S60 v3.1 |
|
34 */ |
|
35 class CFSMailIterator : public CBase, public MFSMailIterator |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * |
|
43 * @param aIterator plugin iteraror |
|
44 * @param aRequestHandler request handler for plugin requests |
|
45 */ |
|
46 IMPORT_C static CFSMailIterator* NewL( MFSMailIterator& aIterator, |
|
47 CFSMailRequestHandler* aRequestHandler ); |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * |
|
52 * @param aIterator plugin iteraror |
|
53 * @param aRequestHandler request handler for plugin requests |
|
54 */ |
|
55 IMPORT_C static CFSMailIterator* NewLC( MFSMailIterator& aIterator, |
|
56 CFSMailRequestHandler* aRequestHandler ); |
|
57 |
|
58 /** |
|
59 * see MFSMailIterator::NextL |
|
60 * |
|
61 */ |
|
62 IMPORT_C TBool NextL( TFSMailMsgId aCurrentMessageId, |
|
63 TUint aCount, |
|
64 RPointerArray<CFSMailMessage>& aMessages); |
|
65 |
|
66 /** |
|
67 * see MFSMailIterator::NextL |
|
68 * |
|
69 */ |
|
70 IMPORT_C TBool NextL( const TDesC& aStartWith, |
|
71 TUint aCount, |
|
72 RPointerArray<CFSMailMessage>& aMessages); |
|
73 |
|
74 /** |
|
75 * see MFSMailIterator::PreviousL |
|
76 * |
|
77 */ |
|
78 IMPORT_C TBool PreviousL( TFSMailMsgId aCurrentMessageId, |
|
79 TUint aCount, |
|
80 RPointerArray<CFSMailMessage>& aMessages); |
|
81 |
|
82 /** |
|
83 * see MFSMailIterator::PreviousL |
|
84 * |
|
85 */ |
|
86 IMPORT_C TBool PreviousL( const TDesC& aStartWith, |
|
87 TUint aCount, |
|
88 RPointerArray<CFSMailMessage>& aMessages); |
|
89 /** |
|
90 * Destructor. |
|
91 */ |
|
92 ~CFSMailIterator(); |
|
93 |
|
94 private: |
|
95 |
|
96 /** |
|
97 * Two-phased constructor |
|
98 */ |
|
99 void ConstructL( MFSMailIterator& aIterator, |
|
100 CFSMailRequestHandler* aRequestHandler ); |
|
101 |
|
102 /** |
|
103 * C++ default constructor. |
|
104 */ |
|
105 CFSMailIterator(); |
|
106 |
|
107 /** |
|
108 * sets request handler |
|
109 */ |
|
110 void SetAsyncRequestHandler(RPointerArray<CFSMailMessage>& aMessages); |
|
111 |
|
112 private: // data |
|
113 |
|
114 /** |
|
115 * request handler for plugin requests |
|
116 */ |
|
117 CFSMailRequestHandler* iRequestHandler; |
|
118 |
|
119 /** |
|
120 * plugin iterator |
|
121 */ |
|
122 MFSMailIterator* iIterator; |
|
123 }; |
|
124 |
|
125 #endif // M_FSMAILITERATOR_H |
|
126 |
|
127 // End of File |