Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Server Class Reference

#include </home/clem/local/src/opie/core/launcher/server.h>

Collaboration diagram for Server:

Collaboration graph
[legend]
List of all members.

Public Slots

void systemMsg (const QCString &, const QByteArray &)
void receiveTaskBar (const QCString &msg, const QByteArray &data)
void terminateServers ()
void pokeTimeMonitors ()

Public Member Functions

 Server ()
 ~Server ()
void show ()
 Server ()
 Server (const char *name, const char *url)
 Server (const char *name, const char *url, const char *file)
 ~Server ()
void cleanUp ()
void readStatusFile (QList< Destination > &v)
void readLocalIpks (Server *local)
void readPackageFile (Server *local=0, bool clearAll=true, bool installedToRoot=false, Destination *dest=0)
void buildLocalPackages (Server *local)
PackagegetPackage (const char *name)
PackagegetPackage (QString &name)
QString toString ()
QList< Package > & getPackageList ()
bool isServerActive ()
void setServerName (const QString &name)
void setServerUrl (const QString &url)
void setActive (bool val)
QStringgetServerName ()
QStringgetServerUrl ()

Static Public Member Functions

static bool mkdir (const QString &path)
static bool setKeyboardLayout (const QString &kb)

Protected Member Functions

void styleChange (QStyle &)
void timerEvent (QTimerEvent *e)

Private Slots

void startSoundServer ()
void soundServerExited ()
void activate (const Opie::Core::ODeviceButton *, bool)
void syncConnectionClosed (const QHostAddress &)
void applicationLaunched (int pid, const QString &app)
void applicationTerminated (int pid, const QString &app)
void applicationConnected (const QString &app)
void storageChanged ()
void cancelSync ()
void desktopMessage (const QCString &, const QByteArray &)
void runDirectAccess ()
void finishedQueuedRequests ()

Private Member Functions

void layout ()
void startTransferServer ()
void preloadApps ()
void prepareDirectAccess ()
void postDirectAccess ()
QString cardInfoString ()
QString installLocationsString ()

Private Attributes

QCopBridgeqcopBridge
TransferServertransferServer
PackageHandlerpackageHandler
QDate last_today_show
int tid_xfer
StorageInfostorage
SyncDialogsyncDialog
AppLauncherappLauncher
DocumentListdocList
ServerInterfaceserverGui
int pendingFlushes
bool directAccessRun
QueuedRequestRunnerqrr
Opie::Core::OProcessprocess
QString serverName
QString serverUrl
QString packageFile
bool active
QList< PackagepackageList

Constructor & Destructor Documentation

Server::Server  ) 
 

Definition at line 133 of file server.cpp.

References activate(), appLauncher, applicationConnected(), applicationLaunched(), applicationTerminated(), channel, ServerInterface::createGUI(), QDate::currentDate(), desktopMessage(), docList, last_today_show, packageHandler, pokeTimeMonitors(), preloadApps(), qApp, receiveTaskBar(), serverGui, Global::setBuiltinCommands(), soundServerExited(), startTransferServer(), storage, storageChanged(), systemMsg(), terminateServers(), and tid_xfer.

Server::~Server  ) 
 

Definition at line 205 of file server.cpp.

References ServerInterface::destroyGUI(), docList, qcopBridge, serverGui, and transferServer.

Server::Server  )  [inline]
 

Definition at line 42 of file server.h.

Server::Server const char *  name,
const char *  url
 

Definition at line 46 of file server.cpp.

References active, QString::append(), IPKG_DIR, packageFile, serverName, and serverUrl.

Server::Server const char *  name,
const char *  url,
const char *  file
 

Server::~Server  ) 
 


Member Function Documentation

void Server::activate const Opie::Core::ODeviceButton ,
bool 
[private, slot]
 

Definition at line 243 of file server.cpp.

References app, Opie::Core::OQCopMessage::channel(), hasVisibleWindow(), Opie::Core::OQCopMessage::send(), and Global::terminateBuiltin().

Referenced by Server().

void Server::applicationConnected const QString app  )  [private, slot]
 

Definition at line 794 of file server.cpp.

References ServerInterface::applicationStateChanged(), ServerInterface::Running, and serverGui.

Referenced by Server().

void Server::applicationLaunched int  pid,
const QString app
[private, slot]
 

Definition at line 779 of file server.cpp.

References ServerInterface::applicationStateChanged(), ServerInterface::Launching, and serverGui.

Referenced by Server().

void Server::applicationTerminated int  pid,
const QString app
[private, slot]
 

Definition at line 784 of file server.cpp.

References ServerInterface::applicationStateChanged(), serverGui, and ServerInterface::Terminated.

Referenced by Server().

void Server::buildLocalPackages Server local  ) 
 

Definition at line 243 of file server.cpp.

References QString::find(), Package::getDescription(), Package::getFilename(), getPackage(), getPackageList(), Package::getPackageName(), Utils::getPackageNameFromIpkFilename(), Package::getPackageSize(), Package::getSection(), Package::getVersion(), name, p, packageList, and Package::setLocalPackage().

Referenced by readLocalIpks(), and readPackageFile().

void Server::cancelSync  )  [private, slot]
 

Definition at line 636 of file server.cpp.

References syncDialog.

Referenced by systemMsg().

QString Server::cardInfoString  )  [private]
 

Definition at line 558 of file server.cpp.

References QString::contains(), StorageInfo::fileSystems(), QString::isEmpty(), QString::length(), QString::number(), s, storage, and StorageInfo::update().

Referenced by runDirectAccess().

void Server::cleanUp  ) 
 

Definition at line 61 of file server.cpp.

References packageList.

Referenced by readLocalIpks(), readPackageFile(), and readStatusFile().

void Server::desktopMessage const QCString ,
const QByteArray
[private, slot]
 

Definition at line 864 of file server.cpp.

References app, QueuedRequestRunner::desktopMessage(), error(), IO_ReadOnly, QString::latin1(), pendingFlushes, qDebug(), qrr, runDirectAccess(), stream, and QueuedRequestRunner::waitingForMessages.

Referenced by Server().

void Server::finishedQueuedRequests  )  [private, slot]
 

Definition at line 972 of file server.cpp.

References QPEApplication::Enable, qrr, QueuedRequestRunner::readyToDelete, syncDialog, and TRUE.

Referenced by postDirectAccess().

Package * Server::getPackage QString name  ) 
 

Definition at line 289 of file server.cpp.

References getPackage().

Package * Server::getPackage const char *  name  ) 
 

Definition at line 294 of file server.cpp.

References packageList.

Referenced by buildLocalPackages(), MainWindow::dealWithItem(), MainWindow::downloadPackage(), getPackage(), readPackageFile(), and MainWindow::slotDisplayPackage().

QList< Package > & Server::getPackageList  ) 
 

Definition at line 322 of file server.cpp.

References packageList.

Referenced by buildLocalPackages(), and MainWindow::serverSelected().

QString& Server::getServerName  )  [inline]
 

Definition at line 62 of file server.h.

References serverName.

Referenced by SettingsImpl::editServer(), DataManager::reloadServerData(), MainWindow::updateData(), and DataManager::writeOutIpkgConf().

QString& Server::getServerUrl  )  [inline]
 

Definition at line 63 of file server.h.

References serverUrl.

Referenced by SettingsImpl::editServer(), and DataManager::writeOutIpkgConf().

QString Server::installLocationsString  )  [private]
 

Definition at line 586 of file server.cpp.

References QString::contains(), StorageInfo::fileSystems(), QString::isEmpty(), QString::length(), QString::number(), s, storage, and StorageInfo::update().

Referenced by runDirectAccess(), and systemMsg().

bool Server::isServerActive  )  [inline]
 

Definition at line 57 of file server.h.

References active.

Referenced by SettingsImpl::editServer(), MainWindow::updateData(), and DataManager::writeOutIpkgConf().

void Server::layout  )  [private]
 

bool Server::mkdir const QString path  )  [static]
 

Definition at line 645 of file server.cpp.

References QDir::currentDirPath(), QDir::exists(), FALSE, QString::find(), QString::left(), QDir::mkdir(), odebug, oendl, and TRUE.

Referenced by systemMsg().

void Server::pokeTimeMonitors  )  [slot]
 

Definition at line 766 of file server.cpp.

References QPtrList< type >::first(), QPtrList< type >::next(), and t.

Referenced by Server().

void Server::postDirectAccess  )  [private]
 

Definition at line 927 of file server.cpp.

References docList, QPEApplication::Enable, QFile::exists(), finishedQueuedRequests(), process, qDebug(), qrr, startTransferServer(), DocumentList::storageChanged(), and syncDialog.

Referenced by systemMsg().

void Server::preloadApps  )  [private]
 

Definition at line 808 of file server.cpp.

References QValueList< T >::begin(), QValueList< T >::end(), Config::readListEntry(), and Config::setGroup().

Referenced by Server().

void Server::prepareDirectAccess  )  [private]
 

Definition at line 821 of file server.cpp.

References appLauncher, directAccessRun, QPEApplication::DisableSuspend, FALSE, pendingFlushes, qDebug(), runDirectAccess(), AppLauncher::runningApplications(), syncDialog, terminateServers(), and tr.

Referenced by systemMsg().

void Server::readLocalIpks Server local  ) 
 

Definition at line 101 of file server.cpp.

References buildLocalPackages(), DocLnkSet::children(), cleanUp(), QString::find(), Global::findDocuments(), Utils::getPackageNameFromIpkFilename(), Utils::getPackageVersionFromIpkFilename(), i, QString::mid(), p, and packageList.

Referenced by DataManager::reloadServerData().

void Server::readPackageFile Server local = 0,
bool  clearAll = true,
bool  installedToRoot = false,
Destination dest = 0
 

Definition at line 151 of file server.cpp.

References buildLocalPackages(), cleanUp(), QTextStream::eof(), f, QString::find(), getPackage(), IO_ReadOnly, Package::isInstalled(), QString::length(), QString::mid(), QString::null, QFile::open(), packageFile, packageList, pos, QTextStream::readLine(), DataManager::setAvailableCategories(), Package::setDescription(), Package::setFilename(), Package::setInstalledTo(), Package::setInstalledToRoot(), Package::setPackageSize(), Package::setSection(), Package::setStatus(), Package::setVersion(), QString::stripWhiteSpace(), and t.

Referenced by readStatusFile(), and DataManager::reloadServerData().

void Server::readStatusFile QList< Destination > &  v  ) 
 

Definition at line 66 of file server.cpp.

References QString::append(), cleanUp(), Opie::MM::dest, Destination::getDestinationPath(), packageFile, readPackageFile(), and QString::right().

Referenced by DataManager::reloadServerData().

void Server::receiveTaskBar const QCString msg,
const QByteArray data
[slot]
 

Definition at line 614 of file server.cpp.

References docList, IO_ReadOnly, l, Opie::Core::Led_BlinkSlow, Opie::Core::Led_Mail, Opie::Core::Led_Off, Opie::Core::Led_On, DocumentList::reloadAppLnks(), ServerApplication::soundAlarm(), and stream.

Referenced by Server().

void Server::runDirectAccess  )  [private, slot]
 

Definition at line 913 of file server.cpp.

References cardInfoString(), directAccessRun, installLocationsString(), and TRUE.

Referenced by desktopMessage(), and prepareDirectAccess().

void Server::setActive bool  val  )  [inline]
 

Definition at line 61 of file server.h.

References active.

Referenced by DataManager::loadServers().

static bool Server::setKeyboardLayout const QString kb  )  [static]
 

Referenced by initKeyboard(), and systemMsg().

void Server::setServerName const QString name  )  [inline]
 

Definition at line 59 of file server.h.

References serverName.

void Server::setServerUrl const QString url  )  [inline]
 

Definition at line 60 of file server.h.

References serverUrl.

void Server::show  ) 
 

Definition at line 199 of file server.cpp.

References ServerApplication::login(), and TRUE.

Referenced by initApplication().

void Server::soundServerExited  )  [private, slot]
 

Definition at line 1004 of file server.cpp.

References startSoundServer().

Referenced by Server(), and startSoundServer().

void Server::startSoundServer  )  [private, slot]
 

Definition at line 992 of file server.cpp.

References Opie::Core::OProcess::clearArguments(), OProcess, process, QPEApplication::qpeDir(), soundServerExited(), and Opie::Core::OProcess::start().

Referenced by soundServerExited().

void Server::startTransferServer  )  [private]
 

Definition at line 695 of file server.cpp.

References qcopBridge, syncConnectionClosed(), tid_xfer, and transferServer.

Referenced by postDirectAccess(), Server(), and timerEvent().

void Server::storageChanged  )  [private, slot]
 

Definition at line 799 of file server.cpp.

References docList, StorageInfo::fileSystems(), serverGui, storage, DocumentList::storageChanged(), and ServerInterface::storageChanged().

Referenced by Server().

void Server::styleChange QStyle &   )  [protected]
 

Definition at line 690 of file server.cpp.

void Server::syncConnectionClosed const QHostAddress &   )  [private, slot]
 

Definition at line 759 of file server.cpp.

References odebug, oendl, and syncDialog.

Referenced by startTransferServer().

void Server::systemMsg const QCString ,
const QByteArray
[slot]
 

Definition at line 328 of file server.cpp.

References app, QRsync::applyDiff(), TransferServer::authorizeConnections(), QValueList< T >::begin(), cancelSync(), QFile::close(), QString::compare(), QString::contains(), docList, QValueList< T >::end(), QDir::entryList(), QFile::exists(), f, StorageInfo::fileSystems(), QRsync::generateDiff(), QRsync::generateSignature(), installLocationsString(), IO_ReadOnly, IO_WriteOnly, QString::isEmpty(), QString::length(), DocumentList::linkChanged(), mkdir(), QString::number(), odebug, oendl, QFile::open(), pid, postDirectAccess(), prepareDirectAccess(), qcopBridge, QPE_VERSION, Config::readEntry(), DocumentList::reforceDocuments(), QDir::remove(), DocumentList::restoreDone(), s, ServerApplication::screenLocked(), DocumentList::sendAllDocLinks(), Config::setGroup(), setKeyboardLayout(), QDir::setPath(), storage, stream, syncDialog, transferServer, StorageInfo::update(), MimeType::updateApplications(), and Config::writeEntry().

Referenced by Server().

void Server::terminateServers  )  [slot]
 

Definition at line 751 of file server.cpp.

References qcopBridge, and transferServer.

Referenced by prepareDirectAccess(), and Server().

void Server::timerEvent QTimerEvent *  e  )  [protected]
 

Definition at line 725 of file server.cpp.

References channel, QDate::currentDate(), last_today_show, Config::readEntry(), Config::setGroup(), startTransferServer(), and tid_xfer.

QString Server::toString  ) 
 

Definition at line 308 of file server.cpp.

References QString::append(), packageList, serverName, and serverUrl.


Member Data Documentation

bool Server::active [private]
 

Definition at line 71 of file server.h.

Referenced by isServerActive(), Server(), and setActive().

AppLauncher* Server::appLauncher [private]
 

Definition at line 105 of file server.h.

Referenced by prepareDirectAccess(), and Server().

bool Server::directAccessRun [private]
 

Definition at line 110 of file server.h.

Referenced by prepareDirectAccess(), and runDirectAccess().

DocumentList* Server::docList [private]
 

Definition at line 106 of file server.h.

Referenced by postDirectAccess(), receiveTaskBar(), Server(), storageChanged(), systemMsg(), and ~Server().

QDate Server::last_today_show [private]
 

Definition at line 98 of file server.h.

Referenced by Server(), and timerEvent().

QString Server::packageFile [private]
 

Definition at line 70 of file server.h.

Referenced by readPackageFile(), readStatusFile(), and Server().

PackageHandler* Server::packageHandler [private]
 

Definition at line 97 of file server.h.

Referenced by Server().

QList<Package> Server::packageList [private]
 

Definition at line 74 of file server.h.

Referenced by buildLocalPackages(), cleanUp(), getPackage(), getPackageList(), readLocalIpks(), readPackageFile(), and toString().

int Server::pendingFlushes [private]
 

Definition at line 109 of file server.h.

Referenced by desktopMessage(), and prepareDirectAccess().

Opie::Core::OProcess* Server::process [private]
 

Definition at line 113 of file server.h.

Referenced by postDirectAccess(), and startSoundServer().

QCopBridge* Server::qcopBridge [private]
 

Definition at line 95 of file server.h.

Referenced by startTransferServer(), systemMsg(), terminateServers(), and ~Server().

QueuedRequestRunner* Server::qrr [private]
 

Definition at line 111 of file server.h.

Referenced by desktopMessage(), finishedQueuedRequests(), and postDirectAccess().

ServerInterface* Server::serverGui [private]
 

Definition at line 107 of file server.h.

Referenced by applicationConnected(), applicationLaunched(), applicationTerminated(), Server(), storageChanged(), and ~Server().

QString Server::serverName [private]
 

Definition at line 68 of file server.h.

Referenced by getServerName(), Server(), setServerName(), and toString().

QString Server::serverUrl [private]
 

Definition at line 69 of file server.h.

Referenced by getServerUrl(), Server(), setServerUrl(), and toString().

StorageInfo* Server::storage [private]
 

Definition at line 103 of file server.h.

Referenced by cardInfoString(), installLocationsString(), Server(), storageChanged(), and systemMsg().

SyncDialog* Server::syncDialog [private]
 

Definition at line 104 of file server.h.

Referenced by cancelSync(), finishedQueuedRequests(), postDirectAccess(), prepareDirectAccess(), syncConnectionClosed(), and systemMsg().

int Server::tid_xfer [private]
 

Definition at line 99 of file server.h.

Referenced by Server(), startTransferServer(), and timerEvent().

TransferServer* Server::transferServer [private]
 

Definition at line 96 of file server.h.

Referenced by startTransferServer(), systemMsg(), terminateServers(), and ~Server().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:51:33 2005 for OPIE by  doxygen 1.4.2