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

kget

bt::Request

bt::Request Class Reference

#include <request.h>

Inheritance diagram for bt::Request:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Joris Guisson

Request of a piece sent to other peers

This class keeps track of a request of a piece. The Request consists of an index (the index of the chunk), offset into the chunk and the length of a piece.

The PeerID of the Peer who sent the request is also kept.

Definition at line 39 of file request.h.


Public Member Functions

Uint32 getIndex () const
Uint32 getLength () const
Uint32 getOffset () const
PieceDownloader * getPieceDownloader () const
Request & operator= (const Request &r)
 Request (const Request &r)
 Request (Uint32 index, Uint32 off, Uint32 len, PieceDownloader *pd)
 Request ()
virtual ~Request ()

Friends

bool operator== (const Request &a, const Request &b)

Constructor & Destructor Documentation

bt::Request::Request (  ) 

Constructor, set everything to 0.

Definition at line 25 of file request.cpp.

bt::Request::Request ( Uint32  index,
Uint32  off,
Uint32  len,
PieceDownloader *  pd 
)

Constructor, set the index, offset,length and peer.

Parameters:
index The index of the chunk
off The offset into the chunk
len The length of the piece
pd Pointer to PieceDownloader of the request

Definition at line 28 of file request.cpp.

bt::Request::Request ( const Request &  r  ) 

Copy constructor.

Parameters:
r Request to copy

Definition at line 32 of file request.cpp.

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

Definition at line 36 of file request.cpp.


Member Function Documentation

Uint32 bt::Request::getIndex (  )  const [inline]

Get the index of the chunk.

Definition at line 64 of file request.h.

Uint32 bt::Request::getLength (  )  const [inline]

Get the length of a the piece.

Definition at line 70 of file request.h.

Uint32 bt::Request::getOffset (  )  const [inline]

Get the offset into the chunk.

Definition at line 67 of file request.h.

PieceDownloader* bt::Request::getPieceDownloader (  )  const [inline]

Get the sending Peer.

Definition at line 73 of file request.h.

Request & bt::Request::operator= ( const Request &  r  ) 

Assignmenth operator.

Parameters:
r The Request to copy

Definition at line 40 of file request.cpp.


Friends And Related Function Documentation

bool operator== ( const Request &  a,
const Request &  b 
) [friend]

Compare two requests.

Return true if they are the same. This only compares the index,offset and length.

Parameters:
a The first request
b The second request
Returns:
true if they are equal

Definition at line 49 of file request.cpp.


The documentation for this class was generated from the following files:
  • request.h
  • request.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