bluetoothadvertiser.h
来自「symbianOS第三版开发与实用教程部分源码和部分试验」· C头文件 代码 · 共 47 行
H
47 行
#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 + =
减小字号Ctrl + -
显示快捷键?