Home · All Classes · Grouped Classes · Annotated · Functions

ApplicationTerminationHandler Class Reference

The ApplicationTerminationHandler class allows tasks to be notified, and possibly filter, when an application terminates. More...

    #include <ApplicationTerminationHandler>

Inherits QObject.

Public Functions

Additional Inherited Members

Detailed Description

The ApplicationTerminationHandler class allows tasks to be notified, and possibly filter, when an application terminates.

The ApplicationTerminationHandler provides a Qtopia Server Task interface. Qtopia Server Tasks are documented in full in the QtopiaServerApplication class documentation.

Note: This class is part of the Qtopia server and cannot be used by other Qtopia applications.

When an application terminates, the ApplicationLauncher notifies all tasks, in order, that implement the ApplicationTerminationHandler interface. A task that implements the ApplicationTeminationHandler interface can filter the termination notification by returning true from its terminated() notification method. Filtering a termination will prevent subsequently ordered tasks from being notified.

Regardless of whether or not a task is filtered, the ApplicationLauncher class will still emit the global ApplicationLauncher::applicationTerminated() signal, albeit with the filtered parameter set to true.

Termination handlers can be used to hide the termination of "system" applications from the user, or to implement custom termination notices. The QTerminationHandler class, for example, uses a server side termination handler to display a more descriptive crash message when an application abnormally exits.

Member Function Documentation

ApplicationTerminationHandler::ApplicationTerminationHandler ( QObject * parent = 0 )

Construct a new ApplicationTerminationHandler interface with the given parent.

bool ApplicationTerminationHandler::terminated ( const QString & appName, ApplicationTypeLauncher::TerminationReason reason )   [pure virtual]

Invoked when an application terminates. appName is the name of the application that terminated and reason is the way in which it terminated.

Returning false from this method allows the termination notification to continue to propagate to other ApplicationTerminationHandler instances. Returning true stops further propagation. Implementors should only return true if they intend to notify the user of the termination, or if they have determined that notification is not required.

Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3