Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XFcBtHandler Class Reference

Used to handle data flow thought RFCOMM interface. More...

Inheritance diagram for XFcBtHandler:

[legend]
Collaboration diagram for XFcBtHandler:

[legend]
List of all members.

## Public Member Functions
virtual XFCIMPORT | ~XFcBtHandler ()
| Virtual destructor.
XFCIMPORT INT | openServer (XFcAddress &aAddress, INT32 aClientCount)
| Opens handlers server behavior.
XFCIMPORT INT | listenConnection (XFcBtClientWin &aClient)
| Creates connection to given client.
XFCIMPORT void | cancelListen ()
| Cancels listen.
XFCIMPORT INT | isServer ()
| Determines if handler is a server.
virtual XFCIMPORT void | closeService ()
| Closes handler service.
virtual XFCIMPORT INT | outgoing ()
| Sends a packet.
virtual XFCIMPORT INT | incoming ()
| Receives a packet frame.
XFCIMPORT void | setDefaultSpeed (INT aType)
| Sets connection type.
virtual XFCIMPORT void | checkActivity ()
| Checks client activity.
virtual XFCIMPORT void | unknownSender (const XFcAddress *aAddress, XFcObjectPacketBase *aPacket)
| Handles data which sender is not known.
## Static Public Member Functions
XFCIMPORT XFcBtHandler * | create (INT aIsServer, INT32 aSendMtu=XFCNET_SEND_BUFFER_SIZE, INT32 aRecvMtu=XFCNET_RECV_BUFFER_SIZE)
| Static constructor.
## Protected Member Functions
XFCIMPORT | XFcBtHandler ()
| Protected constructor.
XFCIMPORT INT | init (INT aIsServer, INT32 aSendMtu, INT32 aRecvMtu)
| Initialize XFcBtHandler.
## Private Attributes
XFcObjectPacketBase * | mSendBuffer
| Buffer for sending data.
XFcObjectPacketBase * | mRecvBuffer
| Buffer for receiving data.
XFcSocket * | mSocket
| Holds server socket.
XFcBtAddress * | mAddress
| Holds bt address.
INT | mServerStatus
| Holds server status.
XFcBtSecurity * | mSecurity
| Holds bt security manager.

## Detailed Description

Used to handle data flow thought RFCOMM interface.

Its responsibility is to be data flow interface for sending/receiving data througth RFCOMM. It works as RFCOMM server to other clients if needed. Its only binding interface and does not own any client connection. It holds sending and receiving buffers where data is copied before sending or accessing (receiving) it.

## Constructor & Destructor Documentation

XFCIMPORT XFcBtHandler::XFcBtHandler | ( |  | ) | `[protected]`

| Protected constructor.

virtual XFCIMPORT XFcBtHandler::~XFcBtHandler | ( |  | ) | `[virtual]`

| Virtual destructor.

## Member Function Documentation

XFCIMPORT void XFcBtHandler::cancelListen | ( |  | ) |

| Cancels listen.

virtual XFCIMPORT void XFcBtHandler::checkActivity | ( |  | ) | `[virtual]`

| Checks client activity. Implements XFcCommunicationHandler.

virtual XFCIMPORT void XFcBtHandler::closeService | ( |  | ) | `[virtual]`

| Closes handler service. Implements XFcCommunicationHandler.

XFCIMPORT XFcBtHandler* XFcBtHandler::create | ( | INT | aIsServer,
|  | INT32 | aSendMtu = XFCNET_SEND_BUFFER_SIZE,
|  | INT32 | aRecvMtu = XFCNET_RECV_BUFFER_SIZE
| ) | `[static]`

  | Static constructor. Parameters:
  aIsServer | must be true if handler is used as a server.
  aSendMtu | Maximum MTU size for sendable packet.
  aRecvMtu | Maximum MTU size for receivable packet.

virtual XFCIMPORT INT XFcBtHandler::incoming | ( |  | ) | `[virtual]`

| Receives a packet frame. Returns: size of received packet if succesful, or XFCNET_ERROR otherwise. Implements XFcCommunicationHandler.

XFCIMPORT INT XFcBtHandler::init | ( | INT | aIsServer,
|  | INT32 | aSendMtu,
|  | INT32 | aRecvMtu
| ) | `[protected]`

| Initialize XFcBtHandler.

XFCIMPORT INT XFcBtHandler::isServer | ( |  | ) |

| Determines if handler is a server. Returns: 1 if handler works as server, or 0 otherwise.

XFCIMPORT INT XFcBtHandler::listenConnection | ( | XFcBtClientWin & | aClient | ) |

  | Creates connection to given client. Parameters:
  aClient | empty client that is used for incoming connection.
Returns: 1 if listen starts properly, or 0 otherwise.

XFCIMPORT INT XFcBtHandler::openServer | ( | XFcAddress & | aAddress,
|  | INT32 | aClientCount
| ) |

  | Opens handlers server behavior. Parameters:
  aAddress | address used to bind server service.
  aClientCount | client count.
Note: N7650 does not support more than one client. Returns: 1 if server is created succesfully, or 0 otherwise.

virtual XFCIMPORT INT XFcBtHandler::outgoing | ( |  | ) | `[virtual]`

| Sends a packet. Returns: size of sent packet if succesful, or XFCNET_ERROR otherwise. Implements XFcCommunicationHandler.

XFCIMPORT void XFcBtHandler::setDefaultSpeed | ( | INT | aType | ) |

  | Sets connection type. Parameters:
  aType | connection type.

virtual XFCIMPORT void XFcBtHandler::unknownSender | ( | const XFcAddress * | aAddress,
|  | XFcObjectPacketBase * | aPacket
| ) | `[virtual]`

| Handles data which sender is not known. Implements XFcCommunicationHandler.

## Member Data Documentation

XFcBtAddress* XFcBtHandler::mAddress`[private]`

| Holds bt address.

XFcObjectPacketBase* XFcBtHandler::mRecvBuffer`[private]`

| Buffer for receiving data.

XFcBtSecurity* XFcBtHandler::mSecurity`[private]`

| Holds bt security manager.

XFcObjectPacketBase* XFcBtHandler::mSendBuffer`[private]`

| Buffer for sending data.

INT XFcBtHandler::mServerStatus`[private]`

| Holds server status.

XFcSocket* XFcBtHandler::mSocket`[private]`

| Holds server socket.

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch