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

📄 bluetoothadvertiser.h

📁 《基于symbian os的手机开发与应用》
💻 H
字号:
#ifndef __BLUETOOTHADVERTISER_H__
#define __BLUETOOTHADVERTISER_H__

#include <btsdp.h>

// CLASS DECLARATION

/**
*
* @class	CBluetoothAdviser BluetoothAdviser.h 
* @brief	This class contains all the functionality for advertising Bluetooth Services on remote devices via the
* Bluetooth Service Discovery Database
*
* It requires a Port to advertise a service on.
*
* Copyright (c) EMCC Software Ltd 2003
* @version	1.0
* 
*/
class CBluetoothAdvertiser : public CBase
	{
	public: // Constructors
		static CBluetoothAdvertiser* 		NewL();
		static CBluetoothAdvertiser* 		NewLC();
		~CBluetoothAdvertiser();

	private: // Constructors - Symbian 2nd Stage
		CBluetoothAdvertiser();
		void					ConstructL();

	public: // Functionaility
		void					StartAdvertisingL(TInt aPort);
		void					StopAdvertisingL();

	public: // Getters & Setters
		inline TBool				IsAdvertising();
		void					UpdateAvailabilityL(TBool aAvailability);

	private:
		void					BuildProtocolDescriptionL(CSdpAttrValueDES* aProtocolDescriptor, TInt aPort);
		void					ConnectL();

	private: // Data
		RSdp					iSdpSession;
		RSdpDatabase				iSdpDatabase;
		TSdpServRecordHandle			iRecord;
		TInt					iRecordState;
		TBool					iIsConnected;
	};


// Inline function definition

inline TBool CBluetoothAdvertiser::IsAdvertising()
	{
	return iRecord != 0;
	}

#endif // __BLUETOOTHADVERTISER_H__






⌨️ 快捷键说明

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