dtfile.h

来自「一个关于通信的源代码」· C头文件 代码 · 共 56 行

H
56 行
字号
/*
============================================================================
 Name        : DTFile.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : DTFile.h - header file
============================================================================
*/

#ifndef DTFILE_H
#define DTFILE_H

// INCLUDES
// System Includes
#include <e32base.h>  // CBase, link against euser.lib
#include <libc\stdlib.h> 
#include <f32file.h>
#include <s32file.h>
#include <charconv.h>
#include <utf.h>
#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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?