• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

bt::BEncoder

bt::BEncoder Class Reference

#include <bencoder.h>

List of all members.


Detailed Description

Author:
Joris Guisson

Helper class to b-encode stuff.

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 82 of file bencoder.h.


Public Member Functions

void beginDict ()
void beginList ()
 BEncoder (BEncoderOutput *out)
 BEncoder (File *fptr)
void end ()
void write (const Uint8 *data, Uint32 size)
void write (const QByteArray &data)
void write (const QString &str)
void write (const char *str)
void write (Uint64 val)
void write (Uint32 val)
virtual ~BEncoder ()

Constructor & Destructor Documentation

bt::BEncoder::BEncoder ( File *  fptr  ) 

Constructor, output gets written to a file.

Parameters:
fptr The File to write to

Definition at line 57 of file bencoder.cpp.

bt::BEncoder::BEncoder ( BEncoderOutput *  out  ) 

Constructor, output gets written to a BEncoderOutput object.

Parameters:
out The BEncoderOutput

Definition at line 62 of file bencoder.cpp.

bt::BEncoder::~BEncoder (  )  [virtual]

Definition at line 67 of file bencoder.cpp.


Member Function Documentation

void bt::BEncoder::beginDict (  ) 

Begin a dictionary.Should have a corresponding end call.

Definition at line 73 of file bencoder.cpp.

void bt::BEncoder::beginList (  ) 

Begin a list.

Should have a corresponding end call.

Definition at line 80 of file bencoder.cpp.

void bt::BEncoder::end (  ) 

End a beginDict or beginList call.

Definition at line 140 of file bencoder.cpp.

void bt::BEncoder::write ( const Uint8 *  data,
Uint32  size 
)

Write a data array.

Parameters:
data 
size of data

Definition at line 131 of file bencoder.cpp.

void bt::BEncoder::write ( const QByteArray &  data  ) 

Write a QByteArray.

Parameters:
data 

Definition at line 121 of file bencoder.cpp.

void bt::BEncoder::write ( const QString &  str  ) 

Write a string.

Parameters:
str 

Definition at line 111 of file bencoder.cpp.

void bt::BEncoder::write ( const char *  str  ) 

Write a string.

Parameters:
str 

Definition at line 103 of file bencoder.cpp.

void bt::BEncoder::write ( Uint64  val  ) 

Write an int64.

Parameters:
val 

Definition at line 95 of file bencoder.cpp.

void bt::BEncoder::write ( Uint32  val  ) 

Write an int.

Parameters:
val 

Definition at line 87 of file bencoder.cpp.


The documentation for this class was generated from the following files:
  • bencoder.h
  • bencoder.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal