Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

StartupApplications Class Reference
[QtBaseModule]

The StartupApplications class launches applications preemptively at startup. More...

    #include <StartupApplications>

Inherits QObject.

Public Functions

Signals

Additional Inherited Members


Detailed Description

The StartupApplications class launches applications preemptively at startup.

The StartupApplications provides a Qt Extended Server Task. Qt Extended Server Tasks are documented in full in the QtopiaServerApplication class documentation.

Qt Extended provides support for preloading GUI applications, and for launching background daemon-type applications during startup. The StartupApplications class provides this functionality.

Preloaded Applications

Preloaded applications are started immediately after Qt Extended starts, but in a hidden state. Preloading an application ensures that it is available for almost instantaneouse "startup" whenever the user accesses it. However, as preloaded applications continue to run indefinately, they consume system resources such as RAM and scheduler time even when not actively in use. Only applications used very frequently should be preloaded.

An application can be preloaded by adding it to the AppLoading\PreloadApps item list in the Trolltech/Launcher configuration file. The following example shows both the addressbook and qtmail applications set to preload.

    [AppLoading]
    PreloadApps=addressbook,qtmail

Background Applications

Background applications allow simple QCop messages to be sent to an application during startup, whenever it terminates or at system shutdown. Background applications allow Qt Extended to launch and control simple daemon-style servers.

Daemon configuration

The configuration files for background applications can be found in the following path positions:

  1. $HOME/Applications/daemons
  2. $QPE_IMAGE/etc/daemons
  3. $QTOPIA_PATH/etc/daemons

If the same background application is configured by more than one configuration file the above directory order determines the priority. This allows the user to override the system behavior.

The configuration file has the following form:

    [DaemonParameter]
    ApplicationName=<Application Name>
    ServiceName=<Service Name>
    TaskGroup=<Qt Extended Task Group>
    Silent=<true/false>
    StartupMessage=<Message>
    RestartMessage=<Message>
    ShutdownMessage=<Message>

Each option maps to the following functionality:

OptionDescription
ApplicationNameThe name of the application to send the QCop messages to.
ServiceNameA name of a service to send QCop messages to. The default provider of the service will be used. If both ApplicationName and ServiceName are specified, the ServiceName option is ignored.
TaskGroupThe name of the group to which the background application belogs. Group names allow a collection of applications to be started together at startup by inserting the group name into the Tasks.cfg Qt Extended startup file. Task groups are not optional.
SilentIf true, warning messages about this application will be suppressed. For example, if the application or service cannot be found a qWarning() will only appear if Silent is false or omitted.
StartupMessageA message to send when the application is started. A common value for StartupMessage is raise.
RestartMessageA message to send to restart the application when it terminates. This message is optional and will only be sent if the application had previously been started with StartupMessage.
ShutdownMessageA message to send at system shutdown. This message is optional and will only be sent if the application had previously been started with StartupMessage. Following this message, the application is expected to exit within 5 seconds.

Here is a concrete example, specifying that the MessageServer application should be started with the 'startup' application group, and should be restarted if it terminates:

    [DaemonParameter]
    ApplicationName=messageserver
    TaskGroup=startup
    StartupMessage=raise()
    RestartMessage=raise()

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.


Member Function Documentation

StartupApplications::StartupApplications ( QObject * parent = 0 )

Create the StartupApplications class with the specified parent.

void StartupApplications::preloadCrashed ( const QString & application )   [signal]

Emitted whenever a preloaded application crashes. A crashing preloaded application will be automatically removed from the preloaded application list.

The PreloadApplication class filter crashes, using the ApplicationTerminationHandler interface.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3