|
1 /* |
|
2 * Copyright (c) 2006 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: Declares array that contains user data |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCAACCESSARRAY_H |
|
20 #define CCAACCESSARRAY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <bamdesca.h> //MDesCArray |
|
24 #include <badesca.h> |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MCAGroupPropertiesPC; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * This array class binds three different arrays to one array. |
|
34 * MdcaPoint is overridden so that it is possible to use listbox tabulators |
|
35 * @lib chatng.app |
|
36 * @since 3.2 |
|
37 */ |
|
38 class CCAAccessArray : public CBase, public MDesCArray |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aGroupPC Handle to groups process component |
|
45 * @param aUserList List of users |
|
46 */ |
|
47 static CCAAccessArray* NewL( MCAGroupPropertiesPC* aGroupPC, |
|
48 CDesCArray& aUserList ); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CCAAccessArray(); |
|
54 |
|
55 public: // New functions |
|
56 |
|
57 /** |
|
58 * This method appends items to access array |
|
59 * @param aPtr Descriptor that contains WVIDs |
|
60 */ |
|
61 void AppendL( const TDesC& aPtr ); |
|
62 |
|
63 /** |
|
64 * This method returns descriptor from array that contains not |
|
65 * formatted data |
|
66 * @param aIndex Index of the item |
|
67 * @return Unformatted data descriptor |
|
68 */ |
|
69 TPtrC RawData( TInt aIndex ) const; |
|
70 |
|
71 /** |
|
72 * This method deletes from the access array |
|
73 * @param aIndex Index of item that will be removed from array |
|
74 * @param aCount The count of items that are deleted starting from index |
|
75 */ |
|
76 void Delete( TInt aIndex, TInt aCount ); |
|
77 |
|
78 /** |
|
79 * This method resets the access array |
|
80 */ |
|
81 void Reset(); |
|
82 |
|
83 public: // Functions from MDesCArray |
|
84 |
|
85 /** |
|
86 * From MDesCArray returns the count of the items |
|
87 * @return number of items that are in accessarray |
|
88 */ |
|
89 TInt MdcaCount() const; |
|
90 |
|
91 /** |
|
92 * From MDesCArray returns descriptor for given index |
|
93 * @return Formatted descriptor (\t) for given index |
|
94 */ |
|
95 TPtrC MdcaPoint( TInt aIndex ) const; |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * Default constructor |
|
101 * @param aGroupPC Handle to groups process component interface |
|
102 * @param aUserList List of users |
|
103 */ |
|
104 CCAAccessArray( MCAGroupPropertiesPC* aGroupPropsDialogPC, CDesCArray& aUserList ); |
|
105 |
|
106 /** |
|
107 * By default Symbian OS constructor is private. |
|
108 */ |
|
109 void ConstructL(); |
|
110 |
|
111 private: // Data |
|
112 |
|
113 //Group PC interface. Doesn't own |
|
114 MCAGroupPropertiesPC* iGroupPropertiesPC; |
|
115 |
|
116 //Array that contains user ids. Doesn't own |
|
117 CDesCArray& iAccessList; |
|
118 |
|
119 //Buffer for line. Owns |
|
120 HBufC* iLine; |
|
121 }; |
|
122 |
|
123 #endif // CCAACCESSARRAY_H |
|
124 |
|
125 // End of File |
|
126 |