iapconnectdemodatanotification.h

来自「symbian关于Internet访问的代码」· C头文件 代码 · 共 105 行

H
105
字号
/*
* ============================================================================
*  Name     : CIAPConnectDemoDataNotification from 
*		  IAPConnectDemoDataNotification.h
*  Part of  : Internet Access Points Example v2.0
*  Created  : 01.09.2006 by Forum Nokia
*  Version  : 2.0
*  Copyright: Forum Nokia
* ============================================================================
*/

#ifndef IAPCONNECTDEMODATANOTIFICATION_H
#define IAPCONNECTDEMODATANOTIFICATION_H

// INCLUDE FILES
#include <e32base.h>
#include <Es_sock.h>

// FORWARD DECLARATIONS
class MIAPConnectDemoSocketsObserver;

enum TNotificationType
    {
    ESentDataNotification = 1,
    EReceivedDataNotification
    };
    
// CLASS DECLARATION

/**
* CIAPConnectDemoDataNotification
*/
class CIAPConnectDemoDataNotification : public CActive
    {
public: // Constructors and destructors

	/**
	* Two-phased constructor
	*/
	static CIAPConnectDemoDataNotification* NewL( 
					MIAPConnectDemoSocketsObserver& aDemoSocketsObserver,
	                             RConnection& iConnection );

	/**
	* Two-phased constructor
	*/
	static CIAPConnectDemoDataNotification* NewLC( 
					MIAPConnectDemoSocketsObserver& aDemoSocketsObserver,
	                              RConnection& iConnection );


	/**
	* Destructor
	*/
	virtual ~CIAPConnectDemoDataNotification();

public: // New functions

    /**
    * Starts observing the amount of data received/sent.
    * @param aType defines are we monitoring the amount of sent or received data
    * @param aDataAmount defines the maximum amount of data to be received/sent.
    */
    void Start(const TNotificationType& aType, const TUint& aDataAmount);

private: // Functions from base classes

	/**
	* From CActive
	*/
	void DoCancel();

	/**
	* From CActive
	*/
	void RunL();

private: 

	/**
	* Symbian OS default constructor
	*/
	CIAPConnectDemoDataNotification( 
			MIAPConnectDemoSocketsObserver& aDemoSocketsObserver, 
			RConnection& aConnection );
	void ConstructL();

private: // Data members

	RConnection& iConnection;

	MIAPConnectDemoSocketsObserver& iDemoSocketsObserver;

	TNotificationType iType;

	TUint iData;

	TPckg<TUint> iDataPckg;

    };

#endif 

// End of File

⌨️ 快捷键说明

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