TImAttachmentFile Class Reference

class TImAttachmentFile
Public Member Functions
TImAttachmentFile(RFs &)
~TImAttachmentFile()
TInt AppendValidFile(const TDesC &, const TDesC &, TFileName &)
IMPORT_C TIntCloseFile()
IMPORT_C TIntCreateFile(const TDesC &, const TDesC &)
IMPORT_C TIntDeleteAttachment(const TDesC &, const TDesC &)
IMPORT_C TIntMakeDir(const TDesC &)
IMPORT_C TIntOpenFile(const TDesC &, const TDesC &)
IMPORT_C TIntReadFile(TDes8 &, TInt)
IMPORT_C voidSetFileHandle(RFile &, TImFileOpenMode)
IMPORT_C TIntWriteFile(const TDesC8 &)
IMPORT_C TIntWriteFile(const TDesC16 &)
Private Member Functions
TInt FlushFile()
TInt ReadFile()
voidReset()
TPtrC8 SelectFileData(TInt &, TInt &)
TInt WriteFile()
Public Member Enumerations
enumTImFileOpenMode { EImFileRead = 0, EImFileWrite }
Private Attributes
TBuf8< KDataLineBufferLength >iDataLine
RFile iFile
RFs &iFileSession
TFileText iFileText
TFileName iFullFilePath
TInt iPositionInCache
TInt iSpaceOnCache
TBool iWritingToFile

Constructor & Destructor Documentation

TImAttachmentFile(RFs &)

IMPORT_CTImAttachmentFile(RFs &aFileSession)

Parameters

RFs & aFileSession

~TImAttachmentFile()

IMPORT_C~TImAttachmentFile()

Member Functions Documentation

AppendValidFile(const TDesC &, const TDesC &, TFileName &)

TInt AppendValidFile(const TDesC &aDirPath,
const TDesC &aFileName,
TFileName &rFullFilePath
)

Parameters

const TDesC & aDirPath
const TDesC & aFileName
TFileName & rFullFilePath

CloseFile()

IMPORT_C TIntCloseFile()

CreateFile(const TDesC &, const TDesC &)

IMPORT_C TIntCreateFile(const TDesC &aDirPath,
const TDesC &aFileName
)

Parameters

const TDesC & aDirPath
const TDesC & aFileName

DeleteAttachment(const TDesC &, const TDesC &)

IMPORT_C TIntDeleteAttachment(const TDesC &aDirPath,
const TDesC &aFileName
)

Parameters

const TDesC & aDirPath
const TDesC & aFileName

FlushFile()

TInt FlushFile()[private]

MakeDir(const TDesC &)

IMPORT_C TIntMakeDir(const TDesC &aDirPath)

Parameters

const TDesC & aDirPath

OpenFile(const TDesC &, const TDesC &)

IMPORT_C TIntOpenFile(const TDesC &aDirPath,
const TDesC &aFileName
)

Parameters

const TDesC & aDirPath
const TDesC & aFileName

ReadFile(TDes8 &, TInt)

IMPORT_C TIntReadFile(TDes8 &rBuffer,
TIntaNumBytes
)

Parameters

TDes8 & rBuffer
TInt aNumBytes

ReadFile()

TInt ReadFile()[private]

Reset()

voidReset()[private]

SelectFileData(TInt &, TInt &)

TPtrC8 SelectFileData(TInt &abufLen,
TInt &aDataLen
)[private]

Parameters

TInt & abufLen
TInt & aDataLen

SetFileHandle(RFile &, TImFileOpenMode)

IMPORT_C voidSetFileHandle(RFile &aFile,
TImFileOpenModeaFileMode
)

Parameters

RFile & aFile
TImFileOpenMode aFileMode

WriteFile(const TDesC8 &)

IMPORT_C TIntWriteFile(const TDesC8 &aBuffer)

Parameters

const TDesC8 & aBuffer

WriteFile(const TDesC16 &)

IMPORT_C TIntWriteFile(const TDesC16 &aBuffer)

Parameters

const TDesC16 & aBuffer

WriteFile()

TInt WriteFile()[private]

Member Enumerations Documentation

Enum TImFileOpenMode

Enumerators

EImFileRead = 0

File opened for read mode

EImFileWrite

File opened for write mode

Member Data Documentation

TBuf8< KDataLineBufferLength > iDataLine

TBuf8< KDataLineBufferLength >iDataLine[private]

RFile iFile

RFile iFile[private]

RFs & iFileSession

RFs &iFileSession[private]

TFileText iFileText

TFileText iFileText[private]

TFileName iFullFilePath

TFileName iFullFilePath[private]

TInt iPositionInCache

TInt iPositionInCache[private]

TInt iSpaceOnCache

TInt iSpaceOnCache[private]

TBool iWritingToFile

TBool iWritingToFile[private]