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

CNetworkPeer Class Reference

Network peer entity. More...

#include <cobain.h>


Public Member Functions

IMPORT_C ~CNetworkPeer ()
 Deallocates the peer object.

IMPORT_C TDesC & GetDeviceName ()
 Returns the peer device name.

IMPORT_C TDesC8 & GetDeviceAddress ()
 Returns the peer device address.

IMPORT_C TDesC8 & GetServiceID ()
 Returns the peer service name.

IMPORT_C TUint GetPort ()
 Returns the port associated to the service.

IMPORT_C RCobainSocketConnectL ()
 Connects to the remote peer service.

IMPORT_C TProtocol GetProtocol ()
 Returns the protocol (type) of the peer.


Data Fields

TSglQueLink iLink

Private Member Functions

 CNetworkPeer (RCobainClientSession &aSession, TProtocol aProtocol, TUint aPort)
void ConstructL (TDesC &aDeviceName, TDesC8 &aDeviceAddress, TDesC8 &aServiceID)

Static Private Member Functions

CNetworkPeerNewL (RCobainClientSession &aSession, TProtocol aProtocol, TDesC &aDeviceName, TDesC8 &aDeviceAddress, TDesC8 &aServiceID, TUint aPort)

Private Attributes

TProtocol iProtocol
TDesC * iDeviceName
TDesC8 * iServiceID
TDesC8 * iDeviceAddress
TUint iPort
RCobainClientSessioniSession


Detailed Description

Network peer entity.

A peer is in essence a network service with which the client shares a protocol.

Author:
Matti Dahlbom
Version:
beta0_7_2003-12-08, 1.36

Definition at line 156 of file cobain.h.


Constructor & Destructor Documentation

EXPORT_C CNetworkPeer::~CNetworkPeer  ) 
 

Deallocates the peer object.

Definition at line 66 of file networkpeer.cpp.

References iDeviceAddress, iDeviceName, and iServiceID.

CNetworkPeer::CNetworkPeer RCobainClientSession aSession,
TProtocol  aProtocol,
TUint  aPort
[private]
 

Definition at line 53 of file networkpeer.cpp.

Referenced by NewL().


Member Function Documentation

EXPORT_C RCobainSocket * CNetworkPeer::ConnectL  ) 
 

Connects to the remote peer service.

Definition at line 73 of file networkpeer.cpp.

References RCobainClientSession::ConnectSocketL(), and iSession.

void CNetworkPeer::ConstructL TDesC &  aDeviceName,
TDesC8 &  aDeviceAddress,
TDesC8 &  aServiceID
[private]
 

Definition at line 44 of file networkpeer.cpp.

References iDeviceAddress, iDeviceName, and iServiceID.

Referenced by NewL().

IMPORT_C TDesC8& CNetworkPeer::GetDeviceAddress  )  [inline]
 

Returns the peer device address.

Definition at line 172 of file cobain.h.

References iDeviceAddress.

Referenced by RCobainClientSession::ConnectSocketL().

IMPORT_C TDesC& CNetworkPeer::GetDeviceName  )  [inline]
 

Returns the peer device name.

Definition at line 167 of file cobain.h.

References iDeviceName.

Referenced by RCobainClientSession::ConnectSocketL().

IMPORT_C TUint CNetworkPeer::GetPort  )  [inline]
 

Returns the port associated to the service.

Definition at line 182 of file cobain.h.

References iPort.

Referenced by RCobainClientSession::ConnectSocketL().

IMPORT_C TProtocol CNetworkPeer::GetProtocol  )  [inline]
 

Returns the protocol (type) of the peer.

Definition at line 192 of file cobain.h.

References iProtocol, and TProtocol.

Referenced by RCobainClientSession::ConnectSocketL().

IMPORT_C TDesC8& CNetworkPeer::GetServiceID  )  [inline]
 

Returns the peer service name.

Definition at line 177 of file cobain.h.

References iServiceID.

Referenced by RCobainClientSession::ConnectSocketL().

CNetworkPeer * CNetworkPeer::NewL RCobainClientSession aSession,
TProtocol  aProtocol,
TDesC &  aDeviceName,
TDesC8 &  aDeviceAddress,
TDesC8 &  aServiceID,
TUint  aPort
[static, private]
 

Definition at line 29 of file networkpeer.cpp.

References CNetworkPeer(), and ConstructL().

Referenced by CPeerListPump::AddPeerToListL(), and RCobainClientSession::DiscoverBTPeersL().


Friends And Related Function Documentation

friend class CPeerListPump [friend]
 

Definition at line 230 of file cobain.h.

friend class RCobainClientSession [friend]
 

Definition at line 229 of file cobain.h.


Field Documentation

TDesC8* CNetworkPeer::iDeviceAddress [private]
 

Definition at line 221 of file cobain.h.

Referenced by ConstructL(), GetDeviceAddress(), and ~CNetworkPeer().

TDesC* CNetworkPeer::iDeviceName [private]
 

Definition at line 215 of file cobain.h.

Referenced by ConstructL(), GetDeviceName(), and ~CNetworkPeer().

TSglQueLink CNetworkPeer::iLink
 

Definition at line 194 of file cobain.h.

TUint CNetworkPeer::iPort [private]
 

Definition at line 224 of file cobain.h.

Referenced by GetPort().

TProtocol CNetworkPeer::iProtocol [private]
 

Definition at line 212 of file cobain.h.

Referenced by GetProtocol().

TDesC8* CNetworkPeer::iServiceID [private]
 

Definition at line 218 of file cobain.h.

Referenced by ConstructL(), GetServiceID(), and ~CNetworkPeer().

RCobainClientSession& CNetworkPeer::iSession [private]
 

Definition at line 227 of file cobain.h.

Referenced by ConnectL().


The documentation for this class was generated from the following files:
Generated on Mon Dec 8 10:26:08 2003 for CobainAPIImplementation by doxygen 1.3.5