0
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2009 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 the License "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 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "T_EntryData.h"
|
|
19 |
#include "T_SfSrvServer.h"
|
|
20 |
#include "FileserverUtil.h"
|
|
21 |
|
|
22 |
// Commands
|
|
23 |
_LIT( KCmdAssignmentOperator, "=" );
|
|
24 |
_LIT( KCmdIndexOperator, "[]" );
|
|
25 |
_LIT( KCmdDelete, "~" );
|
|
26 |
_LIT( KCmdIsArchive, "IsArchive" );
|
|
27 |
_LIT( KCmdIsDir, "IsDir" );
|
|
28 |
_LIT( KCmdIsHidden, "IsHidden" );
|
|
29 |
_LIT( KCmdIsReadOnly, "IsReadOnly" );
|
|
30 |
_LIT( KCmdIsSystem, "IsSystem" );
|
|
31 |
_LIT( KCmdIsTypeValid, "IsTypeValid" );
|
|
32 |
_LIT( KCmdIsUidPresent, "IsUidPresent" );
|
|
33 |
_LIT( KCmdMostDerivedUid, "MostDerivedUid" );
|
|
34 |
_LIT( KCmdNew, "new" );
|
|
35 |
_LIT( KCmdSetAttribute, "SetAttribute" );
|
|
36 |
|
|
37 |
// Parameters
|
|
38 |
_LIT( KParamAttribute, "attribute" );
|
|
39 |
_LIT( KParamObject, "object" );
|
|
40 |
_LIT( KExpected, "expected" );
|
|
41 |
_LIT( KParamIndex, "index" );
|
|
42 |
_LIT( KParamState, "state" );
|
|
43 |
_LIT( KValue, "value" );
|
|
44 |
|
|
45 |
// Attributes
|
|
46 |
_LIT(KEntryAttNormalStr, "KEntryAttNormal");
|
|
47 |
_LIT(KEntryAttReadOnlyStr, "KEntryAttReadOnly");
|
|
48 |
_LIT(KEntryAttHiddenStr, "KEntryAttHidden");
|
|
49 |
_LIT(KEntryAttSystemStr, "KEntryAttSystem");
|
|
50 |
_LIT(KEntryAttVolumeStr, "KEntryAttVolume");
|
|
51 |
_LIT(KEntryAttDirStr, "KEntryAttDir");
|
|
52 |
_LIT(KEntryAttArchiveStr, "KEntryAttArchive");
|
|
53 |
_LIT(KEntryAttXIPStr, "KEntryAttXIP");
|
|
54 |
|
|
55 |
|
|
56 |
// other string values
|
|
57 |
#define KTimeFormatSize 30
|
|
58 |
|
|
59 |
|
|
60 |
CT_EntryData* CT_EntryData::NewL( )
|
|
61 |
/**
|
|
62 |
* Two phase constructor
|
|
63 |
*/
|
|
64 |
{
|
|
65 |
CT_EntryData* ret = new (ELeave) CT_EntryData( );
|
|
66 |
CleanupStack::PushL( ret );
|
|
67 |
ret->ConstructL();
|
|
68 |
CleanupStack::Pop( ret );
|
|
69 |
return ret;
|
|
70 |
}
|
|
71 |
|
|
72 |
CT_EntryData::CT_EntryData( )
|
|
73 |
: iEntry(NULL)
|
|
74 |
, iFs(NULL)
|
|
75 |
|
|
76 |
/**
|
|
77 |
* Protected constructor. First phase construction
|
|
78 |
*/
|
|
79 |
{
|
|
80 |
}
|
|
81 |
|
|
82 |
void CT_EntryData::ConstructL()
|
|
83 |
/**
|
|
84 |
* Protected constructor. Second phase construction
|
|
85 |
*/
|
|
86 |
{
|
|
87 |
}
|
|
88 |
|
|
89 |
CT_EntryData::~CT_EntryData()
|
|
90 |
/**
|
|
91 |
* Destructor.
|
|
92 |
*/
|
|
93 |
{
|
|
94 |
DoCleanup();
|
|
95 |
}
|
|
96 |
|
|
97 |
void CT_EntryData::DoCleanup()
|
|
98 |
/** Deltes TEntry class instance */
|
|
99 |
{
|
|
100 |
INFO_PRINTF1( _L( "Delete TEntry class instance" ) );
|
|
101 |
delete iEntry;
|
|
102 |
iEntry = NULL;
|
|
103 |
}
|
|
104 |
|
|
105 |
TAny* CT_EntryData::GetObject()
|
|
106 |
/**
|
|
107 |
* Return a pointer to the object that the data wraps
|
|
108 |
*
|
|
109 |
* @return pointer to the object that the data wraps
|
|
110 |
*/
|
|
111 |
{
|
|
112 |
return iEntry;
|
|
113 |
}
|
|
114 |
|
|
115 |
void CT_EntryData::SetObjectL( TAny* aAny )
|
|
116 |
/**
|
|
117 |
* Set the wrapped data object with new value
|
|
118 |
*/
|
|
119 |
{
|
|
120 |
DoCleanup();
|
|
121 |
iEntry = static_cast<TEntry*> ( aAny );
|
|
122 |
}
|
|
123 |
|
|
124 |
void CT_EntryData::DisownObjectL()
|
|
125 |
/**
|
|
126 |
* Clear the wrapped data object pointer w/o de-initialization
|
|
127 |
*/
|
|
128 |
{
|
|
129 |
iEntry = NULL;
|
|
130 |
}
|
|
131 |
|
|
132 |
inline TCleanupOperation CT_EntryData::CleanupOperation()
|
|
133 |
/**
|
|
134 |
* Return static cleanup function
|
|
135 |
*/
|
|
136 |
{
|
|
137 |
return CleanupOperation;
|
|
138 |
}
|
|
139 |
|
|
140 |
void CT_EntryData::CleanupOperation( TAny* aAny )
|
|
141 |
/**
|
|
142 |
* Static cleanup function
|
|
143 |
*/
|
|
144 |
{
|
|
145 |
TEntry* entry = static_cast<TEntry*> ( aAny );
|
|
146 |
delete entry;
|
|
147 |
}
|
|
148 |
|
|
149 |
TBool CT_EntryData::DoCommandL( const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
|
|
150 |
/**
|
|
151 |
* Process a command read from the ini file
|
|
152 |
*
|
|
153 |
* @param aCommand the command to process
|
|
154 |
* @param aSection the entry in the ini file requiring the command to be processed
|
|
155 |
*
|
|
156 |
* @return ETrue if the command is processed
|
|
157 |
*/
|
|
158 |
{
|
|
159 |
TBool retVal = ETrue;
|
|
160 |
|
|
161 |
if ( aCommand == KCmdAssignmentOperator )
|
|
162 |
{
|
|
163 |
DoCmdAssignmentOperatorL( aSection );
|
|
164 |
}
|
|
165 |
else if ( aCommand == KCmdIndexOperator )
|
|
166 |
{
|
|
167 |
DoCmdIndexOperator( aSection );
|
|
168 |
}
|
|
169 |
else if ( aCommand == KCmdDelete )
|
|
170 |
{
|
|
171 |
DoCleanup();
|
|
172 |
}
|
|
173 |
else if ( aCommand == KCmdIsArchive )
|
|
174 |
{
|
|
175 |
DoCmdIsArchive( aSection );
|
|
176 |
}
|
|
177 |
else if ( aCommand == KCmdIsDir )
|
|
178 |
{
|
|
179 |
DoCmdIsDir( aSection );
|
|
180 |
}
|
|
181 |
else if ( aCommand == KCmdIsHidden )
|
|
182 |
{
|
|
183 |
DoCmdIsHidden( aSection );
|
|
184 |
}
|
|
185 |
else if ( aCommand == KCmdIsReadOnly )
|
|
186 |
{
|
|
187 |
DoCmdIsReadOnly( aSection );
|
|
188 |
}
|
|
189 |
else if ( aCommand == KCmdIsSystem )
|
|
190 |
{
|
|
191 |
DoCmdIsSystem( aSection );
|
|
192 |
}
|
|
193 |
else if ( aCommand == KCmdIsTypeValid )
|
|
194 |
{
|
|
195 |
DoCmdIsTypeValid( aSection );
|
|
196 |
}
|
|
197 |
else if ( aCommand == KCmdIsUidPresent )
|
|
198 |
{
|
|
199 |
DoCmdIsUidPresent( aSection );
|
|
200 |
}
|
|
201 |
else if ( aCommand == KCmdMostDerivedUid )
|
|
202 |
{
|
|
203 |
DoCmdMostDerived( aSection );
|
|
204 |
}
|
|
205 |
else if ( aCommand == KCmdNew )
|
|
206 |
{
|
|
207 |
DoCmdNew( aSection );
|
|
208 |
}
|
|
209 |
else if ( aCommand == KCmdSetAttribute )
|
|
210 |
{
|
|
211 |
DoCmdSetAttribute( aSection );
|
|
212 |
}
|
|
213 |
else
|
|
214 |
{
|
|
215 |
retVal = EFalse;
|
|
216 |
}
|
|
217 |
|
|
218 |
return retVal;
|
|
219 |
}
|
|
220 |
|
|
221 |
void CT_EntryData::DoCmdNew( const TDesC& aSection )
|
|
222 |
/** Creates new TEntry class instance */
|
|
223 |
{
|
|
224 |
DoCleanup();
|
|
225 |
|
|
226 |
TPtrC entryObjectName;
|
|
227 |
if( GET_OPTIONAL_STRING_PARAMETER( KParamObject, aSection, entryObjectName ) )
|
|
228 |
{
|
|
229 |
INFO_PRINTF1( _L( "Create new TEntry(TEntry) class instance." ) );
|
|
230 |
|
|
231 |
TEntry* entryObject = NULL;
|
|
232 |
TRAPD( err, entryObject = (TEntry*)GetDataObjectL(entryObjectName));
|
|
233 |
if ( err == KErrNone )
|
|
234 |
{
|
|
235 |
TRAPD( err, iEntry = new (ELeave) TEntry(*entryObject) );
|
|
236 |
if ( err != KErrNone )
|
|
237 |
{
|
|
238 |
ERR_PRINTF2( _L( "new TEntry(TEntry) error %d" ), err );
|
|
239 |
SetError( err );
|
|
240 |
}
|
|
241 |
}
|
|
242 |
else
|
|
243 |
{
|
|
244 |
ERR_PRINTF3( _L( "Unrecognized object name parameter value: %S. Error %d"), &entryObjectName, err );
|
|
245 |
SetBlockResult( EFail );
|
|
246 |
}
|
|
247 |
}
|
|
248 |
else
|
|
249 |
{
|
|
250 |
INFO_PRINTF1( _L( "Create new TEntry() class instance." ) );
|
|
251 |
TRAPD( err, iEntry = new (ELeave) TEntry() );
|
|
252 |
if ( err!=KErrNone )
|
|
253 |
{
|
|
254 |
ERR_PRINTF2( _L( "new TEntry() error %d" ), err );
|
|
255 |
SetError( err );
|
|
256 |
}
|
|
257 |
}
|
|
258 |
}
|
|
259 |
|
|
260 |
void CT_EntryData::DoCmdIndexOperator( const TDesC& aSection )
|
|
261 |
/** Checks if the given UID is the same as required */
|
|
262 |
{
|
|
263 |
TInt iniIndex;
|
|
264 |
if ( GET_MANDATORY_INT_PARAMETER( KParamIndex, aSection, iniIndex ) )
|
|
265 |
{
|
|
266 |
TInt value = (*iEntry)[iniIndex].iUid;
|
|
267 |
INFO_PRINTF3( _L( "UID[%d] = %d" ), iniIndex, value );
|
|
268 |
|
|
269 |
TInt iniExpected;
|
|
270 |
if ( GET_OPTIONAL_INT_PARAMETER( KExpected, aSection, iniExpected ) )
|
|
271 |
{
|
|
272 |
if ( value != iniExpected )
|
|
273 |
{
|
|
274 |
INFO_PRINTF3( _L( "values not the same %d != %d" ), value, iniExpected );
|
|
275 |
SetBlockResult( EFail );
|
|
276 |
}
|
|
277 |
}
|
|
278 |
}
|
|
279 |
}
|
|
280 |
|
|
281 |
void CT_EntryData::DoCmdAssignmentOperatorL( const TDesC& aSection )
|
|
282 |
/** Assigns another TEntry to this TEntry using "=" operator */
|
|
283 |
{
|
|
284 |
TPtrC entryObjectName;
|
|
285 |
if( GET_MANDATORY_STRING_PARAMETER( KParamObject, aSection, entryObjectName ) )
|
|
286 |
{
|
|
287 |
INFO_PRINTF2( _L( "Assign a %S to this TEntry" ), &entryObjectName );
|
|
288 |
|
|
289 |
TEntry* entryObject = NULL;
|
|
290 |
TRAPD( err, entryObject = (TEntry*)GetDataObjectL(entryObjectName));
|
|
291 |
if ( err == KErrNone && entryObject)
|
|
292 |
{
|
|
293 |
*iEntry = iEntry->operator=(*entryObject);
|
|
294 |
}
|
|
295 |
else
|
|
296 |
{
|
|
297 |
ERR_PRINTF3( _L( "Object not found or not initialised: %S. Error %d"), &entryObjectName, err );
|
|
298 |
SetBlockResult( EFail );
|
|
299 |
}
|
|
300 |
}
|
|
301 |
|
|
302 |
if ( !FileserverUtil::VerifyTEntryDataFromIniL(*this, aSection, *iEntry))
|
|
303 |
{
|
|
304 |
SetBlockResult(EFail);
|
|
305 |
}
|
|
306 |
}
|
|
307 |
|
|
308 |
void CT_EntryData::DoCmdIsArchive( const TDesC& aSection )
|
|
309 |
/** Checks if TEntry has Archive attribute using IsArchive() function */
|
|
310 |
{
|
|
311 |
INFO_PRINTF1( _L( "IsArchive()" ) );
|
|
312 |
TBool result = iEntry->IsArchive();
|
|
313 |
|
|
314 |
TBool expected;
|
|
315 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) )
|
|
316 |
{
|
|
317 |
if ( !( CompareBool(result, expected) ) )
|
|
318 |
{
|
|
319 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
320 |
SetBlockResult(EFail);
|
|
321 |
}
|
|
322 |
}
|
|
323 |
}
|
|
324 |
|
|
325 |
void CT_EntryData::DoCmdIsDir( const TDesC& aSection )
|
|
326 |
/** Checks if TEntry has Dir attribute using IsDir() function */
|
|
327 |
{
|
|
328 |
INFO_PRINTF1( _L( "IsDir()" ) );
|
|
329 |
TBool result = iEntry->IsDir();
|
|
330 |
|
|
331 |
TBool expected;
|
|
332 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) )
|
|
333 |
{
|
|
334 |
if ( !( CompareBool(result, expected) ) )
|
|
335 |
{
|
|
336 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
337 |
SetBlockResult(EFail);
|
|
338 |
}
|
|
339 |
}
|
|
340 |
}
|
|
341 |
|
|
342 |
void CT_EntryData::DoCmdIsHidden( const TDesC& aSection )
|
|
343 |
/** Checks if TEntry has Hidden attribute using IsHidden() function */
|
|
344 |
{
|
|
345 |
INFO_PRINTF1( _L( "IsHidden()" ) );
|
|
346 |
TBool result = iEntry->IsHidden();
|
|
347 |
|
|
348 |
TBool expected;
|
|
349 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) )
|
|
350 |
{
|
|
351 |
if ( !( CompareBool(result, expected) ) )
|
|
352 |
{
|
|
353 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
354 |
SetBlockResult(EFail);
|
|
355 |
}
|
|
356 |
}
|
|
357 |
}
|
|
358 |
|
|
359 |
void CT_EntryData::DoCmdIsReadOnly( const TDesC& aSection )
|
|
360 |
/** Checks if TEntry has ReadOnly attribute using IsReadOnly() function */
|
|
361 |
{
|
|
362 |
INFO_PRINTF1( _L( "IsReadOnly()" ) );
|
|
363 |
TBool result = iEntry->IsReadOnly();
|
|
364 |
|
|
365 |
TBool expected;
|
|
366 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) )
|
|
367 |
{
|
|
368 |
if ( !( CompareBool(result, expected) ) )
|
|
369 |
{
|
|
370 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
371 |
SetBlockResult(EFail);
|
|
372 |
}
|
|
373 |
}
|
|
374 |
}
|
|
375 |
|
|
376 |
void CT_EntryData::DoCmdIsSystem( const TDesC& aSection )
|
|
377 |
/** Checks if TEntry has System attribute using IsSystem() function */
|
|
378 |
{
|
|
379 |
INFO_PRINTF1( _L( "IsSystem()" ) );
|
|
380 |
TBool result = iEntry->IsSystem();
|
|
381 |
|
|
382 |
TBool expected;
|
|
383 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) )
|
|
384 |
{
|
|
385 |
if ( !( CompareBool(result, expected) ) )
|
|
386 |
{
|
|
387 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
388 |
SetBlockResult(EFail);
|
|
389 |
}
|
|
390 |
}
|
|
391 |
}
|
|
392 |
|
|
393 |
void CT_EntryData::DoCmdIsTypeValid( const TDesC& aSection )
|
|
394 |
/** Checks if TEntry has a valid UID using IsTypeValid() function */
|
|
395 |
{
|
|
396 |
INFO_PRINTF1( _L( "IsTypeValid()" ) );
|
|
397 |
TBool result = iEntry->IsTypeValid();
|
|
398 |
|
|
399 |
TBool expected;
|
|
400 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) )
|
|
401 |
{
|
|
402 |
if ( !( CompareBool(result, expected) ) )
|
|
403 |
{
|
|
404 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
405 |
SetBlockResult(EFail);
|
|
406 |
}
|
|
407 |
}
|
|
408 |
}
|
|
409 |
|
|
410 |
void CT_EntryData::DoCmdIsUidPresent( const TDesC& aSection )
|
|
411 |
/** Checks if TEntry has a valid UID using IsTypeValid() function */
|
|
412 |
{
|
|
413 |
TInt theIntUid;
|
|
414 |
TBool expected;
|
|
415 |
if( GET_MANDATORY_BOOL_PARAMETER( KExpected, aSection, expected ) &&
|
|
416 |
GET_MANDATORY_INT_PARAMETER( KValue, aSection, theIntUid ) )
|
|
417 |
{
|
|
418 |
INFO_PRINTF2( _L( "IsUidPresent( Uid(%d) )" ), theIntUid );
|
|
419 |
TUid theUid;
|
|
420 |
theUid.iUid = theIntUid;
|
|
421 |
|
|
422 |
TBool result = iEntry->IsUidPresent( theUid );
|
|
423 |
|
|
424 |
if ( !( CompareBool(result, expected) ) )
|
|
425 |
{
|
|
426 |
ERR_PRINTF1( _L( "Error compare function result and expected value" ));
|
|
427 |
SetBlockResult(EFail);
|
|
428 |
}
|
|
429 |
}
|
|
430 |
}
|
|
431 |
|
|
432 |
void CT_EntryData::DoCmdMostDerived( const TDesC& aSection )
|
|
433 |
/** checks if UID with given index is the same as the most derived one by using MostDerived() function */
|
|
434 |
{
|
|
435 |
TInt id = iEntry->MostDerivedUid().iUid;
|
|
436 |
INFO_PRINTF2( _L( "MostDerivedUid = %d" ), id);
|
|
437 |
|
|
438 |
TInt expected;
|
|
439 |
if( GET_OPTIONAL_INT_PARAMETER( KExpected, aSection, expected ) )
|
|
440 |
{
|
|
441 |
if ( expected != id )
|
|
442 |
{
|
|
443 |
ERR_PRINTF3( _L( "Error compare UID %d != expected %d" ), id, expected );
|
|
444 |
SetBlockResult( EFail );
|
|
445 |
}
|
|
446 |
}
|
|
447 |
}
|
|
448 |
|
|
449 |
void CT_EntryData::DoCmdSetAttribute( const TDesC& aSection )
|
|
450 |
/** Sets or resets attributes */
|
|
451 |
{
|
|
452 |
TPtrC attrName;
|
|
453 |
TBool attrState;
|
|
454 |
if( GET_MANDATORY_BOOL_PARAMETER( KParamState, aSection, attrState ) &&
|
|
455 |
GET_MANDATORY_STRING_PARAMETER( KParamAttribute, aSection, attrName ) )
|
|
456 |
{
|
|
457 |
TBool errHappened = EFalse;
|
|
458 |
TUint attr;
|
|
459 |
if (attrName == KEntryAttNormalStr)
|
|
460 |
{
|
|
461 |
attr = KEntryAttNormal;
|
|
462 |
}
|
|
463 |
else if (attrName == KEntryAttReadOnlyStr)
|
|
464 |
{
|
|
465 |
attr = KEntryAttReadOnly;
|
|
466 |
}
|
|
467 |
else if (attrName == KEntryAttHiddenStr)
|
|
468 |
{
|
|
469 |
attr = KEntryAttHidden;
|
|
470 |
}
|
|
471 |
else if (attrName == KEntryAttSystemStr)
|
|
472 |
{
|
|
473 |
attr = KEntryAttSystem;
|
|
474 |
}
|
|
475 |
else if (attrName == KEntryAttVolumeStr)
|
|
476 |
{
|
|
477 |
attr = KEntryAttVolume;
|
|
478 |
}
|
|
479 |
else if (attrName == KEntryAttDirStr)
|
|
480 |
{
|
|
481 |
attr = KEntryAttDir;
|
|
482 |
}
|
|
483 |
else if (attrName == KEntryAttArchiveStr)
|
|
484 |
{
|
|
485 |
attr = KEntryAttArchive;
|
|
486 |
}
|
|
487 |
else if (attrName == KEntryAttXIPStr)
|
|
488 |
{
|
|
489 |
attr = KEntryAttXIP;
|
|
490 |
}
|
|
491 |
else
|
|
492 |
{
|
|
493 |
errHappened = ETrue;
|
|
494 |
}
|
|
495 |
|
|
496 |
if ( errHappened )
|
|
497 |
{
|
|
498 |
ERR_PRINTF2( _L( "Unknown attribute name parameter: %S" ), &attrName );
|
|
499 |
SetBlockResult( EFail );
|
|
500 |
}
|
|
501 |
else
|
|
502 |
{
|
|
503 |
TPtrC attrStateString;
|
|
504 |
GET_MANDATORY_STRING_PARAMETER( KParamState, aSection, attrStateString );
|
|
505 |
INFO_PRINTF3( _L( "SetAttribute(%S, %S)" ), &attrName, &attrStateString);
|
|
506 |
|
|
507 |
if ( attrState ) // set attribute
|
|
508 |
{
|
|
509 |
iEntry->iAtt = iEntry->iAtt | attr;
|
|
510 |
}
|
|
511 |
else // reset attribute
|
|
512 |
{
|
|
513 |
iEntry->iAtt = iEntry->iAtt ^ ( iEntry->iAtt & attr );
|
|
514 |
}
|
|
515 |
}
|
|
516 |
}
|
|
517 |
}
|
|
518 |
|
|
519 |
|
|
520 |
TBool CT_EntryData::CompareBool( TBool aResult, TBool aExpected )
|
|
521 |
/** compare 2 TBool values, which can be !=0 and !=1 - some TEntry functions return 2, 3 etc */
|
|
522 |
{
|
|
523 |
return ( ( aResult > 0 ) == ( aExpected > 0 ) );
|
|
524 |
}
|
|
525 |
|