Protocols::Gnutella::Packets::Push Class Reference

#include <Push.h> [code]

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

Inheritance diagram for Protocols::Gnutella::Packets::Push:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements the packet Push.

A mechanism that allows a firewalled servent to contribute file-based data to the network.

Definition at line 38 of file Push.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.
 Push (QUuid serventId=QUuid(), quint32 fileIndex=0, const QHostAddress &ipAddress=QHostAddress(), quint16 port=0, const GgepBlock &ggepBlock=GgepBlock())
QUuid serventId () const
 Getter for the packet field serventId.
void setServentId (QUuid)
 Setter for the packet field serventId.
quint32 fileIndex () const
 Getter for the packet field fileIndex.
void setFileIndex (quint32)
 Setter for the packet field fileIndex.
QHostAddress ipAddress () const
 Getter for the packet field ipAddress.
void setIpAddress (const QHostAddress &)
 Setter for the packet field ipAddress.
quint16 port () const
 Getter for the packet field port.
void setPort (quint16)
 Setter for the packet field port.
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
 Push packet's private data. More...


Constructor & Destructor Documentation

Push::Push QUuid  serventId = QUuid(),
quint32  fileIndex = 0,
const QHostAddress &  ipAddress = QHostAddress(),
quint16  port = 0,
const GgepBlock ggepBlock = GgepBlock()
 

Definition at line 40 of file Push.cpp.


Member Function Documentation

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

Virtual copy constructor.

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

Definition at line 34 of file Push.cpp.

quint32 Protocols::Gnutella::Packets::Push::fileIndex  )  const [inline]
 

Getter for the packet field fileIndex.

Definition at line 97 of file Push.h.

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

Getter for the packet field ggepBlock.

Definition at line 121 of file Push.h.

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

Getter for the packet field ipAddress.

Definition at line 105 of file Push.h.

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

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

Getter for the packet field port.

Definition at line 113 of file Push.h.

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

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

Reads the packet's payload fields.

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

Definition at line 52 of file Push.cpp.

QUuid Protocols::Gnutella::Packets::Push::serventId  )  const [inline]
 

Getter for the packet field serventId.

Definition at line 89 of file Push.h.

void Protocols::Gnutella::Packets::Push::setFileIndex quint32   )  [inline]
 

Setter for the packet field fileIndex.

Definition at line 101 of file Push.h.

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

Setter for the packet field ggepBlock.

Definition at line 125 of file Push.h.

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

Setter for the packet field ipAddress.

Definition at line 109 of file Push.h.

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

Setter for the packet field port.

Definition at line 117 of file Push.h.

void Protocols::Gnutella::Packets::Push::setServentId QUuid   )  [inline]
 

Setter for the packet field serventId.

Definition at line 93 of file Push.h.

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

Writes the packet's payload fields.

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

Definition at line 63 of file Push.cpp.


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