Home · All Classes · Grouped Classes · Annotated · Functions

StartupApplications Class Reference

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 Qtopia Server Task. Qtopia Server Tasks are documented in full in the QtopiaServerApplication class documentation.

Task NameStartupApplications
InterfacesNone
ServicesNone

Qtopia 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 Qtopia 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 Qtopia to launch and control simple daemon-style servers.

Background applications are configured in the Trolltech/BackgroundApplications configuration file. The file has the following form:

    [General]
    Count = <daemon count>

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

The Count argument specifies the number of background applications that follow. Settings for each are grouped under Application<X> sections, where X is from 0 to Count - 1. For example, if Count were two, there should be Application0 and Application1 sections.

For each configured application, the following options are available:

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 Qtopia 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.
RestartMessageA message to send when the application exits. 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.

This class is part of the Qtopia server and cannot be used by other Qtopia 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 © 2008 Nokia Trademarks
Qtopia 4.3.3