btb.h

来自「symbian平台蓝牙程序,功能实现:搜索设备,指定时间间隔搜索,对指定的设备发」· C头文件 代码 · 共 62 行

H
62
字号
#ifndef BTB_H
#define BTB_H



#include <e32base.h>
#include <es_sock.h>
#include <bt_sock.h>
#include <e32base.h>
#include <obex.h>

class CBTB : public CActive
    {
    public: 


		    static CBTB* NewL();
    static CBTB* NewLC();

        ~CBTB(); //destructor


		void ConnectL();

		void SendMessageL();

		void StopL();

		void DisconnectL();

		TBool IsBusy();
		TBool IsConnected();
	protected:

		void RunL();
        void DoCancel();

    public: 

    public: 

    private:
        void ConstructL();
		void ConnectToServerL();
		CBTB();
		enum TState 
			{
			EWaitingToGetDevice,
			EGettingDevice,
			EGettingService,
			EGettingConnection,
			EWaitingToSend,
			EDisconnecting
			};
		TState iState;
		
		CObexClient* iClient;
		TObexBluetoothProtocolInfo protocolInfo;
		TBTDevAddr iAutoConnectAddress;
    };

#endif // __BTB_H__

⌨️ 快捷键说明

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