Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The document system stores a variety of information about content on a device which is used in the presentation of content and for constructing sets of content. This information is broken down into three different groups for most content; core meta-data, properties, and categories, there is also some meta-data that is unique to applications.
Content meta-data may be specified by an application when creating content, or it may be extracted from the content itself by content plug ins that are run by the document system when installing content.
The core meta-data is defining information that is common to all content, it identifies the name of the content, its type, intended use, and whether it utilizes any DRM protection.
Meta-data | Description |
---|---|
Name | The user visible name of the content. This is typically derived from the file name but may be explicitly set or extracted from content headers (e.g. the song title of an MP3). For some content such as applications this will be a translated string. |
File name | The absolute file name of the content, or for applications the binary name with no path. |
MIME type | The RFC2045 MIME type of the content. |
Role | The intended usage of the document, indicates whether it is an application, a user document, a system document, or an application folder. |
DRM protection | Indicates whether or not the content is protected by any form of DRM. |
Filters can be constructed for searching on all the core meta-data, and content sets may be sorted on the name, file name, or MIME type.
The document system also makes available some meta-data that it does not store directly. This is data that can be derived from the core meta-data such as things that are common to all content of the same MIME type, that can be queried from the content itself, or is stored separately. As this meta-data is not stored by the document system it can not be used to filter or sort content.
Meta-data | Description |
---|---|
Icon | The icon displayed when listing the content. For most content this is derived for the MIME type, but it can also be explicitly set as is done for most applications. |
Media | The root path of the file system the content is stored on. This is not explicitly stored but is instead determined from the file path of the content. |
DRM Rights | The current DRM permissions for using the content. This information is maintained by a DRM agent independent of the document system and is queried on demand. |
Size | The size of the content in bytes. The document system does not store the size, but gets it from the content directly when queried. |
Properties are key-value pairs that are stored by the document system and can be used to filter and sort content.
Property identifiers are composed of a group and a key the combination of which must be unique per content and value (reusing a group and key will overwrite the existing value). It's not necessary to use a property group as the document system will default to the global group none if no group is given, however when storing application specific properties it is recommended to use a group unique to the application to prevent key conflicts. Qt Extended defines some keys for commonly occurring properties with the QContent::Property enumeration, all of these properties are in the none group.
The document system utilizes the common Qt Extended category system for grouping content. In order to assign content a category it must have already been created using QCategoryManager, categories from any scope may be assigned to content but typically only the global and Documents scope should be used as categories in other scopes cannot be selected in the document selector widgets or Qt Extended launcher.
The application folders in the Qt Extended launcher are categories in the Applications scope, applications are added to these folders by assigning them one or more application categories.
In addition to the regular meta-data shared by all content, applications also need to identify the types of documents they are able to open from the launcher. For each supported type the document system stores the type itself, an icon, and the DRM permission a document must have in order to be opened by the application. Only the first must be specified, if no icon is given then the application's icon will be used, and in the absence of a DRM permission the application is assumed to not support protected content.
The MIME type information and other application meta-data is usually defined in a .desktop file and is imported into the document system when the application is installed.
The document system employs content plug-ins to extract meta-data embedded in content. The information provided by a content plug-in may be an extensive list of searchable information such as that found in the ID3 headers of MP3 files, or simply the correct type of a file with an ambiguous file extension.
A content plug-in identifies a list of file extensions for MIME types it support reading and when installing or updating content meta-data the document system uses these extensions to identify a content plug-in capable of extracting embedded meta-data. If no content plug-in can be found for the content or some necessary information (name or MIME type) has not been provided the document will attempt to derive the missing information from the file name.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |