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 () const
 Returns the peer device name.

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

IMPORT_C TDesC & GetServiceName () const
 Returns the service name.

IMPORT_C RCobainSocketConnectL ()
 Connects to the remote peer service.

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


Data Fields

TSglQueLink iLink

Private Member Functions

 CNetworkPeer (RCobainClientSession &aSession, TProtocol aProtocol)
void ConstructL (TPeerData &aPeerData)
 2nd phase constructor

TDesC8 * CopyPeerPropertiesL (TPeerData &aPeerData)
 Creates protocol specific peer properties.

TDes8 * GetPeerProperties () const
 Returns a pointer to the peer's protocol specific properties.

void WritePeerData (TPeerData &aPeerData)
 Write the peer data information into a TPeerData structure.


Static Private Member Functions

CNetworkPeerNewL (RCobainClientSession &aSession, TProtocol aProtocol, TPeerData &aPeerData)

Private Attributes

TProtocol iProtocol
HBufC * iDeviceName
HBufC8 * iDeviceAddress
HBufC * iServiceName
RCobainClientSessioniSession
TDes8 * iProtocolSpecificPeerData


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_9_1_2004-01-13, 1.40

Definition at line 159 of file cobain.h.


Constructor & Destructor Documentation

EXPORT_C CNetworkPeer::~CNetworkPeer  ) 
 

Deallocates the peer object.

Definition at line 90 of file networkpeer.cpp.

References iDeviceAddress, iDeviceName, iProtocolSpecificPeerData, and iServiceName.

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

Definition at line 29 of file networkpeer.cpp.

Referenced by NewL().


Member Function Documentation

EXPORT_C RCobainSocket * CNetworkPeer::ConnectL  ) 
 

Connects to the remote peer service.

Definition at line 98 of file networkpeer.cpp.

References RCobainClientSession::ConnectSocketL(), and iSession.

void CNetworkPeer::ConstructL TPeerData aPeerData  )  [private]
 

2nd phase constructor

Definition at line 48 of file networkpeer.cpp.

References CopyPeerPropertiesL(), TPeerData::iDeviceAddress, iDeviceAddress, TPeerData::iDeviceName, iDeviceName, TPeerData::iServiceName, and iServiceName.

Referenced by NewL().

TDesC8 * CNetworkPeer::CopyPeerPropertiesL TPeerData aPeerData  )  [private]
 

Creates protocol specific peer properties.

Definition at line 58 of file networkpeer.cpp.

References EBluetooth, iProtocol, iProtocolSpecificPeerData, TPeerData::p, and TBTPeerPropertiesBuf.

Referenced by ConstructL().

IMPORT_C TDesC8& CNetworkPeer::GetDeviceAddress  )  const [inline]
 

Returns the peer device address.

Definition at line 175 of file cobain.h.

References iDeviceAddress.

Referenced by CBTUtil::FormatAddress(), and WritePeerData().

IMPORT_C TDesC& CNetworkPeer::GetDeviceName  )  const [inline]
 

Returns the peer device name.

Definition at line 170 of file cobain.h.

References iDeviceName.

Referenced by WritePeerData().

TDes8* CNetworkPeer::GetPeerProperties  )  const [inline, private]
 

Returns a pointer to the peer's protocol specific properties.

The contents of this buffer depend on the protocol of the peer.

Definition at line 216 of file cobain.h.

References iProtocolSpecificPeerData.

Referenced by CBTUtil::GetListenPortL().

IMPORT_C TProtocol CNetworkPeer::GetProtocol  )  const [inline]
 

Returns the protocol (type) of the peer.

Definition at line 190 of file cobain.h.

References iProtocol, and TProtocol.

Referenced by RCobainClientSession::ConnectSocketL(), and CBTUtil::FormatAddress().

IMPORT_C TDesC& CNetworkPeer::GetServiceName  )  const [inline]
 

Returns the service name.

Definition at line 180 of file cobain.h.

References iServiceName.

CNetworkPeer * CNetworkPeer::NewL RCobainClientSession aSession,
TProtocol  aProtocol,
TPeerData aPeerData
[static, private]
 

Definition at line 36 of file networkpeer.cpp.

References CNetworkPeer(), and ConstructL().

Referenced by CPeerListPump::AddPeerToListL().

void CNetworkPeer::WritePeerData TPeerData aPeerData  )  [private]
 

Write the peer data information into a TPeerData structure.

Definition at line 73 of file networkpeer.cpp.

References EBluetooth, GetDeviceAddress(), GetDeviceName(), TPeerData::iDeviceAddress, TPeerData::iDeviceName, iProtocol, iProtocolSpecificPeerData, and TPeerData::p.

Referenced by RCobainClientSession::ConnectSocketL().


Friends And Related Function Documentation

friend class CBTUtil [friend]
 

Definition at line 243 of file cobain.h.

friend class CPeerListPump [friend]
 

Definition at line 242 of file cobain.h.

friend class RCobainClientSession [friend]
 

Definition at line 241 of file cobain.h.


Field Documentation

HBufC8* CNetworkPeer::iDeviceAddress [private]
 

Definition at line 230 of file cobain.h.

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

HBufC* CNetworkPeer::iDeviceName [private]
 

Definition at line 227 of file cobain.h.

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

TSglQueLink CNetworkPeer::iLink
 

Definition at line 192 of file cobain.h.

TProtocol CNetworkPeer::iProtocol [private]
 

Definition at line 224 of file cobain.h.

Referenced by CopyPeerPropertiesL(), GetProtocol(), and WritePeerData().

TDes8* CNetworkPeer::iProtocolSpecificPeerData [private]
 

Definition at line 239 of file cobain.h.

Referenced by CopyPeerPropertiesL(), GetPeerProperties(), WritePeerData(), and ~CNetworkPeer().

HBufC* CNetworkPeer::iServiceName [private]
 

Definition at line 233 of file cobain.h.

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

RCobainClientSession& CNetworkPeer::iSession [private]
 

Definition at line 236 of file cobain.h.

Referenced by ConnectL().


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