kget
bt::Request Class Reference
#include <request.h>
Inheritance diagram for bt::Request:

Detailed Description
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 | ( | ) |
| 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 | ) |
| bt::Request::~Request | ( | ) | [virtual] |
Definition at line 36 of file request.cpp.
Member Function Documentation
| Uint32 bt::Request::getIndex | ( | ) | const [inline] |
| Uint32 bt::Request::getLength | ( | ) | const [inline] |
| Uint32 bt::Request::getOffset | ( | ) | const [inline] |
| PieceDownloader* bt::Request::getPieceDownloader | ( | ) | const [inline] |
Friends And Related Function Documentation
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:
KDE 4.2 API Reference