📄 bluetoothadvertiser.h
字号:
#ifndef BLUETOOTHADVERTISER_H_
#define BLUETOOTHADVERTISER_H_
#include <btsdp.h>
// CLASS DECLARATION
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 + -