libktorrent
2.1.1
|
Decodes b-encoded data. More...
#include <bdecoder.h>
Public Member Functions | |
BDecoder (const QByteArray &data, bool verbose, Uint32 off=0) | |
BDecoder (const Uint8 *ptr, Uint32 size, bool verbose, Uint32 off=0) | |
BNode * | decode () |
BDictNode * | decodeDict () |
BListNode * | decodeList () |
Uint32 | position () const |
Get the current position in the data. | |
Definition at line 59 of file bdecoder.h.
bt::BDecoder::BDecoder | ( | const Uint8 * | ptr, |
Uint32 | size, | ||
bool | verbose, | ||
Uint32 | off = 0 |
||
) |
Constructor, passes in the data to decode.
ptr | Pointer to the data |
size | Size of the data |
verbose | Verbose output to the log |
off | Offset to start parsing |
bt::BDecoder::BDecoder | ( | const QByteArray & | data, |
bool | verbose, | ||
Uint32 | off = 0 |
||
) |
Constructor, passes in the data to decode.
data | The data |
verbose | Verbose output to the log |
off | Offset to start parsing |
BNode* bt::BDecoder::decode | ( | ) |
Decode the data, the root node gets returned. (Note that the caller must delete this node)
BDictNode* bt::BDecoder::decodeDict | ( | ) |
Decode the data, the root dict node gets returned. (Note that the caller must delete this node)
BListNode* bt::BDecoder::decodeList | ( | ) |
Decode the data, the root list node gets returned. (Note that the caller must delete this node)