|
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: Implements Attendee View's item list class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CATTENDEE_ITEM_LIST_H__ |
|
21 #define __CATTENDEE_ITEM_LIST_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include "MAttendeeItemList.h" |
|
25 #include <e32base.h> |
|
26 #include <cntdef.h> |
|
27 |
|
28 // FORWARD DECLARATION |
|
29 class CAttendeeItem; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * Implements AttendeeView's item list |
|
34 */ |
|
35 class CAttendeeItemList: public CBase, public MAttendeeItemList |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Two-phased constructor. |
|
40 * @return CAttendeeItemList object. |
|
41 */ |
|
42 static CAttendeeItemList* NewL(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CAttendeeItemList(); |
|
48 |
|
49 private: |
|
50 /** |
|
51 * By default Symbian 2nd phase constructor is private. |
|
52 */ |
|
53 void ConstructL(); |
|
54 |
|
55 /** |
|
56 * C++ default constructor. |
|
57 * @return CAttendeeItemList object |
|
58 */ |
|
59 CAttendeeItemList(); |
|
60 |
|
61 private: //From MAttendeeItemList |
|
62 //These two functions are for 3rd parties application's. |
|
63 TInt ItemCount() const; |
|
64 MAttendeeItem& ItemAt( const TInt aIndex ) const; |
|
65 |
|
66 public: //New functions |
|
67 /** |
|
68 * Appends a CAttendeeItem pointer into the array. |
|
69 * Ownership is transfered |
|
70 * @param aItem |
|
71 */ |
|
72 void AppendL( const CAttendeeItem* aItem ); |
|
73 |
|
74 /** |
|
75 * Inserts a CAttendeeItem pointer into the array at a |
|
76 * specified position. Ownership is transfered |
|
77 * @param aItem |
|
78 * @param aPos, position within the array |
|
79 */ |
|
80 void InsertL( const CAttendeeItem* aItem, const TInt aPos ); |
|
81 |
|
82 /** |
|
83 * Remove the CAttendeeItem pointer at the specified position |
|
84 * from the array. Ownership is transfered |
|
85 * @param aIndex |
|
86 * @return removed object if it was in CCalEntry, otherwise return NULL |
|
87 */ |
|
88 CAttendeeItem* Delete( const TInt aIndex ); |
|
89 |
|
90 /** |
|
91 * Remove the CAttendeeItem pointer at the specified position |
|
92 * from the array. Notice that you need to have ownership already, |
|
93 * otherwise comes alloc failure |
|
94 * @param aIndex |
|
95 */ |
|
96 void Remove( const TInt aIndex ); |
|
97 |
|
98 /** |
|
99 * Gets the number of CAttendeeItem pointers in the array. |
|
100 * @return TInt |
|
101 */ |
|
102 TInt Count() const; |
|
103 |
|
104 /** |
|
105 * Returns pointer to the CAttendeeItem located at |
|
106 * the specified position within the array. |
|
107 * Ownership not transfered |
|
108 * @param aIndex |
|
109 * @return CAttendeeItem |
|
110 */ |
|
111 CAttendeeItem* At( const TInt aIndex ) const; |
|
112 |
|
113 /** |
|
114 * Sorts the CAttendeeItem pointers within the array. |
|
115 * Sorts DESC order |
|
116 */ |
|
117 void SortL(); |
|
118 |
|
119 private: //data |
|
120 ///Own: List of CAttendeeItems |
|
121 RPointerArray<CAttendeeItem> iItems; |
|
122 |
|
123 }; |
|
124 |
|
125 #endif // __CATTENDEE_ITEM_LIST_H__ |
|
126 |
|
127 // End of File |