📄 objectexchangeclient.h
字号:
/* Copyright (c) 2002, Nokia Mobile Phones. All rights reserved */
#ifndef __OBJECTEXCHANGECLIENT_H__
#define __OBJECTEXCHANGECLIENT_H__
#include <e32base.h>
#include <obex.h>
class CObjectExchangeServiceSearcher;
/*!
@class CObjectExchangeClient
@discussion Handles the client interactions with the remote server, namely
the connection, sending of messages and disconnection.
*/
class CObjectExchangeClient : public CActive
{
public:
/*!
@function NewL
@discussion Construct a CObjectExchangeClient
@param aLog the log to send output to
@result a pointer to the created instance of CObjectExchangeClient
*/
static CObjectExchangeClient* NewL();
/*!
@function NewLC
@discussion Construct a CObjectExchangeClient
@param aLog the log to send output to
@result a pointer to the created instance of CObjectExchangeClient
*/
static CObjectExchangeClient* NewLC();
/*!
@function ~CObjectExchangeClient
@discussion Destroy the object and release all memory objects. Close any open sockets
*/
~CObjectExchangeClient();
/*!
@function ConnectL
@discussion Connects to an obex service on a remote machine
*/
void ConnectL();
/*!
@function DisconnectL
@discussion Disconnect from the remote machine, by sending an OBEX disconnect, and
closing the transport on (and regardless of) response from the server.
*/
void DisconnectL();
/*!
@function SendMessageL
@discussion Sends a message to a service on a remote machine
*/
void SendMessageL();
/*!
@function StopL
@discussion Sends the OBEX aborts command to the remote machine
*/
void StopL();
/*!
@function IsConnected
@result ETrue if the client is connected
*/
TBool IsConnected();
/*!
@function IsBusy
@result ETrue if the client is performing some operation.
*/
TBool IsBusy();
TBTDevAddr BTAddy;
bool direkt;
protected: // from CActive
/*!
@function DoCancel
@discussion Cancel any outstanding requests
*/
void DoCancel();
/*!
@function RunL
@discussion Respond to an event
*/
void RunL();
private:
/*!
@function CMessageClient
@discussion Constructs this object
@param aLog the log to send output to
*/
CObjectExchangeClient();
/*!
@function ConstructL
@discussion Performs second phase construction of this object
*/
void ConstructL();
/*!
@function ConnectToServerL
@discussion Connects to the server
*/
void ConnectToServerL();
private:
/*!
@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 EGettingDevice searching for a device
@value EGettingService searching for a service
@value EGettingConnection connecting to a service on a remote machine
@value EWaitingToSend sending a message to the remote machine
@value EDisconnecting disconnecting the server
*/
enum TState
{
EWaitingToGetDevice,
EGettingDevice,
EGettingService,
EGettingConnection,
EWaitingToSend,
EDisconnecting
};
/*! @var iState the state of the active object, determines behaviour within the RunL method. */
TState iState;
/*! @var iServiceSearcher searches for service this client can connect to */
CObjectExchangeServiceSearcher* iServiceSearcher;
/*! @var iClient manages the obex client connection */
CObexClient* iClient;
CObexFileObject *obexFile;
/*! @var iLog the log to send output to */
// MLog& iLog;
};
#endif // __OBJECTEXCHANGECLIENT_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -