This document is a formal description of the Capabilities extension of the feeds format. A capability tells the desktop environment what an application can do (e.g., suported file types) and in which fashion this can be represented to the user. This is used for desktop integration (currently only supported on Windows).

XSD schema

Contents:

Syntax

Capability extensions for feeds have following syntax (? follows optional items, * means zero-or-more, order of elements is not important):

<?xml version='1.0'?>
<interface xmlns='http://zero-install.sourceforge.net/2004/injector/interface' uri='...'>
  ...

  <capabilities xmlns='http://0install.de/schema/desktop-integration/capabilities' os='...' ?>
    [capability] *
  </capabilities> *
</interface>
os
Specifies for which operating system the capabilities are applicable (e.g., os="Windows" for Windows systems).

Capability types

File types

An application's ability to open certain file types.

<file-type id='...' explicit-only='true' ?>
  <extension value='...' mime-type='...' ? perceived-type='...' ?/> *
  <description xml:lang='...' ?>...</description> *
  [verb] *
  [icon] *
</file-type>
id
An ID that uniquely identifies this file type within the feed.
Also serves as a programmatic identifier within the desktop environment. In case of conflicts, the first file type listed with a specific ID will take precedence.
explicit-only
When set to true the app is not set as the default handler for this file type without explicit confirmation from the user.
<extension>
A file extension used to identify a file type.
value is the file extension including the leading dot (e.g., .png).
mime-type is the (optional) MIME type associated with the file extension.
perceived-type specifies the broad category of file types (e.g., text, image, audio) this file type falls into.
<description>
A (localized) description of the file type.

See: Verbs, Icons

URL protocols

An application's ability to handle certain URL protocols/schemas such as HTTP.

<url-protocol id='...' explicit-only='true' ?>
  <known-prefix value='...'/> *
  <description xml:lang='...' ?>...</description> *
  [verb] *
  [icon] *
</url-protocol>
id
If you are registering an application-specific URL protocols (e.g., myapp:...) this value must be the schema name (e.g., myapp).
If you are registering support for a well-known protocol such as HTTP, this value instead is just a unique identifier within the feed. The schema is instead specified using <known-prefix> (see below).
explicit-only
When set to true the app is not set as the default handler for this URL protocol without explicit confirmation from the user.
<known-prefix>
Names a well-known protocol such as http or ftp. Not for application-specific protocols!
<description>
A (localized) description of the URL protocol.

See: Verbs, Icons

Context menu entries

Entries in the file manager's context menu for all file types.

<context-menu id='...' target='...' ? explicit-only='true' ?>
  [verb] *
</context-menu>
id
An ID that uniquely identifies this context menu entry within the feed.
Also serves as a programmatic identifier within the desktop environment. In case of conflicts, the first context menu entry listed with a specific ID will take precedence.
target
Controls whether the context menu entry is display for all files (files), only executable files (executable-files), all directories (directories) or all filesystem objects (all). Defaults to files if not set.
explicit-only
When set to true this context menu entry is not added without explicit confirmation from the user.

See: Verbs

AutoPlay handlers

An application's ability to handle AutoPlay events.

<auto-play id='...' provider='...' ?>
  <event name='...'/> *
  <description xml:lang='...' ?>...</description> *
  [verb] *
  [icon] *
</auto-play>
id
An ID that uniquely identifies this AutoPlay handler within the feed.
Also serves as a programmatic identifier within the desktop environment. In case of conflicts, the first AutoPlay handler listed with a specific ID will take precedence.
provider
The name of the application as shown in the AutoPlay selection list.
<event>
A specific AutPlay event. Well-known values on Windows are: PlayCDAudioOnArrival, PlayDVDAudioOnArrival, PlayMusicFilesOnArrival, PlayVideoCDMovieOnArrival, PlaySuperVideoCDMovieOnArrival, PlayDVDMovieOnArrival, PlayBluRayOnArrival, PlayVideoFilesOnArrival, HandleCDBurningOnArrival, HandleDVDBurningOnArrival, HandleBDBurningOnArrival
<description>
A (localized) description of the AutoPlay handler.

See: Verbs, Icons

Default programs

Ability to act as default programs for well-known services such web-browser or e-mail client.

<default-program id='...' service='...' explicit-only='true' ? />
id
An ID that uniquely identifies this default program registration within the feed.
Also serves as a programmatic identifier within the desktop environment. In case of conflicts, the first default program registration listed with a specific ID will take precedence.
service
The name of the service the application provides. Well-known values on Windows are: Mail, Media, IM, JVM, Calender, Contacts, Internet Call
explicit-only
When set to true the app is not registered as a default program without explicit confirmation from the user.

Verbs

Some capabilities require you to map verbs/actions to specific commands in the feed.

<verb name='...' command='...' ? args='...' extended='true' ?>
  <description xml:lang='...' ?>...</description> *
</verb>
name
The name of the verb. Use canonical names (open, opennew, edit, play, print, Preview) to get automatic localization; specify <description>s otherwise.
command
The name of the command to use when launching via this capability. Defaults to run if not set.
args
A custom arguments list to be passed to the command. %1 will be replaced with the path of the file being opened.
extended
Set this to true to hide the verb in the Windows context menu unless the Shift key is pressed when opening the menu.
<description>
A (localized) description of the verb.

Icons

Some capabilities allow you to specify an icon.

<icon xmlns='http://zero-install.sourceforge.net/2004/injector/interface' type='...' href='...' ?/>

Note: Since <icon> is defined by the regular feed format, you need to explicitly specify the XML namespace as shown above, when placing <icon>s within capabilities.

type
The MIME type of the icon. Should be image/vnd.microsoft.icon (.ico) for Windows.
href
The URL where the icon can be downloaded.

Further reading