Editing URL Handler/API rev2

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
-
This document describes the second revision of the <code>hildon_uri_*</code> API that was added in rev 2. Please see [[URL Handler/API rev1|revision 1 of the API]] for the background and also information about the basic file format used.
+
= Hildon URI API, rev 2 =
 +
 
 +
This document describes the second revision of the hildon_uri_* API that was added in rev 2. Please see rev 1 for the background and also information about the basic file format used.
Make sure to read the desktop entry [http://standards.freedesktop.org/desktop-entry-spec/latest/ specification].
Make sure to read the desktop entry [http://standards.freedesktop.org/desktop-entry-spec/latest/ specification].
-
The utility <code>update-desktop-database</code> from desktop-file-utils is used to handle the new fields that have been added.
+
The utility update-desktop-database from desktop-file-utils is used to handle the new fields that have been added.
== Backwards compatibility ==
== Backwards compatibility ==
-
 
This new version of the framework is still compatible with the older version. This means that the old format for URI action in desktop files can still be used. See the rev1 for information about that.
This new version of the framework is still compatible with the older version. This means that the old format for URI action in desktop files can still be used. See the rev1 for information about that.
The code uses the existance of the new key 'X-Osso-URI-Actions' in the [Desktop Entry] group. If the key is missing, the file is interpreted using the old format, otherwise using the new format. It is an error to mix those two versions of the format in the same file.
The code uses the existance of the new key 'X-Osso-URI-Actions' in the [Desktop Entry] group. If the key is missing, the file is interpreted using the old format, otherwise using the new format. It is an error to mix those two versions of the format in the same file.
 +
== Changes to the format ==
== Changes to the format ==
Line 60: Line 62:
== Default actions ==
== Default actions ==
-
 
+
The uri-default-action.list format as described on the rev-1 fie has been extended as well, but also remains compatible so older files will still work. It now looks like this:
-
The <code>uri-default-action.list</code> format as described on the rev-1 fie has been extended as well, but also remains compatible so older files will still work. It now looks like this:
+
   [X-Osso-URI-Scheme <scheme>]
   [X-Osso-URI-Scheme <scheme>]
Line 95: Line 96:
== Example ==
== Example ==
-
 
Here we have some made up examples, first showing files using the older URI action format, then the new one.
Here we have some made up examples, first showing files using the older URI action format, then the new one.
Line 255: Line 255:
   Name=uri_link_open_link
   Name=uri_link_open_link
   TranslationDomain=osso-uri
   TranslationDomain=osso-uri
 +
:New format browser desktop file (with new "neutral" and "fallback" features):
:New format browser desktop file (with new "neutral" and "fallback" features):
Line 349: Line 350:
==Implementation details==
==Implementation details==
-
 
The schemeinfo.cache file that is a cache for faster lookups, remains unchanged from the old revision. It is used to make scheme->desktop file lookups.
The schemeinfo.cache file that is a cache for faster lookups, remains unchanged from the old revision. It is used to make scheme->desktop file lookups.
[[Category:Development]]
[[Category:Development]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)