|
1 /* |
|
2 * Copyright (c) 2002 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 * Data structures used fro detailed error data in |
|
16 * WV engine API. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32base.h> |
|
23 #include "impsdetailed.h" |
|
24 |
|
25 // ================= MEMBER FUNCTIONS ======================= |
|
26 |
|
27 // C++ default constructor can NOT contain any code, that |
|
28 // might leave. |
|
29 // |
|
30 CImpsDetailedResult::CImpsDetailedResult() |
|
31 { |
|
32 } |
|
33 |
|
34 // EPOC default constructor can leave. |
|
35 void CImpsDetailedResult::ConstructL() |
|
36 { |
|
37 iCode = KErrNone; // code |
|
38 iDescription.Set( KNullDesC ); // description, just a reference |
|
39 iUserIds = new (ELeave) CPtrC16Array(5); // user-Id |
|
40 iGroupIds = new (ELeave) CPtrC16Array(5); |
|
41 iScreenNames = new (ELeave) CPtrC16Array(5); |
|
42 iGroupNames = new (ELeave) CPtrC16Array(5); |
|
43 iMessageIds = new (ELeave) CPtrC16Array(5); |
|
44 } |
|
45 |
|
46 // Two-phased constructor. |
|
47 EXPORT_C CImpsDetailedResult* CImpsDetailedResult::NewL() |
|
48 { |
|
49 CImpsDetailedResult* self = new (ELeave) CImpsDetailedResult; |
|
50 |
|
51 CleanupStack::PushL( self ); |
|
52 self->ConstructL(); |
|
53 CleanupStack::Pop(); |
|
54 |
|
55 return self; |
|
56 } |
|
57 |
|
58 // Destructor |
|
59 EXPORT_C CImpsDetailedResult::~CImpsDetailedResult() |
|
60 { |
|
61 if(iUserIds != NULL) |
|
62 iUserIds->Reset(); |
|
63 delete iUserIds; |
|
64 |
|
65 if(iGroupIds != NULL) |
|
66 iGroupIds->Reset(); |
|
67 delete iGroupIds; |
|
68 |
|
69 if(iScreenNames != NULL) |
|
70 iScreenNames->Reset(); |
|
71 delete iScreenNames; |
|
72 |
|
73 if(iGroupNames != NULL) |
|
74 iGroupNames->Reset(); |
|
75 delete iGroupNames; |
|
76 |
|
77 if(iMessageIds != NULL) |
|
78 iMessageIds->Reset(); |
|
79 delete iMessageIds; |
|
80 } |
|
81 |
|
82 // --------------------------------------------------------- |
|
83 // CImpsDetailedResult::Reset() |
|
84 // --------------------------------------------------------- |
|
85 // |
|
86 EXPORT_C void CImpsDetailedResult::Reset() |
|
87 { |
|
88 iCode = KErrNone; |
|
89 iDescription.Set( KNullDesC ); // description, just a reference |
|
90 iUserIds->Reset(); |
|
91 iGroupIds->Reset(); |
|
92 iScreenNames->Reset(); |
|
93 iGroupNames->Reset(); |
|
94 iMessageIds->Reset(); |
|
95 } |
|
96 |
|
97 // --------------------------------------------------------- |
|
98 // CImpsDetailedResult::Code() |
|
99 // --------------------------------------------------------- |
|
100 // |
|
101 EXPORT_C TInt CImpsDetailedResult::Code() const |
|
102 { |
|
103 return iCode; |
|
104 } |
|
105 |
|
106 // --------------------------------------------------------- |
|
107 // CImpsDetailedResult::SetCode() |
|
108 // --------------------------------------------------------- |
|
109 // |
|
110 EXPORT_C void CImpsDetailedResult::SetCode( TInt aInt ) |
|
111 { |
|
112 iCode = aInt; |
|
113 } |
|
114 |
|
115 // --------------------------------------------------------- |
|
116 // CImpsDetailedResult::Descriptor() |
|
117 // --------------------------------------------------------- |
|
118 // |
|
119 EXPORT_C TPtrC CImpsDetailedResult::Descriptor() const |
|
120 { |
|
121 return iDescription; |
|
122 } |
|
123 |
|
124 // --------------------------------------------------------- |
|
125 // CImpsDetailedResult::SetDescriptorL() |
|
126 // --------------------------------------------------------- |
|
127 // |
|
128 EXPORT_C void CImpsDetailedResult::SetDescriptorL( TDesC& aDes ) |
|
129 { |
|
130 iDescription.Set( aDes ); |
|
131 } |
|
132 |
|
133 // --------------------------------------------------------- |
|
134 // CImpsDetailedResult::UserIds() |
|
135 // --------------------------------------------------------- |
|
136 // |
|
137 EXPORT_C CPtrC16Array* CImpsDetailedResult::UserIds() const |
|
138 { |
|
139 return iUserIds; |
|
140 } |
|
141 |
|
142 // --------------------------------------------------------- |
|
143 // CImpsDetailedResult::UserIds() |
|
144 // --------------------------------------------------------- |
|
145 // |
|
146 EXPORT_C CPtrC16Array* CImpsDetailedResult::UserIds() |
|
147 { |
|
148 return iUserIds; |
|
149 } |
|
150 |
|
151 // --------------------------------------------------------- |
|
152 // CImpsDetailedResult::GroupIds() |
|
153 // --------------------------------------------------------- |
|
154 // |
|
155 EXPORT_C const CPtrC16Array* CImpsDetailedResult::GroupIds() const |
|
156 { |
|
157 return iGroupIds; |
|
158 } |
|
159 |
|
160 // --------------------------------------------------------- |
|
161 // CImpsDetailedResult::GroupIds() |
|
162 // --------------------------------------------------------- |
|
163 // |
|
164 EXPORT_C CPtrC16Array* CImpsDetailedResult::GroupIds() |
|
165 { |
|
166 return iGroupIds; |
|
167 } |
|
168 |
|
169 // --------------------------------------------------------- |
|
170 // CImpsDetailedResult::MessageIds() |
|
171 // --------------------------------------------------------- |
|
172 // |
|
173 EXPORT_C const CPtrC16Array* CImpsDetailedResult::MessageIds() const |
|
174 { |
|
175 return iMessageIds; |
|
176 } |
|
177 |
|
178 // --------------------------------------------------------- |
|
179 // CImpsDetailedResult::MessageIds() |
|
180 // --------------------------------------------------------- |
|
181 // |
|
182 EXPORT_C CPtrC16Array* CImpsDetailedResult::MessageIds() |
|
183 { |
|
184 return iMessageIds; |
|
185 } |
|
186 |
|
187 // --------------------------------------------------------- |
|
188 // CImpsDetailedResult::Snames() |
|
189 // --------------------------------------------------------- |
|
190 // |
|
191 EXPORT_C const CPtrC16Array* CImpsDetailedResult::SNames() const |
|
192 { |
|
193 return iScreenNames; |
|
194 } |
|
195 |
|
196 // --------------------------------------------------------- |
|
197 // CImpsDetailedResult::Snames() |
|
198 // --------------------------------------------------------- |
|
199 // |
|
200 EXPORT_C CPtrC16Array* CImpsDetailedResult::SNames() |
|
201 { |
|
202 return iScreenNames; |
|
203 } |
|
204 |
|
205 // --------------------------------------------------------- |
|
206 // CImpsDetailedResult::SNameGroups() |
|
207 // --------------------------------------------------------- |
|
208 // |
|
209 EXPORT_C const CPtrC16Array* CImpsDetailedResult::SNameGroups() const |
|
210 { |
|
211 return iGroupNames; |
|
212 } |
|
213 |
|
214 // --------------------------------------------------------- |
|
215 // CImpsDetailedResult::SNameGroups() |
|
216 // --------------------------------------------------------- |
|
217 // |
|
218 EXPORT_C CPtrC16Array* CImpsDetailedResult::SNameGroups() |
|
219 { |
|
220 return iGroupNames; |
|
221 } |
|
222 |
|
223 |
|
224 // --------------------------------------------------------- |
|
225 // CImpsDetailed::CImpsDetailed() |
|
226 // --------------------------------------------------------- |
|
227 EXPORT_C CImpsDetailed::CImpsDetailed(TInt aGranularity) |
|
228 :CArrayPtrFlat<CImpsDetailedResult>(aGranularity) |
|
229 { |
|
230 } |
|
231 |
|
232 // --------------------------------------------------------- |
|
233 // CImpsDetailed::~CImpsDetailed() |
|
234 // --------------------------------------------------------- |
|
235 EXPORT_C CImpsDetailed::~CImpsDetailed() |
|
236 { |
|
237 ResetAndDestroy(); |
|
238 } |
|
239 |
|
240 // End of File |
|
241 |