#include <Piece.h> [code]
Inherits Protocols::BitTorrent::Packets::PacketBase.
Inheritance diagram for Protocols::BitTorrent::Packets::Piece:


The Piece packet is used to transmit a piece from a file.
Definition at line 37 of file Piece.h.
Public Member Functions | |
| QString | name () const |
| Returns the name of the PacketBase type the dynamic object belongs to. | |
| auto_ptr< DataBase > | copy () const |
| Virtual copy constructor. | |
| Piece (quint32 pieceIndex=0, quint32 startOffset=0, const QByteArray &pieceBytes=QByteArray()) | |
| quint32 | pieceIndex () const |
| Getter for the packet field pieceIndex. | |
| void | setPieceIndex (quint32) |
| Setter for the packet field pieceIndex. | |
| quint32 | startOffset () const |
| Getter for the packet field startOffset. | |
| void | setStartOffset (quint32) |
| Setter for the packet field startOffset. | |
| QByteArray | pieceBytes () const |
| Getter for the packet field pieceBytes. | |
| void | setPieceBytes (const QByteArray &) |
| Setter for the packet field pieceBytes. | |
Protected Member Functions | |
| void | readPayload (BinaryReader &) |
| Reads the packet's payload fields. | |
| void | writePayload (BinaryWriter &) const |
| Writes the packet's payload fields. | |
| Q_DECLARE_SHARED_DATA (Data) | |
Classes | |
| class | Data |
| Piece packet's private data. More... | |
|
||||||||||||||||
|
|
|
|
Virtual copy constructor.
Implements Protocols::BitTorrent::Packets::PacketBase. |
|
|
Returns the name of the PacketBase type the dynamic object belongs to.
Implements Protocols::BitTorrent::Packets::PacketBase. |
|
|
Getter for the packet field pieceBytes.
|
|
|
Getter for the packet field pieceIndex.
|
|
|
|
|
|
Reads the packet's payload fields.
Implements Protocols::BitTorrent::Packets::PacketBase. |
|
|
Setter for the packet field pieceBytes.
|
|
|
Setter for the packet field pieceIndex.
|
|
|
Setter for the packet field startOffset.
|
|
|
Getter for the packet field startOffset.
|
|
|
Writes the packet's payload fields.
Implements Protocols::BitTorrent::Packets::PacketBase. |