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

kget

bt::HttpConnection

bt::HttpConnection Class Reference

#include <httpconnection.h>

Inheritance diagram for bt::HttpConnection:

Inheritance graph
[legend]

List of all members.


Detailed Description

Author:
Joris Guisson

HTTP connection for webseeding. We do not use KIO here, because we want to be able to apply the maximum upload and download rate to webseeds;

Definition at line 41 of file httpconnection.h.


Public Member Functions

bool closed () const
bool connected () const
void connectTo (const KUrl &url)
void connectToProxy (const QString &proxy, Uint16 proxy_port)
bool get (const QString &host, const QString &path, bt::Uint64 start, bt::Uint64 len)
bool getData (QByteArray &data)
float getDownloadRate () const
const QString getStatusString () const
virtual bool hasBytesToWrite () const
 HttpConnection ()
bool ok () const
virtual void onDataReady (Uint8 *buf, Uint32 size)
virtual Uint32 onReadyToWrite (Uint8 *data, Uint32 max_to_write)
void setGroupIDs (Uint32 up, Uint32 down)
virtual ~HttpConnection ()

Constructor & Destructor Documentation

bt::HttpConnection::HttpConnection (  ) 

Definition at line 34 of file httpconnection.cpp.

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

Definition at line 43 of file httpconnection.cpp.


Member Function Documentation

bool bt::HttpConnection::closed (  )  const

Has the connection been closed.

Definition at line 83 of file httpconnection.cpp.

bool bt::HttpConnection::connected (  )  const

See if we are connected.

Definition at line 77 of file httpconnection.cpp.

void bt::HttpConnection::connectTo ( const KUrl &  url  ) 

Connect to a webseed.

Parameters:
url Url of the webseeder

Definition at line 98 of file httpconnection.cpp.

void bt::HttpConnection::connectToProxy ( const QString &  proxy,
Uint16  proxy_port 
)

Connect to a proxy.

Parameters:
proxy The HTTP proxy to use (null means don't use any)
proxy_port The port of the HTTP proxy

Definition at line 89 of file httpconnection.cpp.

bool bt::HttpConnection::get ( const QString &  host,
const QString &  path,
bt::Uint64  start,
bt::Uint64  len 
)

Do a HTTP GET request.

Parameters:
path The path of the file
start Offset into file
len Length of data to download

Definition at line 233 of file httpconnection.cpp.

bool bt::HttpConnection::getData ( QByteArray &  data  ) 

Get some part of the.

Parameters:
data Bytearray to copy the data into
Returns:
true if data was filled in

Definition at line 245 of file httpconnection.cpp.

float bt::HttpConnection::getDownloadRate (  )  const

Get the current download rate.

Definition at line 275 of file httpconnection.cpp.

const QString bt::HttpConnection::getStatusString (  )  const

Get the status string.

Definition at line 65 of file httpconnection.cpp.

bool bt::HttpConnection::hasBytesToWrite (  )  const [virtual]

Check if data is ready to write.

Implements net::SocketWriter.

Definition at line 177 of file httpconnection.cpp.

bool bt::HttpConnection::ok (  )  const

Check if the connection is OK.

Definition at line 71 of file httpconnection.cpp.

void bt::HttpConnection::onDataReady ( Uint8 *  buf,
Uint32  size 
) [virtual]

Definition at line 107 of file httpconnection.cpp.

Uint32 bt::HttpConnection::onReadyToWrite ( Uint8 *  data,
Uint32  max_to_write 
) [virtual]

Definition at line 133 of file httpconnection.cpp.

void bt::HttpConnection::setGroupIDs ( Uint32  up,
Uint32  down 
)

Set the group ID's of the socket.

Parameters:
up Upload group id
down Download group id

Definition at line 54 of file httpconnection.cpp.


The documentation for this class was generated from the following files:
  • httpconnection.h
  • httpconnection.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