Protocols::BitTorrent::Packets::AllowedFast Class Reference

#include <AllowedFast.h> [code]

Inherits Protocols::BitTorrent::Packets::PacketBase.

Inheritance diagram for Protocols::BitTorrent::Packets::AllowedFast:

Inheritance graph
[legend]
Collaboration diagram for Protocols::BitTorrent::Packets::AllowedFast:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements the packet AllowedFast.

The AllowedFast packet indicates the index of a piece which the receiving peer may request even if choked.

Note:
Should only be sent or received over if Fast Extension was negotiated.

Definition at line 40 of file AllowedFast.h.

Public Member Functions

QString name () const
 Returns the name of the PacketBase type the dynamic object belongs to.
auto_ptr< DataBasecopy () const
 Virtual copy constructor.
 AllowedFast (quint32 pieceIndex=0)
quint32 pieceIndex () const
 Getter for the packet field pieceIndex.
void setPieceIndex (quint32)
 Setter for the packet field pieceIndex.

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)

Private Types

enum  Constants { PayloadLength = 4 }

Classes

class  Data
 AllowedFast packet's private data. More...


Member Enumeration Documentation

enum Protocols::BitTorrent::Packets::AllowedFast::Constants [private]
 

Enumerator:
PayloadLength 

Definition at line 74 of file AllowedFast.h.


Constructor & Destructor Documentation

AllowedFast::AllowedFast quint32  pieceIndex = 0  ) 
 

Definition at line 40 of file AllowedFast.cpp.


Member Function Documentation

auto_ptr< DataBase > AllowedFast::copy  )  const [virtual]
 

Virtual copy constructor.

Implements Protocols::BitTorrent::Packets::PacketBase.

Definition at line 34 of file AllowedFast.cpp.

QString AllowedFast::name  )  const [virtual]
 

Returns the name of the PacketBase type the dynamic object belongs to.

Todo:
Better use PacketId (which possibly contains the ProtocolId)?

Implements Protocols::BitTorrent::Packets::PacketBase.

Definition at line 28 of file AllowedFast.cpp.

quint32 Protocols::BitTorrent::Packets::AllowedFast::pieceIndex  )  const [inline]
 

Getter for the packet field pieceIndex.

Definition at line 81 of file AllowedFast.h.

Protocols::BitTorrent::Packets::AllowedFast::Q_DECLARE_SHARED_DATA Data   )  [protected]
 

void AllowedFast::readPayload BinaryReader  )  [protected, virtual]
 

Reads the packet's payload fields.

Implements Protocols::BitTorrent::Packets::PacketBase.

Definition at line 48 of file AllowedFast.cpp.

void Protocols::BitTorrent::Packets::AllowedFast::setPieceIndex quint32   )  [inline]
 

Setter for the packet field pieceIndex.

Definition at line 85 of file AllowedFast.h.

void AllowedFast::writePayload BinaryWriter  )  const [protected, virtual]
 

Writes the packet's payload fields.

Implements Protocols::BitTorrent::Packets::PacketBase.

Definition at line 55 of file AllowedFast.cpp.


The documentation for this class was generated from the following files: