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

CPeerListPump Class Reference

Active Object for asynhronous peer list retrieval. More...

#include <peerlistpump.h>


Public Member Functions

 CPeerListPump (TProtocol aProtocol, RCobainClientSession &aClientSession)
 ~CPeerListPump ()
void DiscoverPeers (TUint aServiceClassID, MNetworkDriverListener *aListener)
 Asynchronously retrieves the peer list.

void RunL ()
void DoCancel ()

Private Types

enum  TOperationStatus { ENone, ECountPeers, EFetchPeer }

Private Member Functions

void AddPeerToListL ()
 Adds the currently fetched peer to the peer list.


Private Attributes

RCobainClientSessioniClientSession
TProtocol iProtocol
TUint iServiceClassID
MNetworkDriverListeneriListener
TOperationStatus iOperationStatus
TInt iNumPeers
TInt iNextPeerOrdinal
TPckgBuf< TInt > iPeerCountBuffer
TPeerDataBuf iPeerDataBuffer
TPeerListiPeerList


Detailed Description

Active Object for asynhronous peer list retrieval.

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

Definition at line 38 of file peerlistpump.h.


Member Enumeration Documentation

enum CPeerListPump::TOperationStatus [private]
 

Enumeration values:
ENone 
ECountPeers 
EFetchPeer 

Definition at line 75 of file peerlistpump.h.


Constructor & Destructor Documentation

CPeerListPump::CPeerListPump TProtocol  aProtocol,
RCobainClientSession aClientSession
 

Definition at line 29 of file peerlistpump.cpp.

CPeerListPump::~CPeerListPump  ) 
 

Definition at line 39 of file peerlistpump.cpp.

References iListener.


Member Function Documentation

void CPeerListPump::AddPeerToListL  )  [private]
 

Adds the currently fetched peer to the peer list.

Definition at line 57 of file peerlistpump.cpp.

References iClientSession, iPeerDataBuffer, iPeerList, iProtocol, CNetworkPeer::NewL(), and TPeerList.

Referenced by RunL().

void CPeerListPump::DiscoverPeers TUint  aServiceClassID,
MNetworkDriverListener aListener
 

Asynchronously retrieves the peer list.

Parameters:
aServiceClassID Service class ID of the requested service
aListener listener for the asynchronous operation

Definition at line 47 of file peerlistpump.cpp.

References RCobainClientSession::DiscoverPeers(), ECountPeers, iClientSession, iListener, iOperationStatus, iPeerCountBuffer, iProtocol, and iServiceClassID.

Referenced by CDriverBase::DiscoverPeersL(), and CDriver::DiscoverPeersL().

void CPeerListPump::DoCancel  ) 
 

Definition at line 120 of file peerlistpump.cpp.

References iListener, MNetworkDriverListener::PeerListComplete(), Log::Print(), and TPeerList.

void CPeerListPump::RunL  ) 
 

Definition at line 73 of file peerlistpump.cpp.

References AddPeerToListL(), ECountPeers, EFetchPeer, ENone, RCobainClientSession::FetchPeerData(), iClientSession, iListener, iNextPeerOrdinal, iNumPeers, iOperationStatus, iPeerCountBuffer, iPeerDataBuffer, iPeerList, MNetworkDriverListener::PeerListComplete(), MNetworkDriverListener::PeerListRetrievalFailed(), and TPeerList.


Field Documentation

RCobainClientSession& CPeerListPump::iClientSession [private]
 

Definition at line 63 of file peerlistpump.h.

Referenced by AddPeerToListL(), DiscoverPeers(), and RunL().

MNetworkDriverListener* CPeerListPump::iListener [private]
 

Definition at line 72 of file peerlistpump.h.

Referenced by DiscoverPeers(), DoCancel(), RunL(), and ~CPeerListPump().

TInt CPeerListPump::iNextPeerOrdinal [private]
 

Definition at line 88 of file peerlistpump.h.

Referenced by RunL().

TInt CPeerListPump::iNumPeers [private]
 

Definition at line 85 of file peerlistpump.h.

Referenced by RunL().

TOperationStatus CPeerListPump::iOperationStatus [private]
 

Definition at line 82 of file peerlistpump.h.

Referenced by DiscoverPeers(), and RunL().

TPckgBuf<TInt> CPeerListPump::iPeerCountBuffer [private]
 

Definition at line 91 of file peerlistpump.h.

Referenced by DiscoverPeers(), and RunL().

TPeerDataBuf CPeerListPump::iPeerDataBuffer [private]
 

Definition at line 94 of file peerlistpump.h.

Referenced by AddPeerToListL(), and RunL().

TPeerList* CPeerListPump::iPeerList [private]
 

Definition at line 97 of file peerlistpump.h.

Referenced by AddPeerToListL(), and RunL().

TProtocol CPeerListPump::iProtocol [private]
 

Definition at line 66 of file peerlistpump.h.

Referenced by AddPeerToListL(), and DiscoverPeers().

TUint CPeerListPump::iServiceClassID [private]
 

Definition at line 69 of file peerlistpump.h.

Referenced by DiscoverPeers().


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