Home · All Classes · Grouped Classes · Annotated · Functions

BuiltinApplicationLauncher Class Reference

The BuiltinApplicationLauncher class supports launching simple applications that run inside the Qtopia Server process. More...

    #include <BuiltinApplicationLauncher>

Inherits ApplicationTypeLauncher and ApplicationIpcRouter::RouteDestination.

Public Types

Public Functions

Macros

Additional Inherited Members


Detailed Description

The BuiltinApplicationLauncher class supports launching simple applications that run inside the Qtopia Server process.

The BuiltinApplicationLauncher provides a Qtopia Server Task. 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.

Task NameBuiltinApplicationLauncher
InterfacesApplicationTypeLauncher
ServicesNone

The BuiltinApplicationLauncher class provides the ApplicationTypeLauncher implementation for simple applications compiled into the Qtopia Server - known as builtin applications.

A builtin application must consist of a single, toplevel widget. Generally builtins do not implement services, but they may. If multiple builtins implement the same service, or the Qtopia Server and a builtin implements the same service, the behaviour is undefined.

Adding a builtin application is a simple case of linking it into the Qtopia Server, and adding a QTOPIA_SIMPLE_BUILTIN() macro to your code. The QTOPIA_SIMPLE_BUILTIN() macro registers the builtin application with the BuiltinApplicationLauncher class. The macro takes the application name, and a simple static function that "launches" the application and returns a QWidget pointer as paramters.

Note: Builtins may not currently implement services. This functionality is planned for future versions of Qtopia.


Member Type Documentation

typedef BuiltinApplicationLauncher::BuiltinFunc

The BuiltinFunc provides a type definition that the static function used to create a builtin application must conform to. The exact specification is:

    typdef QWidget *(*BuiltinFunc)()

Member Function Documentation

BuiltinApplicationLauncher::BuiltinApplicationLauncher ()

Constructs a new BuiltinApplicationLauncher instance.

BuiltinApplicationLauncher::~BuiltinApplicationLauncher ()   [virtual]

Destroys the BuiltinExeApplicationLauncher instance.


Macro Documentation

QTOPIA_SIMPLE_BUILTIN ( ApplicationName, createFunc )

Add a new builtin application to the server. ApplicationName must be the name of the application and createFunc a static function, of type BuiltinApplicationLauncher::BuiltinFunc, that creates the applications. For example, the following code adds a simple builtin named "TestBuiltin" to the server.

    class TestBuiltinWindow : public QWidget
    {
       // ...
    };
    static QWidget *testBuiltinFunc()
    {
        return new TestBuiltinWindow(0);
    }
    QTOPIA_SIMPLE_BUILTIN(TestBuiltin, testBultinFunc);


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3