This file is indexed.

/usr/share/gtk-doc/html/libtranslate/TranslatePair.html is in libtranslate-dev 0.99-0ubuntu9.

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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>TranslatePair</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="libtranslate Reference Manual"><link rel="up" href="api-reference.html" title="API Reference"><link rel="prev" href="libtranslate-translate-common.html" title="translate-common"><link rel="next" href="TranslateService.html" title="TranslateService"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
        .synopsis, .classsynopsis {
            background: #eeeeee;
            border: solid 1px #aaaaaa;
            padding: 0.5em;
        }
        .programlisting {
            background: #eeeeff;
            border: solid 1px #aaaaff;
            padding: 0.5em;
        }
        .variablelist {
            padding: 4px;
            margin-left: 3em;
        }
        .navigation {
            background: #ffeeee;
            border: solid 1px #ffaaaa;
            margin-top: 0.5em;
            margin-bottom: 0.5em;
        }
        .navigation a {
            color: #770000;
        }
        .navigation a:visited {
            color: #550000;
        }
        .navigation .title {
            font-size: 200%;
        }
      </style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libtranslate-translate-common.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="api-reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">libtranslate Reference Manual</th><td><a accesskey="n" href="TranslateService.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="TranslatePair"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">TranslatePair</span></h2><p>TranslatePair &#8212; language pair object and functions for handling pair lists</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">



struct      <a href="TranslatePair.html#TranslatePair-struct">TranslatePair</a>;
enum        <a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a>;
<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a>* <a href="TranslatePair.html#translate-pair-new">translate_pair_new</a>           (<a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a> flags,
                                             const char *from,
                                             const char *to);
<a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a> <a href="TranslatePair.html#translate-pair-get-flags">translate_pair_get_flags</a> (<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a> *pair);
const char* <a href="TranslatePair.html#translate-pair-get-from">translate_pair_get_from</a>         (<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a> *pair);
const char* <a href="TranslatePair.html#translate-pair-get-to">translate_pair_get_to</a>           (<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a> *pair);
GSList*     <a href="TranslatePair.html#translate-pairs-sort-by-tag">translate_pairs_sort_by_tag</a>     (GSList *pairs);
GSList*     <a href="TranslatePair.html#translate-pairs-sort-by-name">translate_pairs_sort_by_name</a>    (GSList *pairs);
<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a>* <a href="TranslatePair.html#translate-pairs-find">translate_pairs_find</a>         (const GSList *pairs,
                                             const char *from,
                                             const char *to);

</pre></div><div class="refsect1" lang="en"><a name="id2602503"></a><h2>Object Hierarchy</h2><pre class="synopsis">

  GObject
   +----TranslatePair
</pre></div><div class="refsect1" lang="en"><a name="id2602520"></a><h2>Properties</h2><pre class="synopsis">

  "<a href="TranslatePair.html#TranslatePair--flags">flags</a>"                <a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a>   : Read / Write / Construct Only
  "<a href="TranslatePair.html#TranslatePair--from">from</a>"                 gchararray           : Read / Write / Construct Only
  "<a href="TranslatePair.html#TranslatePair--to">to</a>"                   gchararray           : Read / Write / Construct Only
</pre></div><div class="refsect1" lang="en"><a name="id2602568"></a><h2>Description</h2><p>
A <a href="TranslatePair.html" title="TranslatePair"><span class="type">TranslatePair</span></a> object defines the source and destination languages
of a translation, as well as flags specifying the contexts of
application of the pair.
</p><p>
You only need to create pairs if you are implementing a service (see
the <i class="parameter"><tt>get_pairs</tt></i> method of <a href="TranslateService.html#TranslateServiceClass"><span class="type">TranslateServiceClass</span></a>).
</p></div><div class="refsect1" lang="en"><a name="id2602599"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2602604"></a><h3><a name="TranslatePair-struct"></a>struct TranslatePair</h3><a class="indexterm" name="id2602613"></a><pre class="programlisting">struct TranslatePair;</pre><p>
The <a href="TranslatePair.html" title="TranslatePair"><span class="type">TranslatePair</span></a> struct contains private data only, and should be
accessed using the functions below.
</p></div><hr><div class="refsect2" lang="en"><a name="id2602633"></a><h3><a name="TranslatePairFlags"></a>enum TranslatePairFlags</h3><a class="indexterm" name="id2602642"></a><pre class="programlisting">typedef enum
{
  TRANSLATE_PAIR_TEXT		= 1 &lt;&lt; 0,
  TRANSLATE_PAIR_WEB_PAGE	= 1 &lt;&lt; 1
} TranslatePairFlags;
</pre><p>
Specifies the features of a <a href="TranslatePair.html" title="TranslatePair"><span class="type">TranslatePair</span></a> object.
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><tt class="literal">TRANSLATE_PAIR_TEXT</tt></span></td><td>the pair can be used to translate text
</td></tr><tr><td><span class="term"><tt class="literal">TRANSLATE_PAIR_WEB_PAGE</tt></span></td><td>the pair can be used to translate a web page

</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2602696"></a><h3><a name="translate-pair-new"></a>translate_pair_new ()</h3><a class="indexterm" name="id2602705"></a><pre class="programlisting"><a href="TranslatePair.html" title="TranslatePair">TranslatePair</a>* translate_pair_new           (<a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a> flags,
                                             const char *from,
                                             const char *to);</pre><p>
Creates a new language pair.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>flags</tt></i> :</span></td><td> the pair flags.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>from</tt></i> :</span></td><td> the source language RFC 3066 tag.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>to</tt></i> :</span></td><td> the destination language RFC 3066 tag.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new language pair.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2602800"></a><h3><a name="translate-pair-get-flags"></a>translate_pair_get_flags ()</h3><a class="indexterm" name="id2602808"></a><pre class="programlisting"><a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a> translate_pair_get_flags (<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a> *pair);</pre><p>
Gets the flags of <i class="parameter"><tt>pair</tt></i>.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>pair</tt></i> :</span></td><td> a pair.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the pair flags.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2602867"></a><h3><a name="translate-pair-get-from"></a>translate_pair_get_from ()</h3><a class="indexterm" name="id2602875"></a><pre class="programlisting">const char* translate_pair_get_from         (<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a> *pair);</pre><p>
Gets the source language of <i class="parameter"><tt>pair</tt></i>.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>pair</tt></i> :</span></td><td> a pair.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the RFC 3066 tag of the source language of <i class="parameter"><tt>pair</tt></i>.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2603079"></a><h3><a name="translate-pair-get-to"></a>translate_pair_get_to ()</h3><a class="indexterm" name="id2603088"></a><pre class="programlisting">const char* translate_pair_get_to           (<a href="TranslatePair.html" title="TranslatePair">TranslatePair</a> *pair);</pre><p>
Gets the destination language of <i class="parameter"><tt>pair</tt></i>.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>pair</tt></i> :</span></td><td> a pair.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the RFC 3066 tag of the destination language of
<i class="parameter"><tt>pair</tt></i>.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2603156"></a><h3><a name="translate-pairs-sort-by-tag"></a>translate_pairs_sort_by_tag ()</h3><a class="indexterm" name="id2603164"></a><pre class="programlisting">GSList*     translate_pairs_sort_by_tag     (GSList *pairs);</pre><p>
Sorts a pair list by source and destination RFC 3066 tag. Tag
comparisons are performed using <a href="libtranslate-translate-util.html#translate-ascii-strcasecoll"><tt class="function">translate_ascii_strcasecoll()</tt></a>.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>pairs</tt></i> :</span></td><td> a list of <a href="TranslatePair.html" title="TranslatePair"><span class="type">TranslatePair</span></a> objects.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <i class="parameter"><tt>pairs</tt></i> sorted.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2603239"></a><h3><a name="translate-pairs-sort-by-name"></a>translate_pairs_sort_by_name ()</h3><a class="indexterm" name="id2603248"></a><pre class="programlisting">GSList*     translate_pairs_sort_by_name    (GSList *pairs);</pre><p>
Sorts a pair list by source and destination human-readable language
name. Names are obtained using <a href="libtranslate-translate.html#translate-get-language-name"><tt class="function">translate_get_language_name()</tt></a>, and
are compared using <a href="libtranslate-translate-util.html#translate-utf8-strcasecoll"><tt class="function">translate_utf8_strcasecoll()</tt></a>.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>pairs</tt></i> :</span></td><td> a list of <a href="TranslatePair.html" title="TranslatePair"><span class="type">TranslatePair</span></a> objects.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <i class="parameter"><tt>pairs</tt></i> sorted.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2603399"></a><h3><a name="translate-pairs-find"></a>translate_pairs_find ()</h3><a class="indexterm" name="id2603408"></a><pre class="programlisting"><a href="TranslatePair.html" title="TranslatePair">TranslatePair</a>* translate_pairs_find         (const GSList *pairs,
                                             const char *from,
                                             const char *to);</pre><p>
Finds the first pair in <i class="parameter"><tt>pairs</tt></i> whose source and/or destination
language match <i class="parameter"><tt>from</tt></i> and/or <i class="parameter"><tt>to</tt></i>.</p><p>

</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>pairs</tt></i> :</span></td><td> a list of <a href="TranslatePair.html" title="TranslatePair"><span class="type">TranslatePair</span></a> objects.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>from</tt></i> :</span></td><td> a RFC 3066 tag, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>to</tt></i> :</span></td><td> a RFC 3066 tag, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a pair, or <tt class="literal">NULL</tt> if not found. The returned pair
belongs to <i class="parameter"><tt>pairs</tt></i>, its reference count is not incremented.
</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2603548"></a><h2>Properties</h2><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a name="TranslatePair--flags"></a>"<tt class="literal">flags</tt>" (<a href="TranslatePair.html#TranslatePairFlags">TranslatePairFlags</a> : Read / Write / Construct Only)</span></td><td><p>The pair flags.</p></td></tr><tr><td><span class="term"><a name="TranslatePair--from"></a>"<tt class="literal">from</tt>" (gchararray : Read / Write / Construct Only)</span></td><td><p>The source language RFC 3066 tag.</p></td></tr><tr><td><span class="term"><a name="TranslatePair--to"></a>"<tt class="literal">to</tt>" (gchararray : Read / Write / Construct Only)</span></td><td><p>The destination language RFC 3066 tag.</p></td></tr></tbody></table></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libtranslate-translate-common.html"><b>&lt;&lt; translate-common</b></a></td><td align="right"><a accesskey="n" href="TranslateService.html"><b>TranslateService &gt;&gt;</b></a></td></tr></table></body></html>