~ubuntu-branches/ubuntu/precise/tumbler/precise

« back to all changes in this revision

Viewing changes to docs/reference/tumbler/html/tumbler-Version-Information-and-Compatibility-Checks.html

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-11-07 16:34:58 UTC
  • Revision ID: james.westby@ubuntu.com-20101107163458-skwfq34vnuavipne
Tags: upstream-0.1.4
Import upstream version 0.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>Version Information and Compatibility Checks</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
7
<link rel="home" href="index.html" title="tumbler Reference Manual">
 
8
<link rel="up" href="miscellaneous.html" title="Part II. Miscellaneous">
 
9
<link rel="prev" href="tumbler-Various-Enumeration-Types.html" title="Various Enumeration Types">
 
10
<link rel="next" href="thumbnails.html" title="Part III. Querying and Generating Thumbnails">
 
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
</head>
 
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
16
<tr valign="middle">
 
17
<td><a accesskey="p" href="tumbler-Various-Enumeration-Types.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
18
<td><a accesskey="u" href="miscellaneous.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
20
<th width="100%" align="center">tumbler Reference Manual</th>
 
21
<td><a accesskey="n" href="thumbnails.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
22
</tr>
 
23
<tr><td colspan="5" class="shortcuts">
 
24
<a href="#tumbler-Version-Information-and-Compatibility-Checks.synopsis" class="shortcut">Top</a>
 
25
                   | 
 
26
                  <a href="#tumbler-Version-Information-and-Compatibility-Checks.description" class="shortcut">Description</a>
 
27
</td></tr>
 
28
</table>
 
29
<div class="refentry" title="Version Information and Compatibility Checks">
 
30
<a name="tumbler-Version-Information-and-Compatibility-Checks"></a><div class="titlepage"></div>
 
31
<div class="refnamediv"><table width="100%"><tr>
 
32
<td valign="top">
 
33
<h2><span class="refentrytitle"><a name="tumbler-Version-Information-and-Compatibility-Checks.top_of_page"></a>Version Information and Compatibility Checks</span></h2>
 
34
<p>Version Information and Compatibility Checks</p>
 
35
</td>
 
36
<td valign="top" align="right"></td>
 
37
</tr></table></div>
 
38
<div class="refsynopsisdiv" title="Synopsis">
 
39
<a name="tumbler-Version-Information-and-Compatibility-Checks.synopsis"></a><h2>Synopsis</h2>
 
40
<pre class="synopsis">
 
41
#include &lt;tumbler/tumbler.h&gt;
 
42
 
 
43
#define             <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-MAJOR-VERSION:CAPS" title="TUMBLER_MAJOR_VERSION">TUMBLER_MAJOR_VERSION</a>
 
44
#define             <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-MINOR-VERSION:CAPS" title="TUMBLER_MINOR_VERSION">TUMBLER_MINOR_VERSION</a>
 
45
#define             <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-MICRO-VERSION:CAPS" title="TUMBLER_MICRO_VERSION">TUMBLER_MICRO_VERSION</a>
 
46
#define             <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-CHECK-VERSION:CAPS" title="TUMBLER_CHECK_VERSION()">TUMBLER_CHECK_VERSION</a>               (major,
 
47
                                                         minor,
 
48
                                                         micro)
 
49
extern              const guint <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#tumbler-major-version" title="tumbler_major_version">tumbler_major_version</a>;
 
50
extern              const guint <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#tumbler-minor-version" title="tumbler_minor_version">tumbler_minor_version</a>;
 
51
extern              const guint <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#tumbler-micro-version" title="tumbler_micro_version">tumbler_micro_version</a>;
 
52
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#tumbler-check-version" title="tumbler_check_version ()">tumbler_check_version</a>               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> required_major</code></em>,
 
53
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> required_minor</code></em>,
 
54
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> required_micro</code></em>);
 
55
#define             <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#G-GNUC-NULL-TERMINATED:CAPS" title="G_GNUC_NULL_TERMINATED">G_GNUC_NULL_TERMINATED</a>
 
56
#define             <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#G-GNUC-WARN-UNUSED-RESULT:CAPS" title="G_GNUC_WARN_UNUSED_RESULT">G_GNUC_WARN_UNUSED_RESULT</a>
 
57
</pre>
 
58
</div>
 
59
<div class="refsect1" title="Description">
 
60
<a name="tumbler-Version-Information-and-Compatibility-Checks.description"></a><h2>Description</h2>
 
61
</div>
 
62
<div class="refsect1" title="Details">
 
63
<a name="tumbler-Version-Information-and-Compatibility-Checks.details"></a><h2>Details</h2>
 
64
<div class="refsect2" title="TUMBLER_MAJOR_VERSION">
 
65
<a name="TUMBLER-MAJOR-VERSION:CAPS"></a><h3>TUMBLER_MAJOR_VERSION</h3>
 
66
<pre class="programlisting">#define TUMBLER_MAJOR_VERSION 0
 
67
</pre>
 
68
<p>
 
69
</p>
 
70
</div>
 
71
<hr>
 
72
<div class="refsect2" title="TUMBLER_MINOR_VERSION">
 
73
<a name="TUMBLER-MINOR-VERSION:CAPS"></a><h3>TUMBLER_MINOR_VERSION</h3>
 
74
<pre class="programlisting">#define TUMBLER_MINOR_VERSION 1
 
75
</pre>
 
76
<p>
 
77
</p>
 
78
</div>
 
79
<hr>
 
80
<div class="refsect2" title="TUMBLER_MICRO_VERSION">
 
81
<a name="TUMBLER-MICRO-VERSION:CAPS"></a><h3>TUMBLER_MICRO_VERSION</h3>
 
82
<pre class="programlisting">#define TUMBLER_MICRO_VERSION 4
 
83
</pre>
 
84
<p>
 
85
</p>
 
86
</div>
 
87
<hr>
 
88
<div class="refsect2" title="TUMBLER_CHECK_VERSION()">
 
89
<a name="TUMBLER-CHECK-VERSION:CAPS"></a><h3>TUMBLER_CHECK_VERSION()</h3>
 
90
<pre class="programlisting">#define             TUMBLER_CHECK_VERSION(major,minor,micro)</pre>
 
91
<p>
 
92
</p>
 
93
<div class="variablelist"><table border="0">
 
94
<col align="left" valign="top">
 
95
<tbody>
 
96
<tr>
 
97
<td><p><span class="term"><em class="parameter"><code>major</code></em> :</span></p></td>
 
98
<td>
 
99
</td>
 
100
</tr>
 
101
<tr>
 
102
<td><p><span class="term"><em class="parameter"><code>minor</code></em> :</span></p></td>
 
103
<td>
 
104
</td>
 
105
</tr>
 
106
<tr>
 
107
<td><p><span class="term"><em class="parameter"><code>micro</code></em> :</span></p></td>
 
108
<td>
 
109
</td>
 
110
</tr>
 
111
</tbody>
 
112
</table></div>
 
113
</div>
 
114
<hr>
 
115
<div class="refsect2" title="tumbler_major_version">
 
116
<a name="tumbler-major-version"></a><h3>tumbler_major_version</h3>
 
117
<pre class="programlisting">extern const guint tumbler_major_version;
 
118
</pre>
 
119
<p>
 
120
</p>
 
121
</div>
 
122
<hr>
 
123
<div class="refsect2" title="tumbler_minor_version">
 
124
<a name="tumbler-minor-version"></a><h3>tumbler_minor_version</h3>
 
125
<pre class="programlisting">extern const guint tumbler_minor_version;
 
126
</pre>
 
127
<p>
 
128
</p>
 
129
</div>
 
130
<hr>
 
131
<div class="refsect2" title="tumbler_micro_version">
 
132
<a name="tumbler-micro-version"></a><h3>tumbler_micro_version</h3>
 
133
<pre class="programlisting">extern const guint tumbler_micro_version;
 
134
</pre>
 
135
<p>
 
136
</p>
 
137
</div>
 
138
<hr>
 
139
<div class="refsect2" title="tumbler_check_version ()">
 
140
<a name="tumbler-check-version"></a><h3>tumbler_check_version ()</h3>
 
141
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       tumbler_check_version               (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> required_major</code></em>,
 
142
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> required_minor</code></em>,
 
143
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> required_micro</code></em>);</pre>
 
144
<p>
 
145
Checks that the <code class="systemitem">tumbler</code> library
 
146
in use is compatible with the given version. Generally you would pass in
 
147
the constants <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-MAJOR-VERSION:CAPS" title="TUMBLER_MAJOR_VERSION"><span class="type">TUMBLER_MAJOR_VERSION</span></a>, <a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-MINOR-VERSION:CAPS" title="TUMBLER_MINOR_VERSION"><span class="type">TUMBLER_MINOR_VERSION</span></a> and 
 
148
<a class="link" href="tumbler-Version-Information-and-Compatibility-Checks.html#TUMBLER-MICRO-VERSION:CAPS" title="TUMBLER_MICRO_VERSION"><span class="type">TUMBLER_MICRO_VERSION</span></a> as the three arguments to this function; that 
 
149
produces a check that the library in use is compatible with the version 
 
150
of <code class="systemitem">tumbler</code> the application was
 
151
compiled against.
 
152
</p>
 
153
<p>
 
154
</p>
 
155
<div class="example">
 
156
<a name="id3064864"></a><p class="title"><b>Example 1. Checking the runtime version of the tumbler library</b></p>
 
157
<div class="example-contents">
 
158
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
159
    <tbody>
 
160
      <tr>
 
161
        <td class="listing_lines" align="right"><pre>1
 
162
2
 
163
3
 
164
4
 
165
5
 
166
6</pre></td>
 
167
        <td class="listing_code"><pre class="programlisting"><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">mismatch</span><span class="symbol">;</span>
 
168
<span class="normal">mismatch </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="tumbler-Version-Information-and-Compatibility-Checks.html#tumbler-check-version">tumbler_check_version</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">TUMBLER_VERSION_MAJOR</span><span class="symbol">,</span>
 
169
<span class="normal">                                  TUMBLER_VERSION_MINOR</span><span class="symbol">,</span>
 
170
<span class="normal">                                  TUMBLER_VERSION_MICRO</span><span class="symbol">);</span>
 
171
<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Miscellaneous-Macros.html#G-UNLIKELY:CAPS">G_UNLIKELY</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">mismatch </span><span class="symbol">!=</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">))</span>
 
172
<span class="normal">  </span><span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Version mismatch: %s"</span><span class="symbol">,</span><span class="normal"> mismatch</span><span class="symbol">);</span></pre></td>
 
173
      </tr>
 
174
    </tbody>
 
175
  </table>
 
176
</div>
 
177
 
 
178
</div>
 
179
<p><br class="example-break">
 
180
</p>
 
181
<div class="variablelist"><table border="0">
 
182
<col align="left" valign="top">
 
183
<tbody>
 
184
<tr>
 
185
<td><p><span class="term"><em class="parameter"><code>required_major</code></em> :</span></p></td>
 
186
<td>the required major version.
 
187
</td>
 
188
</tr>
 
189
<tr>
 
190
<td><p><span class="term"><em class="parameter"><code>required_minor</code></em> :</span></p></td>
 
191
<td>the required minor version.
 
192
</td>
 
193
</tr>
 
194
<tr>
 
195
<td><p><span class="term"><em class="parameter"><code>required_micro</code></em> :</span></p></td>
 
196
<td>the required micro version.
 
197
</td>
 
198
</tr>
 
199
<tr>
 
200
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
201
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the library is compatible with the given version,
 
202
              or a string describing the version mismatch. The returned
 
203
              string is owned by the library and must not be freed or
 
204
              modified by the caller.
 
205
</td>
 
206
</tr>
 
207
</tbody>
 
208
</table></div>
 
209
</div>
 
210
<hr>
 
211
<div class="refsect2" title="G_GNUC_NULL_TERMINATED">
 
212
<a name="G-GNUC-NULL-TERMINATED:CAPS"></a><h3>G_GNUC_NULL_TERMINATED</h3>
 
213
<pre class="programlisting">#define             G_GNUC_NULL_TERMINATED</pre>
 
214
<p>
 
215
</p>
 
216
</div>
 
217
<hr>
 
218
<div class="refsect2" title="G_GNUC_WARN_UNUSED_RESULT">
 
219
<a name="G-GNUC-WARN-UNUSED-RESULT:CAPS"></a><h3>G_GNUC_WARN_UNUSED_RESULT</h3>
 
220
<pre class="programlisting">#define             G_GNUC_WARN_UNUSED_RESULT</pre>
 
221
<p>
 
222
</p>
 
223
</div>
 
224
</div>
 
225
</div>
 
226
<div class="footer">
 
227
<hr>
 
228
          Generated by GTK-Doc V1.14</div>
 
229
</body>
 
230
</html>
 
 
b'\\ No newline at end of file'