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 |
/**
|
|
19 |
@test
|
|
20 |
@internalComponent
|
|
21 |
|
|
22 |
This contains CT_RDirData
|
|
23 |
*/
|
|
24 |
|
|
25 |
#if (!defined __T_RDIR_DATA_H__)
|
|
26 |
#define __T_RDIR_DATA_H__
|
|
27 |
|
|
28 |
// User Includes
|
|
29 |
#include "DataWrapperBase.h"
|
|
30 |
|
|
31 |
// EPOC includes
|
|
32 |
#include <f32file.h>
|
|
33 |
|
|
34 |
class CT_RDirData: public CDataWrapperBase
|
|
35 |
{
|
|
36 |
public:
|
|
37 |
static CT_RDirData* NewL();
|
|
38 |
~CT_RDirData();
|
|
39 |
|
|
40 |
virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
|
|
41 |
virtual TAny* GetObject();
|
|
42 |
|
|
43 |
protected:
|
|
44 |
CT_RDirData();
|
|
45 |
void ConstructL();
|
|
46 |
|
|
47 |
void RunL(CActive* aActive, TInt aIndex);
|
|
48 |
void DoCancel(CActive* aActive, TInt aIndex);
|
|
49 |
|
|
50 |
private:
|
|
51 |
inline void DoCmdNew();
|
|
52 |
inline void DoCmdClose();
|
|
53 |
inline void DoCmdOpenL(const TDesC& aSection);
|
|
54 |
inline void DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex);
|
|
55 |
inline void DoCmdDestructor();
|
|
56 |
void ReadExpectedNamesL( const TDesC& aSection );
|
|
57 |
|
|
58 |
//Helper function
|
|
59 |
void DoCleanup();
|
|
60 |
void CompareEntryArray(TEntryArray* aEntryArray);
|
|
61 |
void CompareEntryData(TEntry* aEntry);
|
|
62 |
|
|
63 |
private:
|
|
64 |
//** Instance for handling to resource directory */
|
|
65 |
RDir* iRDir;
|
|
66 |
|
|
67 |
/** The request status for read event */
|
|
68 |
CActiveCallback* iRead;
|
|
69 |
|
|
70 |
/** The request status for read array event */
|
|
71 |
CActiveCallback* iReadBlock;
|
|
72 |
|
|
73 |
/** entry for async format */
|
|
74 |
TPckg<TEntry>* iEntry;
|
|
75 |
|
|
76 |
/** Array of expected file names*/
|
|
77 |
RPointerArray<TPath>* iExpectedNames;
|
|
78 |
|
|
79 |
|
|
80 |
TBuf<KMaxPath> iObjName;
|
|
81 |
|
|
82 |
TBool iCompare;
|
|
83 |
|
|
84 |
};
|
|
85 |
|
|
86 |
#endif /* __T_RDIR_DATA_H__ */
|