Home · All Classes · Grouped Classes · Annotated · Functions

Document System: Document Server

The document server provides a centralized service through which access to the document system is managed in a secure manner. Through the document server applications may create, manipulate and delete user documents, as well as query the document system for content matching a variety of criteria.

The functionality provided by the document server is accessed through the Content (QContent, QContentSet) API. Connections to the document server are made implicitly so no set up is required to utilize the document server.


The document server forms part of Qtopia's Safe Execution Environment (SXE) and the functionality an application can utilize is restricted according to the SXE profiles it has been awarded. All applications are able to look-up content by file name or ID and view the content meta-data, doing anything more requires one or more of the SXE profiles below:

doc_readAllows an application to open user documents in read-only mode.
doc_writeAllows an application to open user documents in read-write mode and edit content meta-data.
doc_serverAllows an application to create content sets and search user documents.
doc_mimetypesAllows an application to manage application to MIME type associations.
doc_installAllows an application to install other applications.
categoriesAllows an application to edit categories. No profile is required to view categories.
drmAllows an application access to DRM protected content.

Document Selector Service

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.

Document Scanning

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 Qtopia as such is done sparingly. Typically scans are only performed when starting Qtopia and after external media has been inserted, if needed a document scan on a directory can be started explicitly with QContentSet::scan().

Removable media

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.

Directly Accessing the Document System

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 .pro file.


An application must also have the docapi SXE profile in order to connect directly to the document system.

Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3