bluetoothservicesearcher.h

来自「symbianOS第三版开发与实用教程部分源码和部分试验」· C头文件 代码 · 共 56 行

H
56
字号
#ifndef BLUETOOTHSERVICESEARCHER_H_
#define BLUETOOTHSERVICESEARCHER_H_
// System includes
#include <btsdp.h>

// User defined includes
#include "TBluetoothAttributeParser.h"
#include "BluetoothAttributeObserver.h"

// Forward declaration
class CAknWaitDialog;

// CLASS DECLARATION


class CBluetoothServiceSearcher : public CBase, public MSdpAgentNotifier, public MBluetoothAttributeObserver
 	{
	public: // Constructors
		static CBluetoothServiceSearcher* 	NewL(TInt& aPort);
		static CBluetoothServiceSearcher* 	NewLC(TInt& aPort);
		~CBluetoothServiceSearcher();

	private: // Constructors - Symbian 2nd stage
		CBluetoothServiceSearcher(TInt& aPort);
		void					ConstructL();

	public: // Member functions - Functionality
		void 					CloseL();
		TInt 					FindServiceL(const TBTDevAddr& aDeviceAddress);
		void 					SetPort(TInt aPort);

	public: // Member functions - From MSdpAgentNotifier
		virtual void			NextRecordRequestComplete(TInt aError, TSdpServRecordHandle aHandle, TInt aTotalRecordsCount);
		virtual void			AttributeRequestResult(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, CSdpAttrValue* aAttrValue);
		virtual void			AttributeRequestComplete(TSdpServRecordHandle aHandle, TInt aError);

		void					NextRecordRequestCompleteL(TInt aError, TSdpServRecordHandle aHandle, TInt aTotalRecordsCount);
		void					AttributeRequestResultL(TSdpServRecordHandle aHandle, TSdpAttributeID aAttrID, CSdpAttrValue* aAttrValue);
		void					AttributeRequestCompleteL(TSdpServRecordHandle aHandle, TInt aError);

	private: // Member functions - utility functions
		void					DisplayProgressDialogL();
		void					RemoveProgressDialogL();

	private: // Member Data 
		CSdpAgent*				iAgent;
		CSdpSearchPattern*		iSdpSearchPattern;
		CSdpAttrIdMatchList* 	iMatchList;
		CAknWaitDialog*			iWaitDialog;
		TInt&					iPort;
		TInt					iSearcherState;
		TBool					iContinueSearching;
		TBool					iAvailable;
	};
#endif /*BLUETOOTHSERVICESEARCHER_H_*/

⌨️ 快捷键说明

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