⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e32btclientengine.h

📁 SYMBIAN GPS NMEA协议实现
💻 H
字号:

#ifndef __CE32BtClientEngine_H__
#define __CE32BtClientEngine_H__

#include <Bt_Sock.h>
#include <BtExtNotifiers.h>
#include <BtSdp.h>
#include <E32Base.h>
#include <E32Std.h>
#include <ES_Sock.h>
#include <F32File.h>

#include "gps/bt/BtClientEngine.h"


class CSdpAgent;
class MBtDataListener;



#define KDataBufferSize 1024



class CE32BtClientEngine : public CActive, public MBtClientEngine,
	public MSdpAgentNotifier, public MSdpAttributeValueVisitor {

public:

	static CE32BtClientEngine * NewL( );

	virtual ~CE32BtClientEngine( );


public:
	
	// From CActive

	void RunL( );

	void DoCancel( );


public:

	// From MBtClientEngine

	void SetListener( MBtDataListener * aListener ) { iListener = aListener; };


public:
	
	// From MSdpAttributeValueVisitor

	void VisitAttributeValueL( CSdpAttrValue & aValue, TSdpElementType aType );

	void StartListL( CSdpAttrValueList & aList );

	void EndListL( );


public:
	
	// From MSdpAttributeValueVisitor

	void NextRecordRequestComplete( TInt aError,
		TSdpServRecordHandle aHandle, TInt aTotalRecordsCount );

	void AttributeRequestResult( TSdpServRecordHandle aHandle,
		TSdpAttributeID aAttrID, CSdpAttrValue * aAttrValue );

	void AttributeRequestComplete( TSdpServRecordHandle aHandle,
		TInt aError );


protected:

	CE32BtClientEngine( );

	void ConstructL( );


protected:

	void DiscoverRemoteL( );

	void DiscoveredRemoteL( );

	void QueryRemoteL( );

	void QueriedRemote( );

	void ConnectRemoteL( );

	void ReadDataL( );

	void NotifyListener( );

	void CloseRemoteL( );


private:

	RFs iFs;

	RNotifier iNotifier;

	TBTDeviceResponseParamsPckg iDiscoveryResponse;

	TBTSockAddr iRemoteAddr;

	RSocketServ iSocketServ;

	RSocket iSocket;

	RTimer iTimer;

	CSdpAgent * iSdpAgent;

	TInt iStateMachine;

	TInt iRemoteChannel;

	TUUID iPreviousUUID;

	TBuf8< KDataBufferSize > iDataBuffer;

	TSockXfrLength iDataLength;

	MBtDataListener * iListener;

};

#endif

⌨️ 快捷键说明

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