Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined (__MIUTATCH_H__)
17 #define __MIUTATCH_H__
20 #if !defined (__S32FILE_H__)
24 const TInt KDataLineBufferLength = 4096;
25 _LIT(KImcvAttachFormatStr, "%S(%d)%S");
31 enum TImAttachmentFileState
36 EFileIsCorrupt, // UU data being decoded is corrupt
37 EFileIsIncomplete, // file write failed
38 EFileFailedToOpen, // can't open attach file
39 EFileTopIncomplete // File is incomplete due to top
42 class TImAttachmentFile // utility class to handle file operations with Email attachments
52 File opened for read mode
56 File opened for write mode
61 IMPORT_C TImAttachmentFile(RFs& aFileSession); // constructor
62 IMPORT_C ~TImAttachmentFile(); // destructor
64 IMPORT_C TInt MakeDir (const TDesC& aDirPath);
65 IMPORT_C TInt OpenFile (const TDesC& aDirPath ,const TDesC& aFileName );
66 IMPORT_C TInt CreateFile (const TDesC& aDirPath ,const TDesC& aFileName );
67 IMPORT_C TInt ReadFile (TDes8& rBuffer, TInt aNumBytes );
68 IMPORT_C TInt WriteFile (const TDesC8& aBuffer);
69 IMPORT_C TInt WriteFile (const TDesC16& aBuffer);
70 IMPORT_C TInt CloseFile();
71 IMPORT_C TInt DeleteAttachment(const TDesC& aDirPath,const TDesC& aFileName);
73 IMPORT_C void SetFileHandle(RFile& aFile,TImFileOpenMode aFileMode);
75 TInt AppendValidFile(const TDesC& aDirPath, const TDesC& aFileName, TFileName& rFullFilePath);
81 TPtrC8 SelectFileData(TInt& abufLen, TInt& aDataLen);
87 TFileName iFullFilePath;
88 TBuf8<KDataLineBufferLength> iDataLine;
91 TInt iPositionInCache;