LiveUpdate Class Reference

#include <liveupdate.h>

Inheritance diagram for LiveUpdate:

QObject

List of all members.


Detailed Description

Definition at line 16 of file liveupdate.h.


Public Slots

void downloadFile (QString filename, bool xmlprocessing=false, QString filehash="")
void cancelDownload ()
void version ()
void downloadNew ()
void handleSslErrors (const QList< QSslError > &e)
void gotStateChanged (int i)

Signals

void CurrentVersion (QString ver)
void OnlineVersion (QString ver)
void Progress (int percent)
void NewVerOK ()
void stateChanged (int i)

Public Member Functions

 LiveUpdate (QObject *parent=0)
void ProcessXml (QFile *file)
bool CheckHash (QFile *file, QString *hash)
bool runDownloaded (QString args)

Public Attributes

QHttphttp

Private Slots

void httpRequestFinished (int requestId, bool error)
void readResponseHeader (const QHttpResponseHeader &responseHeader)
void updateDataReadProgress (int bytesRead, int totalBytes)

Private Member Functions

void newHttp ()

Private Attributes

QFilefile
QString hash
QString newfile
QString newhash
int httpGetId
bool xml
bool sucess
bool httpRequestAborted

Constructor & Destructor Documentation

LiveUpdate::LiveUpdate ( QObject parent = 0  ) 

Definition at line 3 of file liveupdate.cpp.

References http, newfile, newhash, and newHttp().

Here is the call graph for this function:


Member Function Documentation

void LiveUpdate::ProcessXml ( QFile file  ) 

Definition at line 9 of file xmlhandler.cpp.

References QDomElement::attributes(), QDomDocument::documentElement(), newfile, newhash, OnlineVersion(), QFile::open(), QFile::remove(), QDomDocument::setContent(), and QDomElement::text().

Referenced by httpRequestFinished().

Here is the call graph for this function:

bool LiveUpdate::CheckHash ( QFile file,
QString hash 
)

Definition at line 177 of file liveupdate.cpp.

References QString::compare(), QFile::fileName(), md5_file(), QString::toAscii(), and uchar.

Referenced by httpRequestFinished().

Here is the call graph for this function:

bool LiveUpdate::runDownloaded ( QString  args  ) 

Definition at line 43 of file liveupdate.cpp.

References file, QFile::fileName(), QProcess::startDetached(), and QString::toAscii().

Referenced by LiveUpdateModule::Install().

Here is the call graph for this function:

void LiveUpdate::downloadFile ( QString  filename,
bool  xmlprocessing = false,
QString  filehash = "" 
) [slot]

Definition at line 66 of file liveupdate.cpp.

References file, QHttp::get(), hash, http, httpGetId, httpRequestAborted, newHttp(), QFile::open(), QFile::remove(), QDir::setCurrent(), QHttp::setHost(), QHttp::setUser(), QDir::tempPath(), QString::toAscii(), and xml.

Referenced by LiveUpdateModule::Check(), and downloadNew().

void LiveUpdate::cancelDownload (  )  [slot]

Definition at line 103 of file liveupdate.cpp.

References QHttp::abort(), http, and httpRequestAborted.

void LiveUpdate::version (  )  [slot]

Definition at line 51 of file liveupdate.cpp.

References CurrentVersion().

Referenced by LiveUpdateDialog::LiveUpdateDialog().

void LiveUpdate::downloadNew (  )  [slot]

Definition at line 56 of file liveupdate.cpp.

References downloadFile(), QString::isEmpty(), newfile, and newhash.

Referenced by LiveUpdateModule::Download().

void LiveUpdate::handleSslErrors ( const QList< QSslError > &  e  )  [slot]

Definition at line 38 of file liveupdate.cpp.

Referenced by newHttp().

void LiveUpdate::gotStateChanged ( int  i  )  [slot]

Definition at line 33 of file liveupdate.cpp.

References stateChanged().

Referenced by newHttp().

void LiveUpdate::CurrentVersion ( QString  ver  )  [signal]

Referenced by version().

void LiveUpdate::OnlineVersion ( QString  ver  )  [signal]

Referenced by ProcessXml().

void LiveUpdate::Progress ( int  percent  )  [signal]

Referenced by updateDataReadProgress().

void LiveUpdate::NewVerOK (  )  [signal]

Referenced by httpRequestFinished().

void LiveUpdate::stateChanged ( int  i  )  [signal]

Referenced by gotStateChanged(), and newHttp().

void LiveUpdate::httpRequestFinished ( int  requestId,
bool  error 
) [private, slot]

Definition at line 113 of file liveupdate.cpp.

References CheckHash(), QString::clear(), QHttp::close(), QHttp::errorString(), file, QFile::fileName(), hash, http, httpGetId, httpRequestAborted, QString::isEmpty(), NewVerOK(), ProcessXml(), QFile::remove(), sucess, and xml.

Referenced by newHttp().

void LiveUpdate::readResponseHeader ( const QHttpResponseHeader responseHeader  )  [private, slot]

Definition at line 162 of file liveupdate.cpp.

References QHttp::abort(), http, httpRequestAborted, QHttpResponseHeader::reasonPhrase(), and QHttpResponseHeader::statusCode().

Referenced by newHttp().

void LiveUpdate::updateDataReadProgress ( int  bytesRead,
int  totalBytes 
) [private, slot]

Definition at line 172 of file liveupdate.cpp.

References Progress().

Referenced by newHttp().

void LiveUpdate::newHttp (  )  [private]

Definition at line 14 of file liveupdate.cpp.

References QObject::connect(), gotStateChanged(), handleSslErrors(), http, httpRequestFinished(), readResponseHeader(), stateChanged(), and updateDataReadProgress().

Referenced by downloadFile(), and LiveUpdate().

Here is the call graph for this function:


Member Data Documentation

QHttp* LiveUpdate::http

Definition at line 25 of file liveupdate.h.

Referenced by cancelDownload(), downloadFile(), httpRequestFinished(), LiveUpdate(), newHttp(), and readResponseHeader().

QFile* LiveUpdate::file [private]

Definition at line 48 of file liveupdate.h.

Referenced by downloadFile(), httpRequestFinished(), and runDownloaded().

QString LiveUpdate::hash [private]

Definition at line 49 of file liveupdate.h.

Referenced by downloadFile(), and httpRequestFinished().

QString LiveUpdate::newfile [private]

Definition at line 50 of file liveupdate.h.

Referenced by downloadNew(), LiveUpdate(), and ProcessXml().

QString LiveUpdate::newhash [private]

Definition at line 51 of file liveupdate.h.

Referenced by downloadNew(), LiveUpdate(), and ProcessXml().

int LiveUpdate::httpGetId [private]

Definition at line 54 of file liveupdate.h.

Referenced by downloadFile(), and httpRequestFinished().

bool LiveUpdate::xml [private]

Definition at line 55 of file liveupdate.h.

Referenced by downloadFile(), and httpRequestFinished().

bool LiveUpdate::sucess [private]

Definition at line 56 of file liveupdate.h.

Referenced by httpRequestFinished().

bool LiveUpdate::httpRequestAborted [private]

Definition at line 57 of file liveupdate.h.

Referenced by cancelDownload(), downloadFile(), httpRequestFinished(), and readResponseHeader().


The documentation for this class was generated from the following files:
Generated on Sun Oct 28 22:51:42 2007 for BBoB by  doxygen 1.5.3