#include <Ggep.h> [code]
Inherited by Protocols::Gnutella::Packets::Extensions::Ggeps::Unknown.
Inheritance diagram for Protocols::Gnutella::Packets::Extensions::Ggep:

Base class for a GGEP extension as defined in: http://rfc-gnutella.sourceforge.net/src/GnutellaGenericExtensionProtocol.0.51.html
The derived classes need not care about COBS and deflate encodings. All this is handled in the base class. The virtual functions, readData() and writeData() will receive, respectively provide, only unencoded and uncompressed data of the GGEP extension data (without header).
Definition at line 45 of file Ggep.h.
Public Types | |
| typedef QByteArray | GgepId |
| GGEP extension ID as written in the extension header. | |
| enum | HeaderFlag { Encoding = 0x40, Compression = 0x20, Reserved = 0x10, IDLength = 0x0F } |
Public Member Functions | |
| Ggep (int flags) | |
| virtual | ~Ggep () |
| virtual Ggep * | copy () const =0 |
| virtual GgepId | id () const =0 |
| bool | isFlagSet (HeaderFlag flag) const |
| void | setFlag (HeaderFlag flag) |
| void | resetFlag (HeaderFlag flag) |
| bool | parse (const QByteArray &) |
| QByteArray | rawData () const |
| bool | operator== (const Ggep &ggep) const |
| bool | operator!= (const Ggep &ggep) const |
Static Public Member Functions | |
| static Ggep * | fromId (const GgepId &id, int flags, const QByteArray &rawData) |
Static Public Attributes | |
| static const uchar | LastExtension = 0x80 |
| The last extension flag, which cannot be set directly from clients. | |
| static const int | MaxIdLength = 8 |
Protected Member Functions | |
| virtual void | readData (BinaryReader &reader)=0 |
| virtual void | writeData (BinaryWriter &writer) const =0 |
Protected Attributes | |
| HeaderFlags | flags |
|
|
GGEP extension ID as written in the extension header.
|
|
|
|
|
|
|
|
|
|
|
|
Implemented in Protocols::Gnutella::Packets::Extensions::Ggeps::Unknown. |
|
||||||||||||||||
|
if (id == Ggeps::Ultrapeer::Id) ggep = new Ggeps::Ultrapeer (id, flags); if (id == Ggeps::VendorCode::Id) ggep = new Ggeps::VendorCode (id, flags); if (id == Ggeps::DailyUptime::Id) ggep = new Ggeps::DailyUptime (id, flags); if (id == Ggeps::PackedHostCaches::Id) ggep = new Ggeps::PackedHostCaches (id, flags); if (id == Ggeps::SupportsCachedPongs::Id) ggep = new Ggeps::SupportsCachedPongs (id, flags); if (id == Ggeps::UdpHostCache::Id) ggep = new Ggeps::UdpHostCache (id, flags); if (id == Ggeps::IpPort::Id) ggep = new Ggeps::IpPort (id, flags); |
|
|
Implemented in Protocols::Gnutella::Packets::Extensions::Ggeps::Unknown. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implemented in Protocols::Gnutella::Packets::Extensions::Ggeps::Unknown. |
|
|
|
|
|
|
|
|
Implemented in Protocols::Gnutella::Packets::Extensions::Ggeps::Unknown. |
|
|
|
|
|
The last extension flag, which cannot be set directly from clients.
|
|
|
|