myactiveobject.h

来自「socket test for symbian」· C头文件 代码 · 共 63 行

H
63
字号
/*
 ============================================================================
 Name		: MyActiveObject.h
 Author	  : 
 Version	 : 1.0
 Copyright   : Your copyright notice
 Description : CMyActiveObject declaration
 ============================================================================
 */

#ifndef MYACTIVEOBJECT_H
#define MYACTIVEOBJECT_H

#include <e32base.h>	// For CActive, link against: euser.lib
#include <e32std.h>		// For RTimer, link against: euser.lib
#include <e32cons.h>

class CMyActiveObject : public CActive
	{
public:
	// Cancel and destroy
	~CMyActiveObject();

	// Two-phased constructor.
	static CMyActiveObject* NewL(CConsoleBase& aConsole);

	// Two-phased constructor.
	static CMyActiveObject* NewLC(CConsoleBase& aConsole);

public:
	// New functions
	// Function for making the initial request
	void StartL(TTimeIntervalMicroSeconds32 aDelay);

private:
	// C++ constructor
	CMyActiveObject(CConsoleBase& aConsole);

	// Second-phase constructor
	void ConstructL();

private:
	// From CActive
	// Handle completion
	void RunL();

	// How to cancel me
	void DoCancel();

	// Override to handle leaves from RunL(). Default implementation causes
	// the active scheduler to panic.
	TInt RunError(TInt aError);

private:
	RTimer iTimer; // Provides async timing service
	TInt iCount;
	CConsoleBase& iConsole;
	CActiveSchedulerWait* iWait;

	};

#endif // MYACTIVEOBJECT_H

⌨️ 快捷键说明

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