Protocols::Gnutella::Packets::Pong Class Reference

#include <Pong.h> [code]

Inherits Protocols::Gnutella::Packets::PacketBase.

Inheritance diagram for Protocols::Gnutella::Packets::Pong:

Inheritance graph
[legend]
Collaboration diagram for Protocols::Gnutella::Packets::Pong:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements the packet Pong.

The response to a Ping. Contains the address of one or more connected Gnutella servents and information regarding the amount of data it is making available to the network.

Definition at line 40 of file Pong.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.
 Pong (quint16 port=0, const QHostAddress &ipAddress=QHostAddress(), quint32 sharedFiles=0, quint32 sharedKiloBytes=0, const GgepBlock &ggepBlock=GgepBlock())
quint16 port () const
 Getter for the packet field port.
void setPort (quint16)
 Setter for the packet field port.
QHostAddress ipAddress () const
 Getter for the packet field ipAddress.
void setIpAddress (const QHostAddress &)
 Setter for the packet field ipAddress.
quint32 sharedFiles () const
 Getter for the packet field sharedFiles.
void setSharedFiles (quint32)
 Setter for the packet field sharedFiles.
quint32 sharedKiloBytes () const
 Getter for the packet field sharedKiloBytes.
void setSharedKiloBytes (quint32)
 Setter for the packet field sharedKiloBytes.
GgepBlock ggepBlock () const
 Getter for the packet field ggepBlock.
void setGgepBlock (const GgepBlock &)
 Setter for the packet field ggepBlock.

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
 Pong packet's private data. More...


Constructor & Destructor Documentation

Pong::Pong quint16  port = 0,
const QHostAddress &  ipAddress = QHostAddress(),
quint32  sharedFiles = 0,
quint32  sharedKiloBytes = 0,
const GgepBlock ggepBlock = GgepBlock()
 

Definition at line 40 of file Pong.cpp.


Member Function Documentation

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

Virtual copy constructor.

Implements Protocols::Gnutella::Packets::PacketBase.

Definition at line 34 of file Pong.cpp.

GgepBlock Protocols::Gnutella::Packets::Pong::ggepBlock  )  const [inline]
 

Getter for the packet field ggepBlock.

Definition at line 123 of file Pong.h.

QHostAddress Protocols::Gnutella::Packets::Pong::ipAddress  )  const [inline]
 

Getter for the packet field ipAddress.

Definition at line 99 of file Pong.h.

QString Pong::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::Gnutella::Packets::PacketBase.

Definition at line 28 of file Pong.cpp.

quint16 Protocols::Gnutella::Packets::Pong::port  )  const [inline]
 

Getter for the packet field port.

Definition at line 91 of file Pong.h.

Protocols::Gnutella::Packets::Pong::Q_DECLARE_SHARED_DATA Data   )  [protected]
 

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

Reads the packet's payload fields.

Implements Protocols::Gnutella::Packets::PacketBase.

Definition at line 52 of file Pong.cpp.

void Protocols::Gnutella::Packets::Pong::setGgepBlock const GgepBlock  )  [inline]
 

Setter for the packet field ggepBlock.

Definition at line 127 of file Pong.h.

void Protocols::Gnutella::Packets::Pong::setIpAddress const QHostAddress &   )  [inline]
 

Setter for the packet field ipAddress.

Definition at line 103 of file Pong.h.

void Protocols::Gnutella::Packets::Pong::setPort quint16   )  [inline]
 

Setter for the packet field port.

Definition at line 95 of file Pong.h.

void Protocols::Gnutella::Packets::Pong::setSharedFiles quint32   )  [inline]
 

Setter for the packet field sharedFiles.

Definition at line 111 of file Pong.h.

void Protocols::Gnutella::Packets::Pong::setSharedKiloBytes quint32   )  [inline]
 

Setter for the packet field sharedKiloBytes.

Definition at line 119 of file Pong.h.

quint32 Protocols::Gnutella::Packets::Pong::sharedFiles  )  const [inline]
 

Getter for the packet field sharedFiles.

Definition at line 107 of file Pong.h.

quint32 Protocols::Gnutella::Packets::Pong::sharedKiloBytes  )  const [inline]
 

Getter for the packet field sharedKiloBytes.

Definition at line 115 of file Pong.h.

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

Writes the packet's payload fields.

Implements Protocols::Gnutella::Packets::PacketBase.

Definition at line 63 of file Pong.cpp.


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