#include <SupportedMessages.h> [code]
Inherits Gnutella::Packets::VendorMessages::VendorMessage.
Inheritance diagram for Gnutella::Packets::VendorMessages::SupportedMessages:


Represents the null/0v0 Vendor Message. The message contains a vector of vendor message IDs which a Gnutella node understands. This message should be sent over a new connection right after the initial keep-alive ping.
The format of the payload is: 2 bytes unsigned little-endian integer containing the vectorSize, followed by vecorSize * 8 bytes. Each vector element has the layout of the vector message header (4 bytes vendor ID, 2 bytes message type, 2 bytes message version).
Definition at line 45 of file SupportedMessages.h.
Public Member Functions | |
| SupportedMessages * | copy () const |
| A virtual copy contructor. | |
| QString | name () const |
| SupportedMessages () | |
| SupportedMessages (const QByteArray &rawHeader, const QByteArray &rawPayload) | |
| ~SupportedMessages () | |
| void | addMessage (const VendorCode &, quint16 messageType, quint16 versionNumber) |
Static Public Member Functions | |
| static SupportedMessages & | castFrom (Packet &packet) |
| static const SupportedMessages & | castFrom (const Packet &packet) |
Protected Member Functions | |
| virtual bool | prepareReadPayload (const QByteArray &rawPayload) |
| Checks the lenght of the QueryStatusResponse payload. | |
| virtual void | readPayload (QDataStream &stream) |
| Reads the QueryStatusResponse payload. | |
| virtual int | prepareWritePayload () const |
| Returns the number of bytes in the QueryStatusResponse payload. | |
| virtual void | writePayload (QDataStream &stream) const |
| Writes the QueryStatusResponse payload. | |
Private Attributes | |
| Gnutella::Packets::VendorMessages::SupportedMessages::Data | p |
Classes | |
| struct | Data |
| struct | Message |
|
|
Creates a SupportedMessages vendor message. Definition at line 30 of file SupportedMessages.cpp. |
|
||||||||||||
|
Creates a QueryStatusResponse object from the raw bytes in rawHeader and rawPayload. Definition at line 39 of file SupportedMessages.cpp. |
|
|
Destroys a QueryStatusResponse object. Definition at line 52 of file SupportedMessages.cpp. |
|
||||||||||||||||
|
Definition at line 95 of file SupportedMessages.cpp. |
|
|
Reimplemented from Gnutella::Packets::VendorMessages::VendorMessage. Definition at line 49 of file SupportedMessages.h. |
|
|
Reimplemented from Gnutella::Packets::VendorMessages::VendorMessage. Definition at line 48 of file SupportedMessages.h. |
|
|
A virtual copy contructor.
Implements Gnutella::Packets::Packet. Definition at line 51 of file SupportedMessages.h. |
|
|
Implements Gnutella::Packets::Packet. Definition at line 52 of file SupportedMessages.h. |
|
|
Checks the lenght of the QueryStatusResponse payload.
Implements Gnutella::Packets::VendorMessages::VendorMessage. Definition at line 57 of file SupportedMessages.cpp. |
|
|
Returns the number of bytes in the QueryStatusResponse payload.
Implements Gnutella::Packets::VendorMessages::VendorMessage. Definition at line 78 of file SupportedMessages.cpp. |
|
|
Reads the QueryStatusResponse payload.
Implements Gnutella::Packets::VendorMessages::VendorMessage. Definition at line 63 of file SupportedMessages.cpp. |
|
|
Writes the QueryStatusResponse payload.
Implements Gnutella::Packets::VendorMessages::VendorMessage. Definition at line 84 of file SupportedMessages.cpp. |
|
|
Reimplemented from Gnutella::Packets::VendorMessages::VendorMessage. |