KVIrc  4.9.2
DeveloperAPIs
Public Types | Signals | Public Member Functions | Protected Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
KviHttpRequest Class Reference

#include <KviHttpRequest.h>

+ Inheritance diagram for KviHttpRequest:

Public Types

enum  ExistingFileAction { Overwrite, RenameIncoming, RenameExisting, Resume }
 
enum  ProcessingType {
  HeadersOnly, WholeFile, Blocks, Lines,
  StoreToFile
}
 

Signals

void binaryData (const KviDataBuffer &data)
 
void connectionEstablished ()
 
void contactingHost (const QString &ipandport)
 
void data (const KviCString &data)
 
void header (KviPointerHashTable< const char *, KviCString > *hdr)
 
void receivedResponse (const QString &response)
 
void requestSent (const QStringList &request)
 
void resolvingHost (const QString &hostname)
 
void status (const QString &message)
 
void terminated (bool bSuccess)
 

Public Member Functions

void abort ()
 
unsigned int contentOffset ()
 
ExistingFileAction existingFileAction ()
 
const QString & fileName ()
 
bool followRedirects () const
 
bool get (const KviUrl &u, ProcessingType p=WholeFile, const QString &szFileName=QString())
 
 KviHttpRequest ()
 
const QString & lastError ()
 
unsigned int maxContentLength ()
 
void * privateData ()
 
ProcessingType processingType ()
 
unsigned int receivedSize ()
 
void reset ()
 
void setConnectionTimeout (unsigned int uConnectionTimeout)
 
void setContentOffset (int uContentOffset)
 
void setExistingFileAction (ExistingFileAction a)
 
void setFileName (const QString &szFileName)
 
void setFollowRedirects (bool bFollow)
 
void setMaxContentLength (int uMaxContentLength)
 
void setMaximumRedirectCount (unsigned int uCount)
 
void setPostData (const QString &szPostData)
 
void setPrivateData (void *ptr)
 
void setProcessingType (ProcessingType t)
 
void setUrl (const KviUrl &u)
 
bool start ()
 
unsigned int totalSize ()
 
const KviUrlurl ()
 
virtual ~KviHttpRequest ()
 

Protected Attributes

bool m_bChunkedTransferEncoding
 
bool m_bFollowRedirects
 
bool m_bGzip
 
bool m_bHeaderProcessed
 
bool m_bIgnoreRemainingData
 
KviUrl m_connectionUrl
 
ExistingFileAction m_eExistingFileAction
 
ProcessingType m_eProcessingType
 
void * m_pPrivateData
 
QString m_szFileName
 
QString m_szLastError
 
QString m_szPostData
 
unsigned int m_uConnectionTimeout
 
unsigned int m_uContentOffset
 
unsigned int m_uMaxContentLength
 
unsigned int m_uMaximumRedirectCount
 
unsigned int m_uReceivedSize
 
unsigned int m_uRedirectCount
 
unsigned int m_uRemainingChunkSize
 
KviUrl m_url
 
unsigned int m_uTotalSize
 

Private Slots

void slotConnectionTimedOut ()
 
void slotSocketConnected ()
 
void slotSocketDisconnected ()
 
void slotSocketError (QAbstractSocket::SocketError socketError)
 
void slotSocketHostResolved ()
 
void slotSocketReadDataReady ()
 

Private Member Functions

void closeSocket ()
 
bool doConnect ()
 
void emitLines (KviDataBuffer *pDataBuffer)
 
bool openFile ()
 
void processData (KviDataBuffer *data)
 
bool processHeader (KviCString &szHeader)
 
void resetData ()
 
void resetInternalStatus ()
 
void resetStatus ()
 

Private Attributes

KviHttpRequestPrivatem_p
 

Member Enumeration Documentation

Enumerator
Overwrite 
RenameIncoming 
RenameExisting 
Resume 
Enumerator
HeadersOnly 
WholeFile 
Blocks 
Lines 
StoreToFile 

Constructor & Destructor Documentation

KviHttpRequest::KviHttpRequest ( )
KviHttpRequest::~KviHttpRequest ( )
virtual

Member Function Documentation

void KviHttpRequest::abort ( )
void KviHttpRequest::binaryData ( const KviDataBuffer data)
signal
void KviHttpRequest::closeSocket ( )
private
void KviHttpRequest::connectionEstablished ( )
signal

Referenced by slotSocketConnected().

void KviHttpRequest::contactingHost ( const QString &  ipandport)
signal

Referenced by slotSocketHostResolved().

unsigned int KviHttpRequest::contentOffset ( )
inline
void KviHttpRequest::data ( const KviCString data)
signal
bool KviHttpRequest::doConnect ( )
private
void KviHttpRequest::emitLines ( KviDataBuffer pDataBuffer)
private
ExistingFileAction KviHttpRequest::existingFileAction ( )
inline
const QString& KviHttpRequest::fileName ( )
inline
bool KviHttpRequest::followRedirects ( ) const
inline
bool KviHttpRequest::get ( const KviUrl u,
ProcessingType  p = WholeFile,
const QString &  szFileName = QString() 
)
void KviHttpRequest::header ( KviPointerHashTable< const char *, KviCString > *  hdr)
signal

Referenced by processHeader().

const QString& KviHttpRequest::lastError ( )
inline
unsigned int KviHttpRequest::maxContentLength ( )
inline
bool KviHttpRequest::openFile ( )
private
void* KviHttpRequest::privateData ( )
inline
void KviHttpRequest::processData ( KviDataBuffer data)
private
bool KviHttpRequest::processHeader ( KviCString szHeader)
private
ProcessingType KviHttpRequest::processingType ( )
inline
void KviHttpRequest::receivedResponse ( const QString &  response)
signal

Referenced by processHeader().

unsigned int KviHttpRequest::receivedSize ( )
inline
void KviHttpRequest::requestSent ( const QStringList &  request)
signal

Referenced by slotSocketConnected().

void KviHttpRequest::reset ( )

References resetData(), resetInternalStatus(), and resetStatus().

Referenced by get().

void KviHttpRequest::resetData ( )
private
void KviHttpRequest::resetInternalStatus ( )
private
void KviHttpRequest::resetStatus ( )
private
void KviHttpRequest::resolvingHost ( const QString &  hostname)
signal

Referenced by doConnect().

void KviHttpRequest::setConnectionTimeout ( unsigned int  uConnectionTimeout)
inline

Referenced by http_kvs_complete_get().

void KviHttpRequest::setContentOffset ( int  uContentOffset)
inline

Referenced by http_kvs_complete_get().

void KviHttpRequest::setExistingFileAction ( ExistingFileAction  a)
inline
void KviHttpRequest::setFileName ( const QString &  szFileName)
inline

Referenced by get(), and http_kvs_complete_get().

void KviHttpRequest::setFollowRedirects ( bool  bFollow)
inline
void KviHttpRequest::setMaxContentLength ( int  uMaxContentLength)
inline

Referenced by http_kvs_complete_get().

void KviHttpRequest::setMaximumRedirectCount ( unsigned int  uCount)
inline
void KviHttpRequest::setPostData ( const QString &  szPostData)
inline

Referenced by http_kvs_complete_get().

void KviHttpRequest::setPrivateData ( void *  ptr)
inline
void KviHttpRequest::setProcessingType ( ProcessingType  t)
inline

References t().

Referenced by get(), and http_kvs_complete_get().

void KviHttpRequest::setUrl ( const KviUrl u)
inline

References u.

Referenced by get(), and http_kvs_complete_get().

void KviHttpRequest::slotConnectionTimedOut ( )
privateslot
void KviHttpRequest::slotSocketConnected ( )
privateslot
void KviHttpRequest::slotSocketDisconnected ( )
privateslot
void KviHttpRequest::slotSocketError ( QAbstractSocket::SocketError  socketError)
privateslot
void KviHttpRequest::slotSocketHostResolved ( )
privateslot
void KviHttpRequest::slotSocketReadDataReady ( )
privateslot
bool KviHttpRequest::start ( )
void KviHttpRequest::status ( const QString &  message)
signal
void KviHttpRequest::terminated ( bool  bSuccess)
signal
unsigned int KviHttpRequest::totalSize ( )
inline
const KviUrl& KviHttpRequest::url ( )
inline

Member Data Documentation

bool KviHttpRequest::m_bChunkedTransferEncoding
protected
bool KviHttpRequest::m_bFollowRedirects
protected

Referenced by KviHttpRequest(), and processHeader().

bool KviHttpRequest::m_bGzip
protected

Referenced by processHeader(), and resetData().

bool KviHttpRequest::m_bHeaderProcessed
protected
bool KviHttpRequest::m_bIgnoreRemainingData
protected

Referenced by processData(), and resetData().

KviUrl KviHttpRequest::m_connectionUrl
protected
ExistingFileAction KviHttpRequest::m_eExistingFileAction
protected

Referenced by openFile(), resetData(), and start().

ProcessingType KviHttpRequest::m_eProcessingType
protected
KviHttpRequestPrivate* KviHttpRequest::m_p
private
void* KviHttpRequest::m_pPrivateData
protected

Referenced by KviHttpRequest().

QString KviHttpRequest::m_szFileName
protected

Referenced by openFile(), resetData(), and start().

QString KviHttpRequest::m_szLastError
protected
QString KviHttpRequest::m_szPostData
protected

Referenced by slotSocketConnected().

unsigned int KviHttpRequest::m_uConnectionTimeout
protected

Referenced by doConnect(), and KviHttpRequest().

unsigned int KviHttpRequest::m_uContentOffset
protected
unsigned int KviHttpRequest::m_uMaxContentLength
protected
unsigned int KviHttpRequest::m_uMaximumRedirectCount
protected

Referenced by KviHttpRequest(), and processHeader().

unsigned int KviHttpRequest::m_uReceivedSize
protected

Referenced by processData(), and resetStatus().

unsigned int KviHttpRequest::m_uRedirectCount
protected
unsigned int KviHttpRequest::m_uRemainingChunkSize
protected
KviUrl KviHttpRequest::m_url
protected

Referenced by processHeader(), and resetData().

unsigned int KviHttpRequest::m_uTotalSize
protected

The documentation for this class was generated from the following files: