www.pudn.com > DTDaemon.rar > DTFile.h
/* ============================================================================ Name : DTFile.h Author : Version : Copyright : Your copyright notice Description : DTFile.h - header file ============================================================================ */ #ifndef DTFILE_H #define DTFILE_H // INCLUDES // System Includes #include// CBase, link against euser.lib #include #include #include #include #include #include "DTDaemon.h" // FORWARD DECLARATIONS class CDTFile : public CBase { private: RFs iRFs; HBufC* iFileName; RFileReadStream iReader; RFileWriteStream iWriter; TBool iIsOpen; TInt iFileLength; TInt iReadLength; TInt iMode; enum { KDTRead, KDTWrite }; CDTFile(); public: static CDTFile* NewLC(); static HBufC* AnsiToUnicodeL(const TDesC8& aAnsi); void ConstructL(); TInt OpenForRead(const TDesC& aFileName); TInt OpenForWrite(const TDesC& aFileName); TInt GetLength(); void Close(); TInt Read(TDes8& aBuffer, TInt aLength); TInt Write(TDes8& aBuffer, TInt aLength); TBool isOpen(); ~CDTFile(); }; #endif // DTFILE_H