Protocols::BitTorrent::Packets::RejectRequest Class Reference

#include <RejectRequest.h> [code]

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

Inheritance diagram for Protocols::BitTorrent::Packets::RejectRequest:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements the packet RejectRequest.

The RejectRequest packet is used to notify a peer that ist Request cannot be fulfilled.

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

Definition at line 40 of file RejectRequest.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.
 RejectRequest (quint32 pieceIndex=0, quint32 startOffset=0, quint32 bytesCount=0)
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.
quint32 bytesCount () const
 Getter for the packet field bytesCount.
void setBytesCount (quint32)
 Setter for the packet field bytesCount.

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 = 12 }

Classes

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


Member Enumeration Documentation

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

Enumerator:
PayloadLength 

Definition at line 82 of file RejectRequest.h.


Constructor & Destructor Documentation

RejectRequest::RejectRequest quint32  pieceIndex = 0,
quint32  startOffset = 0,
quint32  bytesCount = 0
 

Definition at line 40 of file RejectRequest.cpp.


Member Function Documentation

quint32 Protocols::BitTorrent::Packets::RejectRequest::bytesCount  )  const [inline]
 

Getter for the packet field bytesCount.

Definition at line 105 of file RejectRequest.h.

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

Virtual copy constructor.

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

Definition at line 34 of file RejectRequest.cpp.

QString RejectRequest::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 RejectRequest.cpp.

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

Getter for the packet field pieceIndex.

Definition at line 89 of file RejectRequest.h.

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

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

Reads the packet's payload fields.

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

Definition at line 50 of file RejectRequest.cpp.

void Protocols::BitTorrent::Packets::RejectRequest::setBytesCount quint32   )  [inline]
 

Setter for the packet field bytesCount.

Definition at line 109 of file RejectRequest.h.

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

Setter for the packet field pieceIndex.

Definition at line 93 of file RejectRequest.h.

void Protocols::BitTorrent::Packets::RejectRequest::setStartOffset quint32   )  [inline]
 

Setter for the packet field startOffset.

Definition at line 101 of file RejectRequest.h.

quint32 Protocols::BitTorrent::Packets::RejectRequest::startOffset  )  const [inline]
 

Getter for the packet field startOffset.

Definition at line 97 of file RejectRequest.h.

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

Writes the packet's payload fields.

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

Definition at line 59 of file RejectRequest.cpp.


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