/usr/share/gtk-doc/html/libaccounts-glib/xml-file-formats.html is in libaccounts-glib-doc 1.23+17.04.20161104-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XML files: libaccounts-glib Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libaccounts-glib Reference Manual">
<link rel="up" href="xml-files.html" title="Part III. libaccounts-glib data files">
<link rel="prev" href="xml-files.html" title="Part III. libaccounts-glib data files">
<link rel="next" href="provider-file-format.html" title="Provider description file format">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="xml-files.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="xml-files.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="provider-file-format.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="xml-file-formats"></a>XML files</h2></div></div></div>
<div class="toc"><dl class="toc">
<dt><span class="section"><a href="xml-file-formats.html#application-file-format">Application manifest file format</a></span></dt>
<dd><dl><dt><span class="section"><a href="xml-file-formats.html#id-1.4.3.2.5">Installation</a></span></dt></dl></dd>
<dt><span class="section"><a href="provider-file-format.html">Provider description file format</a></span></dt>
<dd><dl><dt><span class="section"><a href="provider-file-format.html#id-1.4.3.3.5">Installation</a></span></dt></dl></dd>
<dt><span class="section"><a href="service-file-format.html">Service description file format</a></span></dt>
<dd><dl><dt><span class="section"><a href="service-file-format.html#id-1.4.3.4.5">Installation</a></span></dt></dl></dd>
<dt><span class="section"><a href="service-type-file-format.html">Service type description file format</a></span></dt>
<dd><dl><dt><span class="section"><a href="service-type-file-format.html#id-1.4.3.5.5">Installation</a></span></dt></dl></dd>
<dt><span class="section"><a href="gettext-xml-files.html">Internationalizing XML data files using gettext</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="gettext-xml-files.html#intltool-xml-files">
Using <span class="application">intltool</span> to extract translatable strings
</a></span></dt>
<dt><span class="section"><a href="gettext-xml-files.html#gettext-xml-files-applications">
Using <span class="application">gettext</span> to localize translatable strings
</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="validating-xml-files.html">Validating XML files against the DTDs</a></span></dt>
<dd><dl><dt><span class="section"><a href="validating-xml-files.html#validating-with-xmllint">Using <span class="application">xmllint</span></a></span></dt></dl></dd>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="application-file-format"></a>Application manifest file format</h2></div></div></div>
<p>
Applications using libacounts-glib should supply a manifest: a simple XML file
describing the application and the services that it will use. An example is
shown below:
</p>
<div class="example">
<a name="id-1.4.3.2.3"></a><p class="title"><b>Example 4. Application manifest for a gallery application</b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt"><</span>?xml version<span class="gtkdoc opt">=</span><span class="string">"1.0"</span> encoding<span class="gtkdoc opt">=</span><span class="string">"UTF-8"</span>?<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>application id<span class="gtkdoc opt">=</span><span class="string">"Gallery"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>description<span class="gtkdoc opt">></span>Image gallery<span class="gtkdoc opt"></</span>description<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>desktop<span class="gtkdoc opt">-</span>entry<span class="gtkdoc opt">></span>gallery<span class="gtkdoc opt"></</span>desktop<span class="gtkdoc opt">-</span>entry<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>translations<span class="gtkdoc opt">></span>gallery<span class="gtkdoc opt"></</span>translations<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>services<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>service id<span class="gtkdoc opt">=</span><span class="string">"OtherService"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>description<span class="gtkdoc opt">></span>Publish images on OtherService<span class="gtkdoc opt"></</span>description<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>service<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>services<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>service<span class="gtkdoc opt">-</span>types<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>service<span class="gtkdoc opt">-</span>type id<span class="gtkdoc opt">=</span><span class="string">"sharing"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>description<span class="gtkdoc opt">></span>Share your images with your friends<span class="gtkdoc opt"></</span>description<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>service<span class="gtkdoc opt">-</span>type<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>service<span class="gtkdoc opt">-</span>types<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>application<span class="gtkdoc opt">></span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="example-break"><p>
The example application manifest describes an application called
<code class="literal">Gallery</code>, indicated by the
<code class="sgmltag-attribute">id</code> attribute on the
<code class="sgmltag-element">application</code> element. The
<code class="sgmltag-element">description</code> is a string that
describes the application in general, and is also used for specific services
and service types. The
<code class="sgmltag-element">desktop-entry</code> element is only
required if the basename of the desktop file is different than the basename of
the application manifest, where the basename is the filename excluding any file
extension. The <code class="sgmltag-element">translations</code>
element is used to indicate the gettext translation domain for the
<code class="sgmltag-element">name</code> and
<code class="sgmltag-element">description</code> elements, to be used
by applications when showing those elements in a UI. The
<code class="sgmltag-element">services</code> element contains
individual <code class="sgmltag-element">service</code> elements, with
an <code class="sgmltag-attribute">id</code> attribute that
corresponds to an installed service. Finally, a
<code class="sgmltag-element">service-types</code> element contains
individual <code class="sgmltag-element">service-type</code> elements,
which act in the same way as for services.
</p>
<div class="note"><p>
It is only useful to list services in the manifest if a separate description
is desired for each service, such as if some special features are
supported by the application, beyond those suggested by the general
description and the service type.
</p></div>
<p>
</p>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.4.3.2.5"></a>Installation</h3></div></div></div>
<p>
Application manifest filenames should end in
<code class="filename">.application</code> and be installed to
<code class="filename">${prefix}/share/accounts/applications</code>,
which normally expands to
<code class="filename">/usr/share/accounts/applications</code>. The
path can be queried with <span class="command"><strong>pkg-config</strong></span> by checking the
<code class="varname">applicationfilesdir</code> variable of the libaccounts-glib
pkg-config file, for example:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">pkg<span class="gtkdoc opt">-</span>config <span class="gtkdoc opt">--</span>variable<span class="gtkdoc opt">=</span>applicationfilesdir libaccounts<span class="gtkdoc opt">-</span>glib</pre></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|