|
1 /* |
|
2 * Copyright (c) 2003 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: Servers-array wrapper |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCASERVERSARRAY_H |
|
21 #define CCASERVERSARRAY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <badesca.h> |
|
26 |
|
27 #include "CWVSettingsUIDefs.h" |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Servers-array wrapper |
|
34 * Wraps real array handling to MDesCArray protocol |
|
35 * |
|
36 * @lib WVServiceSettingsUi.dll |
|
37 * @since 2.1 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CWVSettingsUIServersArray ) : public CBase, public MDesCArray |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aServerList List of servers |
|
46 * @param aProtectedServers a list of protected servers |
|
47 */ |
|
48 static CWVSettingsUIServersArray* NewL( MDesCArray& aServerList, |
|
49 RArray<TInt>& aProtectedServers ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CWVSettingsUIServersArray(); |
|
55 |
|
56 public: // Functions from base classes (MDesCArray) |
|
57 /** |
|
58 * From MDesCArray, Returns the number of descriptor elements in |
|
59 * a descriptor array. |
|
60 * @return Count of items |
|
61 */ |
|
62 TInt MdcaCount() const; |
|
63 |
|
64 /** |
|
65 * From MDesCArray, Indexes into a descriptor array. |
|
66 * Return listbox-formatted data |
|
67 * @param aIndex The position of the descriptor element within a |
|
68 * descriptor array |
|
69 * @return A 16 bit non-modifiable pointer descriptor representing |
|
70 * the descriptor element located at position aIndex within a |
|
71 * descriptor array. |
|
72 */ |
|
73 TPtrC16 MdcaPoint( TInt aIndex ) const; |
|
74 |
|
75 public: // New methods |
|
76 |
|
77 /** |
|
78 * Returns raw unformatted data |
|
79 * @since 2.1 |
|
80 * @param aIndex The position of the descriptor element within a |
|
81 * descriptor array |
|
82 * @return A 16 bit non-modifiable pointer descriptor representing |
|
83 * the descriptor element located at position aIndex within a |
|
84 * descriptor array. |
|
85 */ |
|
86 TPtrC16 RawDataMdcaPoint( TInt aIndex ) const; |
|
87 |
|
88 /** |
|
89 * Replaces adapter model |
|
90 * @since 2.1 |
|
91 * @param aServerList New model |
|
92 */ |
|
93 void ReplaceModelL( MDesCArray* aServerList ); |
|
94 |
|
95 private: |
|
96 /** |
|
97 * C++ default constructor. |
|
98 * @param aServerList List of servers |
|
99 */ |
|
100 CWVSettingsUIServersArray( MDesCArray& aServerList, RArray<TInt>& aProtectedServers ); |
|
101 |
|
102 /** |
|
103 * By default Symbian OS constructor is private. |
|
104 */ |
|
105 void ConstructL(); |
|
106 |
|
107 private: // Data |
|
108 // Doesn't own. Handle to engines contact-list array |
|
109 MDesCArray* iServerList; |
|
110 // Owns. server name |
|
111 HBufC* iData; |
|
112 // doesn't own. Array of protected servers |
|
113 RArray<TInt>* iProtectedServers; |
|
114 }; |
|
115 |
|
116 #endif // CCASERVERSARRAY_H |
|
117 |
|
118 // End of File |