Helper class to b-encode stuff.
More...
#include <bencoder.h>
- Author
- Joris Guisson
This class b-encodes data. For more details about b-encoding, see the BitTorrent protocol docs. The data gets written to a BEncoderOutput thing.
Definition at line 91 of file bencoder.h.
◆ BEncoder() [1/3]
bt::BEncoder::BEncoder |
( |
File * |
fptr | ) |
|
Constructor, output gets written to a file.
- Parameters
-
◆ BEncoder() [2/3]
Constructor, output gets written to a BEncoderOutput object.
- Parameters
-
◆ BEncoder() [3/3]
bt::BEncoder::BEncoder |
( |
QIODevice * |
dev | ) |
|
Constructor, output gets written to a QIODevice object.
- Parameters
-
◆ beginDict()
void bt::BEncoder::beginDict |
( |
| ) |
|
Begin a dictionary.Should have a corresponding end call.
◆ beginList()
void bt::BEncoder::beginList |
( |
| ) |
|
Begin a list. Should have a corresponding end call.
◆ end()
void bt::BEncoder::end |
( |
| ) |
|
End a beginDict or beginList call.
◆ write() [1/6]
void bt::BEncoder::write |
( |
bool |
val | ) |
|
Write a boolean (is encoded as an intÃ
- Parameters
-
◆ write() [2/6]
void bt::BEncoder::write |
( |
const QByteArray & |
data | ) |
|
Write a QByteArray
- Parameters
-
◆ write() [3/6]
void bt::BEncoder::write |
( |
const Uint8 * |
data, |
|
|
Uint32 |
size |
|
) |
| |
Write a data array
- Parameters
-
◆ write() [4/6]
void bt::BEncoder::write |
( |
float |
val | ) |
|
◆ write() [5/6]
void bt::BEncoder::write |
( |
Uint32 |
val | ) |
|
◆ write() [6/6]
void bt::BEncoder::write |
( |
Uint64 |
val | ) |
|
Write an int64
- Parameters
-
The documentation for this class was generated from the following file: