Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
23 This contains CT_FileData
26 #if (!defined __T_FILE_DATA_H__)
27 #define __T_FILE_DATA_H__
30 #include "DataWrapperBase.h"
32 #include "T_FileActiveCallback.h"
37 class CT_FileData: public CDataWrapperBase
40 static CT_FileData* NewL();
43 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
44 virtual TAny* GetObject();
53 void DoCmdDestructor();
54 void DoCmdCreateL(const TDesC& aSection);
55 void DoCmdOpenL(const TDesC& aSection);
56 void DoCmdWriteL(const TDesC& aSection, const TInt aSyncErrorIndex);
58 void DoCmdReplaceL(const TDesC& aSection);
59 void DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex);
60 void DoCmdFlushL(const TDesC& aSection, const TInt aAsyncErrorIndex);
61 void DoCmdTempL(const TDesC& aSection);
62 void DoCmdRenameL(const TDesC& aSection);
63 void DoCmdSeekL(const TDesC& aSection);
64 void DoCmdReadCancelL(const TDesC& aSection);
65 void DoCmdLockL(const TDesC& aSection);
66 void DoCmdUnLockL(const TDesC& aSection);
67 void DoCmdSizeL(const TDesC& aSection);
68 void DoCmdSetSizeL(const TDesC& aSection);
69 void DoCmdAttL(const TDesC& aSection);
70 void DoCmdSetAttL(const TDesC& aSection);
71 void DoCmdModifiedL(const TDesC& aSection);
72 void DoCmdSetModifiedL(const TDesC& aSection);
73 void DoCmdSetL(const TDesC& aSection);
74 void DoCmdChangeModeL(const TDesC& aSection);
75 void DoCmdDriveL(const TDesC& aSection);
76 void DoCmdBlockMap(const TDesC& aSection);
77 void DoCmdDuplicateL(const TDesC& aSection);
78 void DoCmdFullName(const TDesC& aSection);
79 void DoCmdNameL(const TDesC& aSection);
84 inline void DoCleanup();
86 TBool GetFileModeL(const TDesC& aParameterName, const TDesC& aSection, TUint& aFileMode);
87 TBool ConvertToSeek(const TDesC& aParameterName, const TDesC& aSection, TSeek& aSeek);
88 TBool ConvertToOwnerType(const TDesC& aParameterName, const TDesC& aSection, TOwnerType& aResult);
89 TBool ConvertToAttributeL(const TDesC& aParameterName, const TDesC& aSection, TUint& aAttribute);
90 TBool ConvertToBlockMapUsage(const TDesC& aParameterName, const TDesC& aSection, TBlockMapUsage& aResult);
92 void RunL(CActive* aActive, const TInt aIndex);
93 void DoCancel(CActive* aActive, TInt aIndex);
97 void DoAsynchronousWritesL(const TDesC& aSection, const TInt aSyncErrorIndex);
98 void DoSynchronousWritesL(const TDesC& aSection);
99 void HandleExpectedString(const TDesC8& aReadedData, const TDesC& aSection);
100 void HandleExpectedString(const TDesC& aReadedData, const TDesC& aSection);
101 void DoSynchronousReadsL(const TDesC& aSection);
102 void DoAsynchronousReadsL(const TDesC& aSection, const TInt aAsyncErrorIndex);
104 void PrintFileAttributes(TUint aAttValue);
106 void ToArrayL(RPointerArray<HBufC>& aArray, HBufC*& aBuffer);
107 RPointerArray<HBufC> SplitL(const TDesC& aInput, const char* aToken);
111 /** Instance for handling to resource file */
112 RPointerArray<CT_FileActiveCallback> iReadCallbackArray;
113 RPointerArray<CActiveCallback> iWriteCallbackArray;
114 RPointerArray<CActiveCallback> iFlushCallbackArray;
119 #endif /* __T_FILE_DATA_H__ */