Document System: Document Server
|
Profile | Description |
---|---|
doc_read | Allows an application to open user documents in read-only mode. |
doc_write | Allows an application to open user documents in read-write mode and edit content meta-data. |
doc_server | Allows an application to create content sets and search user documents. |
doc_mimetypes | Allows an application to manage application to MIME type associations. |
doc_install | Allows an application to install other applications. |
categories | Allows an application to edit categories. No profile is required to view categories. |
drm | Allows an application access to DRM protected content. |
The document selector service allows applications to open only documents selected by the user. Using the QDocumentSelectorService class an application can request the server display a document selector and return a read-only file handle to the document selected by the user. If the application wishes to save changes to the opened document it can then request the server display a confirmation dialog which if accepted will re-open the document in write-only mode. The service also allows saving new documents, in this case the application specifies a suggested document name and a list of possible types, the user can then edit the name and select from the types before accepting the dialog and creating a new document.
The document selector service allows applications to provide document viewing and editing capabilities without requiring the doc_read and doc_write SXE profiles which give access to all user documents. To open documents using the document selector service the doc_open profile is required, and to save documents the doc_save profile is required.
The document server is also responsible for scanning document directories to ensure the information kept by the document system is up to date. Changes made to documents using the document system are updated immediately so scanning is only required to detect changes which are external to Qt Extended as such is done sparingly. Typically scans are only performed when starting Qt Extended and after external media has been inserted, if needed a document scan on a directory can be started explicitly with QContentSet::scan().
Where possible the database containing the meta-data for documents on removable media is stored on the media itself, this allows meta-data to be preserved when the media is removed and can reduce the amount of scanning that needs to be done when inserting media that has already been scanned. See Document Storage for information on configuring removable media.
Applications can access the document system in two ways; directly or through the document server. By default applications use the document server but if direct access is desired this can be achieved by changing the document system connection with QContent::setDocumentSystemConnection() before connecting to the document system. Because connections are made implicitly this must be done immediately after constructing the application's QtopiaApplication, when using the QTOPIA_MAIN macro this can be set by adding the define QTOPIA_DIRECT_DOCUMENT_SYSTEM_CONNECTION in the application's qbuild.pro file.
DEFINES+=QTOPIA_DIRECT_DOCUMENT_SYSTEM_CONNECTION
An application must also have the docapi SXE profile in order to connect directly to the document system.
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 ! |
Copyright © 2000-2012 - www.developpez.com