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

Web Browser Integration Implementation

This documentation describes implementation details of how PackageManager has been primed for integration with web browsers. For instructions on integrating the browser see PackageManager - Browser Integration.

The Web Browser integration allows the user to install a package directly from a web page viewed within a web browser. When a user clicks a link to a Qt Extended package descriptor file, the PackageManager service is notified. It then invokes the PackageManager enabling the user to install the package referenced by the descriptor. The browser notifies the PackageManager service when it recognizes a file of a pre-defined mime type. The service then passes the descriptor file contents to the PackageManager, which manages the execution of the standard package installation functionality.

PackageManager Definition

The PackageManager definition contains:

The services/PackageManager.service file

This file defines the PackageManager service as a standard Qt Extended service. It specifies an action called installPackage() which corresponds to a method with the same name in the PackageManagerService class.

The etc/qds/Packagemanager file

This file defines the PackageManager service as a QDS service allowing it to be found when searching for the QDS services available for a particular mime type. For example, the mime type for the PackageManager is application/qtopia-package. The file also specifies the service attribute install allowing QDSServices to find a service corresponding to this mime type and attribute, with the returned service being the PackageManager service.

The PackageManagerService Class

The PackageManagerService class is derived from QtopiaAbstractService with core implementation similar to other services. Additionally, it contains the method installPackage() which accepts a single parameter of type QDSRequest and contains the request data, that is, the contents of the Qt Extended package descriptor file. This method is called when a service action of the same name is invoked (by the browser on recognition of the application/qtopia-package mime type) and then executes the standard PackageManager dialog, which prompts the user to install the package or cancel the installation.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3