Editing Documentation/Maemo 5 Developer Guide/Application Development/MIME type mapping

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:
-
MIME types mapping specifies for the platform which application should handle a given MIME type. A mapping has to be defined in the desktop file of the application by adding to it the MimeType field. [[Desktop file format|Desktop files]] are found in <code>$prefix/share/applications</code>. Each application has a desktop file, that specifies how it is started, what name it has, etc. It also specifies which MIME types the application can handle, if any.
+
MIME types mapping specifies for the platform which application should handle a given MIME type. A mapping has to be defined in the desktop file of the application by adding to it the MimeType field. Desktop files are found in <code>$prefix/share/applications</code>. Each application has a desktop file, that specifies how it is started, what name it has, etc. It also specifies which MIME types the application can handle, if any.
An [https://vcs.maemo.org/svn/maemoexamples/tags/maemo_5.0/maemo-examples/example_libosso.desktop example_libosso.desktop] file for the application looks like the following:
An [https://vcs.maemo.org/svn/maemoexamples/tags/maemo_5.0/maemo-examples/example_libosso.desktop example_libosso.desktop] file for the application looks like the following:
Line 66: Line 66:
<ol>
<ol>
<li>
<li>
-
Copy the mime-information XML under <code>/usr/share/mime/packages</code>:  
+
Copy the mime-information XML under /usr/share/mime/packages:  
<pre>
<pre>
[sbox-FREMANTLE_X86: ~] > cp example-mime.xml /usr/share/mime/packages
[sbox-FREMANTLE_X86: ~] > cp example-mime.xml /usr/share/mime/packages
Line 157: Line 157:
When the <code>hildon_mime_open_*</code> API is called with a URI, GnomeVFS is used to get the MIME type. Then the list of applications that can handle that type is listed, and the default one is used. If there is no default, the first one from the list is used.
When the <code>hildon_mime_open_*</code> API is called with a URI, GnomeVFS is used to get the MIME type. Then the list of applications that can handle that type is listed, and the default one is used. If there is no default, the first one from the list is used.
-
Then a D-Bus message is sent to activate the service specified by the '<code>X-Osso-Service</code>' value for the found applications's desktop file, and the URI is passed to it for opening.
+
Then a DBus message is sent to activate the service specified by the 'X-Osso-Service' value for the found applications's desktop file, and the URI is passed to it for opening.
[[Category:Development]]
[[Category:Development]]
[[Category:Documentation]]
[[Category:Documentation]]
[[Category:Fremantle]]
[[Category:Fremantle]]

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)