NFontUpdater Class Reference

#include <nfontupdater.h>

List of all members.

Public Types

enum  Source { FromNone = 0, FromServer, FromLocal }
enum  Step {
  Initialize = 0, CleanupDownloadDirectory, CheckNextPackageToDownload, DownloadCurrentPackage,
  CheckAllRequiredPackagesAvailable, RemoveFontSymlinks, RemoveFontFiles, CheckNextPackageToUnpack,
  UnpackCurrentPackage, RemoveCurrentPackage, MakeFontSymlinks, UpdateApplicationFont,
  Finish
}
enum  Error {
  NoError = 0, InvalidUrl, PackageNoFoundOnLocal, PackageNoFoundOnServer,
  LocalStorageNonexistent, LocalStorageUnReadable, LocalStorageUnWritable, FontFilesNoFoundOnLocal,
  CleanDownloadDirectoryFailed, RemoveFontLinksFailed, RemoveFontFilesFailed, UnpackFailed,
  MakeFontLinksFailed, UpdateApplicationFontFailed, DownloadFailed
}

Signals

void stepFinished (bool error)
void httpDone (bool error)

Public Member Functions

 NFontUpdater (QObject *parent=0)
 ~NFontUpdater ()
void setSource (Source source)
void setFontFrom (const QString &from)
void setFontTo (const QString &to)
Source source () const
QString from () const
QString to () const
void setLocalStorage (const QString &path)
QString currentPackage () const
Error error () const
QString errorString ()
Step currentStep () const
Step nextStep () const
void initUpdater ()
void cleanup ()
void doNextStep ()
bool init ()
bool cleanupDownloadDirectory ()
bool startDownloadCurrentPackage ()
int checkNextPackageToDownload ()
int checkNextPackageToUnpack ()
bool checkAllRequiredPackagesAvailable ()
bool removeFontSymlinks ()
bool removeFontFiles ()
bool unpackCurrentPackage ()
bool removeCurrentPackage ()
bool makeFontSymlinks ()
bool updateApplicationFont ()
bool finish ()

Static Public Member Functions

static bool needExtendedFont (const QString &font)

Private Slots

void onHttpResponseHeaderReceived (const QHttpResponseHeader &resp)
void onHttpRequestFinished (int id, bool error)

Private Member Functions

 Q_ENUMS (Source)
 Q_ENUMS (Step)
 Q_ENUMS (Error)
void setError (Error error)
void setErrorString (const QString &text)
QVector< StepgetStepSequence (Source source, const QString &from, const QString &to) const
QStringList getDefaultPackages (const QString &font) const
QString getPackageName (int index) const
QString getDefaultServerStorageDir (const QString &font) const
QString getDefaultLocalStorageDir (Source source) const
QString convertToPath (const QStringList &list) const

Private Attributes

Source fontSource
Error updateError
QString updateErrorString
QString fromFont
QString toFont
QVector< StepstepSequence
int currentStepIndex
int nextStepIndex
int currentHttpGetId
bool currentHttpGetFinished
QFile * currentHttpGetFile
QHttp * currentHttp
QUrl currentPackageUrl
QString serverStorageDir
QString localStorageDir
QStringList fontPackageList
int currentPackageIndex


Member Enumeration Documentation

enum NFontUpdater::Source

Enumerator:
FromNone 
FromServer 
FromLocal 

enum NFontUpdater::Step

Enumerator:
Initialize 
CleanupDownloadDirectory 
CheckNextPackageToDownload 
DownloadCurrentPackage 
CheckAllRequiredPackagesAvailable 
RemoveFontSymlinks 
RemoveFontFiles 
CheckNextPackageToUnpack 
UnpackCurrentPackage 
RemoveCurrentPackage 
MakeFontSymlinks 
UpdateApplicationFont 
Finish 

enum NFontUpdater::Error

Enumerator:
NoError 
InvalidUrl 
PackageNoFoundOnLocal 
PackageNoFoundOnServer 
LocalStorageNonexistent 
LocalStorageUnReadable 
LocalStorageUnWritable 
FontFilesNoFoundOnLocal 
CleanDownloadDirectoryFailed 
RemoveFontLinksFailed 
RemoveFontFilesFailed 
UnpackFailed 
MakeFontLinksFailed 
UpdateApplicationFontFailed 
DownloadFailed 


Constructor & Destructor Documentation

NFontUpdater::NFontUpdater ( QObject *  parent = 0  )  [explicit]

NFontUpdater::~NFontUpdater (  ) 


Member Function Documentation

NFontUpdater::Q_ENUMS ( Source   )  [private]

NFontUpdater::Q_ENUMS ( Step   )  [private]

NFontUpdater::Q_ENUMS ( Error   )  [private]

bool NFontUpdater::needExtendedFont ( const QString &  font  )  [static]

void NFontUpdater::setSource ( Source  source  )  [inline]

void NFontUpdater::setFontFrom ( const QString &  from  )  [inline]

void NFontUpdater::setFontTo ( const QString &  to  )  [inline]

Source NFontUpdater::source (  )  const [inline]

QString NFontUpdater::from (  )  const [inline]

QString NFontUpdater::to (  )  const [inline]

void NFontUpdater::setLocalStorage ( const QString &  path  )  [inline]

QString NFontUpdater::currentPackage (  )  const [inline]

Error NFontUpdater::error (  )  const [inline]

QString NFontUpdater::errorString (  )  [inline]

Step NFontUpdater::currentStep (  )  const [inline]

Step NFontUpdater::nextStep (  )  const [inline]

void NFontUpdater::initUpdater (  ) 

void NFontUpdater::cleanup (  ) 

void NFontUpdater::doNextStep (  ) 

bool NFontUpdater::init (  ) 

bool NFontUpdater::cleanupDownloadDirectory (  ) 

bool NFontUpdater::startDownloadCurrentPackage (  ) 

int NFontUpdater::checkNextPackageToDownload (  ) 

int NFontUpdater::checkNextPackageToUnpack (  ) 

bool NFontUpdater::checkAllRequiredPackagesAvailable (  ) 

bool NFontUpdater::removeFontSymlinks (  ) 

bool NFontUpdater::removeFontFiles (  ) 

bool NFontUpdater::unpackCurrentPackage (  ) 

bool NFontUpdater::removeCurrentPackage (  ) 

bool NFontUpdater::makeFontSymlinks (  ) 

bool NFontUpdater::updateApplicationFont (  ) 

bool NFontUpdater::finish (  ) 

void NFontUpdater::stepFinished ( bool  error  )  [signal]

void NFontUpdater::httpDone ( bool  error  )  [signal]

void NFontUpdater::onHttpResponseHeaderReceived ( const QHttpResponseHeader &  resp  )  [private, slot]

void NFontUpdater::onHttpRequestFinished ( int  id,
bool  error 
) [private, slot]

void NFontUpdater::setError ( Error  error  )  [inline, private]

void NFontUpdater::setErrorString ( const QString &  text  )  [inline, private]

QVector< NFontUpdater::Step > NFontUpdater::getStepSequence ( Source  source,
const QString &  from,
const QString &  to 
) const [private]

QStringList NFontUpdater::getDefaultPackages ( const QString &  font  )  const [private]

QString NFontUpdater::getPackageName ( int  index  )  const [private]

QString NFontUpdater::getDefaultServerStorageDir ( const QString &  font  )  const [private]

QString NFontUpdater::getDefaultLocalStorageDir ( Source  source  )  const [private]

QString NFontUpdater::convertToPath ( const QStringList &  list  )  const [private]


Member Data Documentation

Source NFontUpdater::fontSource [private]

Error NFontUpdater::updateError [private]

QString NFontUpdater::updateErrorString [private]

QString NFontUpdater::fromFont [private]

QString NFontUpdater::toFont [private]

QVector<Step> NFontUpdater::stepSequence [private]

int NFontUpdater::currentStepIndex [private]

int NFontUpdater::nextStepIndex [private]

int NFontUpdater::currentHttpGetId [private]

bool NFontUpdater::currentHttpGetFinished [private]

QFile* NFontUpdater::currentHttpGetFile [private]

QHttp* NFontUpdater::currentHttp [private]

QUrl NFontUpdater::currentPackageUrl [private]

QString NFontUpdater::serverStorageDir [private]

QString NFontUpdater::localStorageDir [private]

QStringList NFontUpdater::fontPackageList [private]

int NFontUpdater::currentPackageIndex [private]


The documentation for this class was generated from the following files:
Generated on Wed Oct 22 02:31:10 2008 for Neuros OSD1.0 linux-r3-main-app/neuros-qt4-libs by  1.5.1