Git init
[profile/ivi/liboil.git] / doc / html / liboil-liboildebug.html
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>Debug</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7 <link rel="home" href="index.html" title="Liboil Reference Manual">
8 <link rel="up" href="ch02.html" title="Liboil Unstable API">
9 <link rel="prev" href="liboil-liboilcpu.html" title="CPU">
10 <link rel="next" href="liboil-liboilclass-unstable.html" title="OilFunctionClass">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="ch01.html" title="Liboil Stable API">
14 <link rel="chapter" href="ch02.html" title="Liboil Unstable API">
15 </head>
16 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
17 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
18 <tr valign="middle">
19 <td><a accesskey="p" href="liboil-liboilcpu.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
20 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
22 <th width="100%" align="center">Liboil Reference Manual</th>
23 <td><a accesskey="n" href="liboil-liboilclass-unstable.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24 </tr>
25 <tr><td colspan="5" class="shortcuts">
26 <a href="#liboil-liboildebug.synopsis" class="shortcut">Top</a>
27                  | 
28                 <a href="#liboil-liboildebug.description" class="shortcut">Description</a>
29 </td></tr>
30 </table>
31 <div class="refentry" title="Debug">
32 <a name="liboil-liboildebug"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="liboil-liboildebug.top_of_page"></a>Debug</span></h2>
36 <p>Debug — Printing and formatting debug information</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv" title="Synopsis">
41 <a name="liboil-liboildebug.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">
43 void                (<a class="link" href="liboil-liboildebug.html#OilDebugPrintFunc" title="OilDebugPrintFunc ()">*OilDebugPrintFunc</a>)                (int level,
44                                                          const char *file,
45                                                          const char *func,
46                                                          int line,
47                                                          const char *format,
48                                                          va_list varargs);
49 enum                <a class="link" href="liboil-liboildebug.html#OilDebugLevel" title="enum OilDebugLevel">OilDebugLevel</a>;
50 void                <a class="link" href="liboil-liboildebug.html#oil-debug-set-print-function" title="oil_debug_set_print_function ()">oil_debug_set_print_function</a>        (<a class="link" href="liboil-liboildebug.html#OilDebugPrintFunc" title="OilDebugPrintFunc ()">OilDebugPrintFunc</a> func);
51 int                 <a class="link" href="liboil-liboildebug.html#oil-debug-get-level" title="oil_debug_get_level ()">oil_debug_get_level</a>                 (void);
52 void                <a class="link" href="liboil-liboildebug.html#oil-debug-set-level" title="oil_debug_set_level ()">oil_debug_set_level</a>                 (int level);
53 #define             <a class="link" href="liboil-liboildebug.html#OIL-ERROR--CAPS" title="OIL_ERROR()">OIL_ERROR</a>                           (...)
54 #define             <a class="link" href="liboil-liboildebug.html#OIL-WARNING--CAPS" title="OIL_WARNING()">OIL_WARNING</a>                         (...)
55 #define             <a class="link" href="liboil-liboildebug.html#OIL-INFO--CAPS" title="OIL_INFO()">OIL_INFO</a>                            (...)
56 #define             <a class="link" href="liboil-liboildebug.html#OIL-DEBUG--CAPS" title="OIL_DEBUG()">OIL_DEBUG</a>                           (...)
57 #define             <a class="link" href="liboil-liboildebug.html#OIL-LOG--CAPS" title="OIL_LOG()">OIL_LOG</a>                             (...)
58 #define             <a class="link" href="liboil-liboildebug.html#OIL-FUNCTION--CAPS" title="OIL_FUNCTION">OIL_FUNCTION</a>
59 #define             <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()">OIL_DEBUG_PRINT</a>                     (level, ...)
60 </pre>
61 </div>
62 <div class="refsect1" title="Description">
63 <a name="liboil-liboildebug.description"></a><h2>Description</h2>
64 <p>
65 </p>
66 <p>
67 </p>
68 </div>
69 <div class="refsect1" title="Details">
70 <a name="liboil-liboildebug.details"></a><h2>Details</h2>
71 <div class="refsect2" title="OilDebugPrintFunc ()">
72 <a name="OilDebugPrintFunc"></a><h3>OilDebugPrintFunc ()</h3>
73 <pre class="programlisting">void                (*OilDebugPrintFunc)                (int level,
74                                                          const char *file,
75                                                          const char *func,
76                                                          int line,
77                                                          const char *format,
78                                                          va_list varargs);</pre>
79 <p>
80 Typedef describing functions that can be registered using
81 <a class="link" href="liboil-liboildebug.html#oil-debug-set-print-function" title="oil_debug_set_print_function ()"><code class="function">oil_debug_set_print_function()</code></a> so that it is called to
82 print debugging messages.</p>
83 <p>
84 </p>
85 <div class="variablelist"><table border="0">
86 <col align="left" valign="top">
87 <tbody>
88 <tr>
89 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
90 <td> the debug level
91 </td>
92 </tr>
93 <tr>
94 <td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
95 <td> name of the file where the debug message occurs
96 </td>
97 </tr>
98 <tr>
99 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
100 <td> name of the function where the debug message occurs
101 </td>
102 </tr>
103 <tr>
104 <td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
105 <td> line in the file where the debug message occurs
106 </td>
107 </tr>
108 <tr>
109 <td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
110 <td> a printf format
111 </td>
112 </tr>
113 <tr>
114 <td><p><span class="term"><em class="parameter"><code>varargs</code></em> :</span></p></td>
115 <td> varargs for the printf format
116 </td>
117 </tr>
118 </tbody>
119 </table></div>
120 </div>
121 <hr>
122 <div class="refsect2" title="enum OilDebugLevel">
123 <a name="OilDebugLevel"></a><h3>enum OilDebugLevel</h3>
124 <pre class="programlisting">typedef enum {
125   OIL_DEBUG_NONE = 0,
126   OIL_DEBUG_ERROR,
127   OIL_DEBUG_WARNING,
128   OIL_DEBUG_INFO,
129   OIL_DEBUG_DEBUG,
130   OIL_DEBUG_LOG
131 } OilDebugLevel;
132 </pre>
133 <p>
134 Enumeration describing debug levels in Liboil.</p>
135 <p>
136 </p>
137 </div>
138 <hr>
139 <div class="refsect2" title="oil_debug_set_print_function ()">
140 <a name="oil-debug-set-print-function"></a><h3>oil_debug_set_print_function ()</h3>
141 <pre class="programlisting">void                oil_debug_set_print_function        (<a class="link" href="liboil-liboildebug.html#OilDebugPrintFunc" title="OilDebugPrintFunc ()">OilDebugPrintFunc</a> func);</pre>
142 <p>
143 Sets the function to call when outputting debugging information.
144 A value of NULL for <em class="parameter"><code>func</code></em> will restore the default handler,
145 which prints debugging information to stderr.</p>
146 <p>
147 </p>
148 <div class="variablelist"><table border="0">
149 <col align="left" valign="top">
150 <tbody><tr>
151 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
152 <td>
153 </td>
154 </tr></tbody>
155 </table></div>
156 </div>
157 <hr>
158 <div class="refsect2" title="oil_debug_get_level ()">
159 <a name="oil-debug-get-level"></a><h3>oil_debug_get_level ()</h3>
160 <pre class="programlisting">int                 oil_debug_get_level                 (void);</pre>
161 <p>
162 Gets the current debug level.</p>
163 <p>
164 </p>
165 <div class="variablelist"><table border="0">
166 <col align="left" valign="top">
167 <tbody><tr>
168 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
169 <td> the current debug level
170 </td>
171 </tr></tbody>
172 </table></div>
173 </div>
174 <hr>
175 <div class="refsect2" title="oil_debug_set_level ()">
176 <a name="oil-debug-set-level"></a><h3>oil_debug_set_level ()</h3>
177 <pre class="programlisting">void                oil_debug_set_level                 (int level);</pre>
178 <p>
179 Sets the current debug level.</p>
180 <p>
181 </p>
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
184 <tbody><tr>
185 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
186 <td> the new debug level
187 </td>
188 </tr></tbody>
189 </table></div>
190 </div>
191 <hr>
192 <div class="refsect2" title="OIL_ERROR()">
193 <a name="OIL-ERROR--CAPS"></a><h3>OIL_ERROR()</h3>
194 <pre class="programlisting">#define OIL_ERROR(...) OIL_DEBUG_PRINT(OIL_DEBUG_ERROR, __VA_ARGS__)
195 </pre>
196 <p>
197 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_ERROR</span>.</p>
198 <p>
199 </p>
200 <div class="variablelist"><table border="0">
201 <col align="left" valign="top">
202 <tbody><tr>
203 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
204 <td>
205 </td>
206 </tr></tbody>
207 </table></div>
208 </div>
209 <hr>
210 <div class="refsect2" title="OIL_WARNING()">
211 <a name="OIL-WARNING--CAPS"></a><h3>OIL_WARNING()</h3>
212 <pre class="programlisting">#define OIL_WARNING(...) OIL_DEBUG_PRINT(OIL_DEBUG_WARNING, __VA_ARGS__)
213 </pre>
214 <p>
215 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_WARNING</span>.</p>
216 <p>
217 </p>
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
220 <tbody><tr>
221 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
222 <td>
223 </td>
224 </tr></tbody>
225 </table></div>
226 </div>
227 <hr>
228 <div class="refsect2" title="OIL_INFO()">
229 <a name="OIL-INFO--CAPS"></a><h3>OIL_INFO()</h3>
230 <pre class="programlisting">#define OIL_INFO(...) OIL_DEBUG_PRINT(OIL_DEBUG_INFO, __VA_ARGS__)
231 </pre>
232 <p>
233 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_INFO</span>.</p>
234 <p>
235 </p>
236 <div class="variablelist"><table border="0">
237 <col align="left" valign="top">
238 <tbody><tr>
239 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
240 <td>
241 </td>
242 </tr></tbody>
243 </table></div>
244 </div>
245 <hr>
246 <div class="refsect2" title="OIL_DEBUG()">
247 <a name="OIL-DEBUG--CAPS"></a><h3>OIL_DEBUG()</h3>
248 <pre class="programlisting">#define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__)
249 </pre>
250 <p>
251 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_DEBUG</span>.</p>
252 <p>
253 </p>
254 <div class="variablelist"><table border="0">
255 <col align="left" valign="top">
256 <tbody><tr>
257 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
258 <td>
259 </td>
260 </tr></tbody>
261 </table></div>
262 </div>
263 <hr>
264 <div class="refsect2" title="OIL_LOG()">
265 <a name="OIL-LOG--CAPS"></a><h3>OIL_LOG()</h3>
266 <pre class="programlisting">#define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__)
267 </pre>
268 <p>
269 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_LOG</span>.</p>
270 <p>
271 </p>
272 <div class="variablelist"><table border="0">
273 <col align="left" valign="top">
274 <tbody><tr>
275 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
276 <td>
277 </td>
278 </tr></tbody>
279 </table></div>
280 </div>
281 <hr>
282 <div class="refsect2" title="OIL_FUNCTION">
283 <a name="OIL-FUNCTION--CAPS"></a><h3>OIL_FUNCTION</h3>
284 <pre class="programlisting">#define             OIL_FUNCTION</pre>
285 <p>
286 Internal macro that points to __PRETTY_FUNCTION__ or __func__
287 if the former is not available.</p>
288 <p>
289 </p>
290 </div>
291 <hr>
292 <div class="refsect2" title="OIL_DEBUG_PRINT()">
293 <a name="OIL-DEBUG-PRINT--CAPS"></a><h3>OIL_DEBUG_PRINT()</h3>
294 <pre class="programlisting">#define             OIL_DEBUG_PRINT(level, ...)</pre>
295 <p>
296 Macro to call <code class="function">oil_debug_print()</code> with the correct values for
297 the name of the source file, line of source file, and function.</p>
298 <p>
299 </p>
300 <div class="variablelist"><table border="0">
301 <col align="left" valign="top">
302 <tbody>
303 <tr>
304 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
305 <td>
306 </td>
307 </tr>
308 <tr>
309 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
310 <td>
311 </td>
312 </tr>
313 </tbody>
314 </table></div>
315 </div>
316 </div>
317 </div>
318 <div class="footer">
319 <hr>
320           Generated by GTK-Doc V1.11</div>
321 </body>
322 </html>