📄 btconnectionclient.h
字号:
/* Copyright (c) 2002, Nokia Mobile Phones. All rights reserved */
#ifndef __BTCONNECTIONCLIENT_H__
#define __BTCONNECTIONCLIENT_H__
#include "BTConnectionBase.h"
#include <bt_sock.h>
#include <BTextNotifiers.h>
#include <BtSdp.h>
class CBTServiceSearcher;
class MLog;
class MBTClientNotify;
/*!
@class CBTConnectionClient
@discussion Connects and sends messages to a remote machine using bluetooth
*/
class CBTConnectionClient : public CBTConnectionBase
{
public:
/*!
@function NewL
@discussion Construct a CBTConnectionClient
@param aLog the log to send output to
@result a pointer to the created instance of CBTConnectionClient
*/
static CBTConnectionClient* NewL(MBTClientNotify& aNotify, MLog& aLog);
/*!
@function ~CBTConnectionClient
@discussion Destroy the object and release all memory objects. Close any open sockets
*/
~CBTConnectionClient();
/*!
@function ConnectL
@discussion Connect to an available service on a remote machine
*/
void ConnectL();
protected: // from CActive
/*!
@function DoCancel
@discussion Cancel any outstanding requests
*/
void DoCancel();
/*!
@function RunL
@discussion Respond to an event
*/
void RunL();
private:
/*!
@function ConnectToServerL
@discussion Connects to the service
*/
void ConnectToServerL();
/*!
@function CBTConnectionClient
@discussion Constructs this object
*/
CBTConnectionClient(MBTClientNotify& aNotify, MLog& aLog);
/*!
@function ConstructL
@discussion Performs second phase construction of this object
*/
void ConstructL();
private:
/*! @var iNotify pointer to observer object for this class*/
MBTClientNotify& iNotify;
/*!
@enum TState
@discussion The state of the active object, determines behaviour within
the RunL method.
@value EWaitingToGetDevice waiting for the user to select a device
@value EGettingService searching for a service
@value EConnecting connecting to a service on a remote machine
@value EConnected sending a message to the remote machine
*/
enum TState
{
EWaitingToGetDevice,
EGettingService,
EConnecting,
EConnected
};
/*! @var iState the current state of the client */
TState iState;
/*! @var iServiceSearcher searches for service this client can connect to */
CBTServiceSearcher* iServiceSearcher;
};
#endif // __BTCONNECTIONCLIENT_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -