• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

bt::ChunkSelectorInterface

bt::ChunkSelectorInterface Class Reference

#include <chunkselectorinterface.h>

Inheritance diagram for bt::ChunkSelectorInterface:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Joris Guisson

Interface class for selecting chunks to download.

Definition at line 40 of file chunkselectorinterface.h.


Public Member Functions

 ChunkSelectorInterface (ChunkManager &cman, Downloader &downer, PeerManager &pman)
virtual void dataChecked (const BitSet &ok_chunks)=0
virtual void reincluded (Uint32 from, Uint32 to)=0
virtual void reinsert (Uint32 chunk)=0
virtual bool select (PieceDownloader *pd, Uint32 &chunk)=0
virtual bool selectRange (Uint32 &from, Uint32 &to)
virtual ~ChunkSelectorInterface ()

Protected Attributes

ChunkManager & cman
Downloader & downer
PeerManager & pman

Constructor & Destructor Documentation

bt::ChunkSelectorInterface::ChunkSelectorInterface ( ChunkManager &  cman,
Downloader &  downer,
PeerManager &  pman 
)

Definition at line 26 of file chunkselectorinterface.cpp.

bt::ChunkSelectorInterface::~ChunkSelectorInterface (  )  [virtual]

Definition at line 32 of file chunkselectorinterface.cpp.


Member Function Documentation

virtual void bt::ChunkSelectorInterface::dataChecked ( const BitSet &  ok_chunks  )  [pure virtual]

Data has been checked, and these chunks are OK.

Parameters:
ok_chunks The ok_chunks

Implemented in BTChunkSelector, and bt::ChunkSelector.

virtual void bt::ChunkSelectorInterface::reincluded ( Uint32  from,
Uint32  to 
) [pure virtual]

A range of chunks has been reincluded.

This is called when a user reselects a file for download.

Parameters:
from The first chunk
to The last chunk

Implemented in BTChunkSelector, and bt::ChunkSelector.

virtual void bt::ChunkSelectorInterface::reinsert ( Uint32  chunk  )  [pure virtual]

Reinsert a chunk.

This is called when a chunk is corrupted or downloading it failed (hash doesn't match) The selector should make sure that this is added again

Parameters:
chunk The chunk

Implemented in BTChunkSelector, and bt::ChunkSelector.

virtual bool bt::ChunkSelectorInterface::select ( PieceDownloader *  pd,
Uint32 &  chunk 
) [pure virtual]

Select which chunk to download for a PieceDownloader.

Parameters:
pd The PieceDownloader
chunk Index of chunk gets stored here
Returns:
true upon succes, false otherwise

Implemented in BTChunkSelector, and bt::ChunkSelector.

bool bt::ChunkSelectorInterface::selectRange ( Uint32 &  from,
Uint32 &  to 
) [virtual]

Select a range of chunks to download from a webseeder.

Parameters:
from First chunk of the range
to Last chunk of the range
Returns:
true if everything is OK

Reimplemented in bt::ChunkSelector.

Definition at line 36 of file chunkselectorinterface.cpp.


Member Data Documentation

ChunkManager& bt::ChunkSelectorInterface::cman [protected]

Definition at line 43 of file chunkselectorinterface.h.

Downloader& bt::ChunkSelectorInterface::downer [protected]

Definition at line 44 of file chunkselectorinterface.h.

PeerManager& bt::ChunkSelectorInterface::pman [protected]

Definition at line 45 of file chunkselectorinterface.h.


The documentation for this class was generated from the following files:
  • chunkselectorinterface.h
  • chunkselectorinterface.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal