Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

CDriver Class Reference

MNetworkDriver implementation. More...

#include <driver.h>

Inheritance diagram for CDriver:

MNetworkDriver

Public Member Functions

 CDriver (RCobainClientSession &aClientSession, TProtocol aProtocol)
virtual ~CDriver ()
TProtocol GetProtocol ()
 Returns the protocol (type) of this driver.

void ListenL (TUint aServiceID, MConnectionListener *aListener, TUint aExtraInfo=0)
 Listen to incoming connections.

void StopListeningL ()
 Aborts the current listen operation.

void DiscoverPeersL (TUint aServiceClassID, MNetworkDriverListener *aListener)
 Asynchronously retrieves the network peers.

void CancelPeerDiscovery ()
 Cancels pending peer discovery.


Protected Attributes

RCobainClientSessioniClientSession
MNetworkDriverListeneriListener
CConnectionListeneriConnectionListener

Private Attributes

TProtocol iProtocol
CPeerListPump iPeerListPump

Detailed Description

MNetworkDriver implementation.

Author:
Matti Dahlbom
Version:
beta0_9_1_2004-01-13, 1.3

Definition at line 40 of file driver.h.


Constructor & Destructor Documentation

CDriver::CDriver RCobainClientSession aClientSession,
TProtocol  aProtocol
 

Definition at line 28 of file driver.cpp.

CDriver::~CDriver  )  [virtual]
 

Definition at line 36 of file driver.cpp.

References iConnectionListener, iPeerListPump, and StopListeningL().


Member Function Documentation

void CDriver::CancelPeerDiscovery  )  [virtual]
 

Cancels pending peer discovery.

Implements MNetworkDriver.

Definition at line 92 of file driver.cpp.

References iPeerListPump.

void CDriver::DiscoverPeersL TUint  aServiceClassID,
MNetworkDriverListener aListener
[virtual]
 

Asynchronously retrieves the network peers.

PeerListComplete() will be called for the MNetworkDriverListener implementation upon completion of the peer list.

Legal values to supply in the aServiceID parameter:

  • Bluetooth driver: the service class id (UUID) of the service. Use 0 to discover all peers.

Parameters:
aServiceID protocol specific value for identifying the service of the peer
aListener listener to be informed about the peer list

Implements MNetworkDriver.

Definition at line 87 of file driver.cpp.

References CPeerListPump::DiscoverPeers(), and iPeerListPump.

TProtocol CDriver::GetProtocol  )  [inline, virtual]
 

Returns the protocol (type) of this driver.

Returns:
protocol (type) of this driver

Implements MNetworkDriver.

Definition at line 46 of file driver.h.

References iProtocol, and TProtocol.

void CDriver::ListenL TUint  aServiceID,
MConnectionListener aListener,
TUint  aExtraInfo = 0
[virtual]
 

Listen to incoming connections.

If there is a listen operation already pending, leaves with KErrDriverAlreadyListening.

The following values may be used for the aExtraInfo parameter:

  • Bluetooth driver: KRFCOMM or KL2CAP. The value is used to decide to which protocol to listen to. The default is KRFCOMM.

Parameters:
aPort port to listen to. value of this parameter is implementation dependent
aListener listener whose Accept() method is called when a new incoming connection is available.
aExtraInfo protocol specific extra information.

Implements MNetworkDriver.

Definition at line 46 of file driver.cpp.

References EBluetooth, iClientSession, iConnectionListener, iProtocol, KErrDriverAlreadyListening, CConnectionListener::Listen(), and RCobainClientSession::StartListeningL().

void CDriver::StopListeningL  )  [virtual]
 

Aborts the current listen operation.

No more incoming connections will be received. If there is no pending listen operation, this method will leave with KErrDriverNotListening.

Implements MNetworkDriver.

Definition at line 72 of file driver.cpp.

References iConnectionListener, iListener, and KErrDriverNotListening.

Referenced by ~CDriver().


Field Documentation

RCobainClientSession& CDriver::iClientSession [protected]
 

Definition at line 55 of file driver.h.

Referenced by ListenL().

CConnectionListener* CDriver::iConnectionListener [protected]
 

Definition at line 61 of file driver.h.

Referenced by ListenL(), StopListeningL(), and ~CDriver().

MNetworkDriverListener* CDriver::iListener [protected]
 

Definition at line 58 of file driver.h.

Referenced by StopListeningL().

CPeerListPump CDriver::iPeerListPump [private]
 

Definition at line 68 of file driver.h.

Referenced by CancelPeerDiscovery(), DiscoverPeersL(), and ~CDriver().

TProtocol CDriver::iProtocol [private]
 

Definition at line 65 of file driver.h.

Referenced by GetProtocol(), and ListenL().


The documentation for this class was generated from the following files:
Generated on Tue Jan 13 15:47:09 2004 for CobainAPIImplementation by doxygen 1.3.5