|
1 /* |
|
2 * Copyright (c) 2004 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: |
|
15 * Array of notifications |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MMBOXARRAY_H__ |
|
22 #define __MMBOXARRAY_H__ |
|
23 |
|
24 #include <eikdialg.h>// CEikDialog |
|
25 #include <msvstd.h> // TMsvId |
|
26 |
|
27 #include <bldvariant.hrh> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CMsvSession; |
|
31 class CNotMtmUiData; |
|
32 |
|
33 enum TMMBoxSortType |
|
34 { |
|
35 EMMBoxSortByDate = 0, |
|
36 EMMBoxSortByName, |
|
37 EMMBoxSortBySubject |
|
38 }; |
|
39 |
|
40 // CLASS DEFINITIONS |
|
41 |
|
42 /** |
|
43 * CMMBoxArray |
|
44 * Helper array class used by CMMBoxDialog |
|
45 */ |
|
46 class CMMBoxArray : |
|
47 public CBase, |
|
48 public MDesCArray |
|
49 { |
|
50 public: |
|
51 /** |
|
52 * Two phase constructor |
|
53 */ |
|
54 static CMMBoxArray* NewL( CMsvSession& aSession, CNotMtmUiData& aUiData ); |
|
55 |
|
56 /** |
|
57 * Destructor |
|
58 */ |
|
59 ~CMMBoxArray(); |
|
60 |
|
61 /** |
|
62 * Update notifications array |
|
63 * @param aFolderId: id of the folder where notifications are stored |
|
64 */ |
|
65 void RefreshArrayL( TMsvId aFolderId ); |
|
66 |
|
67 /** |
|
68 * Returns entry id |
|
69 * @param aIndex: index of the entry |
|
70 * @return TMsvId: id of the entry |
|
71 */ |
|
72 TMsvId EntryId( TInt aIndex ) const; |
|
73 |
|
74 /** |
|
75 * Returns TMsvEntry |
|
76 * @param aIndex: index of the entry |
|
77 * @return TMsvEntry: TMsvEntry of the entry |
|
78 */ |
|
79 TMsvEntry Entry( TInt aIndex ) const; |
|
80 |
|
81 /** |
|
82 * Returns current sorting type |
|
83 * @return TMMBoxSortTypes: type of current sorting |
|
84 */ |
|
85 TMMBoxSortType SortType( ) const; |
|
86 |
|
87 /** |
|
88 * Sets new sorting type |
|
89 * @param aType: new sorting type |
|
90 */ |
|
91 TMsvSelectionOrdering SetSortType( const TMMBoxSortType& aType ); |
|
92 |
|
93 /** |
|
94 * Reverses the current sorting type |
|
95 */ |
|
96 void ReverseSortingL( ); |
|
97 |
|
98 |
|
99 public: // Functions from base classes |
|
100 |
|
101 /** |
|
102 * from MDesCArray |
|
103 */ |
|
104 virtual TInt MdcaCount() const; |
|
105 |
|
106 /** |
|
107 * from MDesCArray |
|
108 */ |
|
109 virtual TPtrC MdcaPoint(TInt aIndex) const; |
|
110 |
|
111 private: |
|
112 /** |
|
113 * C++ constructor |
|
114 */ |
|
115 CMMBoxArray( CMsvSession& aSession, CNotMtmUiData& aUiData ); |
|
116 |
|
117 /** |
|
118 * EPOC constructor |
|
119 */ |
|
120 void ConstructL(); |
|
121 |
|
122 private: |
|
123 CMsvSession& iSession; |
|
124 CMsvEntry* iFolderEntry; |
|
125 HBufC* iListBoxText; |
|
126 CNotMtmUiData& iUiData; |
|
127 |
|
128 }; |
|
129 |
|
130 |
|
131 #endif // __MMBOXARRAY_H__ |
|
132 |
|
133 // End of File |