Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

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:

  • services/PackageManager.service
  • etc/qds/Packagemanager
  • implementation of the PackageManagerService class.

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.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web