1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5 <title>ModestConf</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
7 <link rel="start" href="index.html" title="modest reference manual">
8 <link rel="up" href="modest-core.html" title="modest general">
9 <link rel="prev" href="modest-core.html" title="modest general">
10 <link rel="next" href="ix01.html" title="Index">
11 <meta name="generator" content="GTK-Doc V1.6 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="preface" href="pr01.html" title="Introduction">
14 <link rel="reference" href="rn01.html" title="Object Index">
15 <link rel="reference" href="rn02.html" title="API Reference">
16 <link rel="chapter" href="modest-core.html" title="modest general">
17 <link rel="index" href="ix01.html" title="Index">
19 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
20 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
22 <td><a accesskey="p" href="modest-core.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
23 <td><a accesskey="u" href="modest-core.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
24 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
25 <th width="100%" align="center">modest reference manual</th>
26 <td><a accesskey="n" href="ix01.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
28 <tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
30 <a href="#desc" class="shortcut">Description</a></nobr></td></tr>
32 <div class="refentry" lang="en">
33 <a name="modest-ModestConf"></a><div class="titlepage"></div>
34 <div class="refnamediv"><table width="100%"><tr>
36 <h2><span class="refentrytitle"><a name="top_of_page"></a>ModestConf</span></h2>
37 <p>ModestConf — </p>
39 <td valign="top" align="right"></td>
41 <div class="refsynopsisdiv">
42 <a name="synopsis"></a><h2>Synopsis</h2>
43 <pre class="synopsis">
47 <a href="modest-ModestConf.html#ModestConf">ModestConf</a>;
48 GObject* <a href="modest-ModestConf.html#modest-conf-new">modest_conf_new</a> (void);
49 gchar* <a href="modest-ModestConf.html#modest-conf-get-string">modest_conf_get_string</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
52 int <a href="modest-ModestConf.html#modest-conf-get-int">modest_conf_get_int</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
55 gboolean <a href="modest-ModestConf.html#modest-conf-get-bool">modest_conf_get_bool</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
58 gboolean <a href="modest-ModestConf.html#modest-conf-set-string">modest_conf_set_string</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
62 gboolean <a href="modest-ModestConf.html#modest-conf-set-int">modest_conf_set_int</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
66 gboolean <a href="modest-ModestConf.html#modest-conf-set-bool">modest_conf_set_bool</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
70 GSList* <a href="modest-ModestConf.html#modest-conf-list-subkeys">modest_conf_list_subkeys</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
73 gboolean <a href="modest-ModestConf.html#modest-conf-remove-key">modest_conf_remove_key</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
76 gboolean <a href="modest-ModestConf.html#modest-conf-key-exists">modest_conf_key_exists</a> (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
82 <div class="refsect1" lang="en">
83 <a name="desc"></a><h2>Description</h2>
88 <div class="refsect1" lang="en">
89 <a name="details"></a><h2>Details</h2>
90 <div class="refsect2" lang="en">
91 <a name="id2517677"></a><h3>
92 <a name="ModestConf"></a>ModestConf</h3>
93 <a class="indexterm" name="id2517689"></a><pre class="programlisting">typedef struct {
102 <div class="refsect2" lang="en">
103 <a name="id2517704"></a><h3>
104 <a name="modest-conf-new"></a>modest_conf_new ()</h3>
105 <a class="indexterm" name="id2517717"></a><pre class="programlisting">GObject* modest_conf_new (void);</pre>
107 create a new modest ModestConf object.</p>
111 <div class="variablelist"><table border="0">
112 <col align="left" valign="top">
115 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
116 <td> a new ModestConf instance, or NULL in case
123 <div class="refsect2" lang="en">
124 <a name="id2517755"></a><h3>
125 <a name="modest-conf-get-string"></a>modest_conf_get_string ()</h3>
126 <a class="indexterm" name="id2517771"></a><pre class="programlisting">gchar* modest_conf_get_string (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
130 get a string from the configuration system</p>
134 <div class="variablelist"><table border="0">
135 <col align="left" valign="top">
139 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
140 <td> self a ModestConf instance
145 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
146 <td> the key of the value to retrieve
151 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
152 <td> a GError ptr, or NULL to ignore.
157 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
158 <td> a newly allocated string with the value for the key,
159 or NULL in case of error. <em class="parameter"><code>err</code></em> gives details in case of error
166 <div class="refsect2" lang="en">
167 <a name="id2517884"></a><h3>
168 <a name="modest-conf-get-int"></a>modest_conf_get_int ()</h3>
169 <a class="indexterm" name="id2517897"></a><pre class="programlisting">int modest_conf_get_int (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
173 get an integer from the configuration system</p>
177 <div class="variablelist"><table border="0">
178 <col align="left" valign="top">
182 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
183 <td> self a ModestConf instance
188 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
189 <td> the key of the value to retrieve
194 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
195 <td> a GError ptr, or NULL to ignore.
200 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
201 <td> an integer with the value for the key, or -1 in case of error
202 (of course, -1 can also be returned in non-error cases).
203 <em class="parameter"><code>err</code></em> gives details in case of error
210 <div class="refsect2" lang="en">
211 <a name="id2518008"></a><h3>
212 <a name="modest-conf-get-bool"></a>modest_conf_get_bool ()</h3>
213 <a class="indexterm" name="id2518021"></a><pre class="programlisting">gboolean modest_conf_get_bool (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
217 get a boolean value from the configuration system</p>
221 <div class="variablelist"><table border="0">
222 <col align="left" valign="top">
226 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
227 <td> self a ModestConf instance
232 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
233 <td> the key of the value to retrieve
238 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
239 <td> a GError ptr, or NULL to ignore.
244 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
245 <td> a boolean value with the value for the key, or -1 in case of error
246 (of course, -1 can also be returned in non-error cases).
247 <em class="parameter"><code>err</code></em> gives details in case of error
254 <div class="refsect2" lang="en">
255 <a name="id2518133"></a><h3>
256 <a name="modest-conf-set-string"></a>modest_conf_set_string ()</h3>
257 <a class="indexterm" name="id2518146"></a><pre class="programlisting">gboolean modest_conf_set_string (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
262 store a string value in the configuration system</p>
266 <div class="variablelist"><table border="0">
267 <col align="left" valign="top">
271 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
272 <td> a ModestConf instance
277 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
278 <td> the key of the value to set
283 <span class="term"><em class="parameter"><code>val</code></em> :</span></td>
284 <td> the value to set
289 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
290 <td> a GError ptr, or NULL if not interested.
295 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
296 <td> TRUE if succeeded or FALSE in case of error.
297 <em class="parameter"><code>err</code></em> gives details in case of error
304 <div class="refsect2" lang="en">
305 <a name="id2518279"></a><h3>
306 <a name="modest-conf-set-int"></a>modest_conf_set_int ()</h3>
307 <a class="indexterm" name="id2518292"></a><pre class="programlisting">gboolean modest_conf_set_int (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
312 store an integer value in the configuration system</p>
316 <div class="variablelist"><table border="0">
317 <col align="left" valign="top">
321 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
322 <td> a ModestConf instance
327 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
328 <td> the key of the value to set
333 <span class="term"><em class="parameter"><code>val</code></em> :</span></td>
334 <td> the value to set
339 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
340 <td> a GError ptr, or NULL if not interested.
345 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
346 <td> TRUE if succeeded or FALSE in case of error.
347 <em class="parameter"><code>err</code></em> gives details in case of error
354 <div class="refsect2" lang="en">
355 <a name="id2518423"></a><h3>
356 <a name="modest-conf-set-bool"></a>modest_conf_set_bool ()</h3>
357 <a class="indexterm" name="id2518436"></a><pre class="programlisting">gboolean modest_conf_set_bool (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
362 store a boolean value in the configuration system</p>
366 <div class="variablelist"><table border="0">
367 <col align="left" valign="top">
371 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
372 <td> a ModestConf instance
377 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
378 <td> the key of the value to set
383 <span class="term"><em class="parameter"><code>val</code></em> :</span></td>
384 <td> the value to set
389 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
390 <td> a GError ptr, or NULL if not interested.
395 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
396 <td> TRUE if succeeded or FALSE in case of error.
397 <em class="parameter"><code>err</code></em> gives details in case of error
404 <div class="refsect2" lang="en">
405 <a name="id2518568"></a><h3>
406 <a name="modest-conf-list-subkeys"></a>modest_conf_list_subkeys ()</h3>
407 <a class="indexterm" name="id2518581"></a><pre class="programlisting">GSList* modest_conf_list_subkeys (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
411 list all the subkeys for a given key</p>
415 <div class="variablelist"><table border="0">
416 <col align="left" valign="top">
420 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
421 <td> a ModestConf instance
426 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
427 <td> the key whose subkeys will be listed
432 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
433 <td> a GError ptr, or NULL if not interested.
438 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
439 <td> a newly allocated list or NULL in case of error
440 the returned GSList must be freed by the caller
441 <em class="parameter"><code>err</code></em> gives details in case of error
448 <div class="refsect2" lang="en">
449 <a name="id2518693"></a><h3>
450 <a name="modest-conf-remove-key"></a>modest_conf_remove_key ()</h3>
451 <a class="indexterm" name="id2518706"></a><pre class="programlisting">gboolean modest_conf_remove_key (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
455 attempts to remove <em class="parameter"><code>key</code></em> and all its subkeys</p>
459 <div class="variablelist"><table border="0">
460 <col align="left" valign="top">
464 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
465 <td> a ModestConf instance
470 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
471 <td> the key to remove
476 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
477 <td> a GError ptr, or NULL if not interested.
482 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
483 <td> TRUE if succeeded or FALSE in case of error.
484 <em class="parameter"><code>err</code></em> gives details in case of error
491 <div class="refsect2" lang="en">
492 <a name="id2518823"></a><h3>
493 <a name="modest-conf-key-exists"></a>modest_conf_key_exists ()</h3>
494 <a class="indexterm" name="id2518835"></a><pre class="programlisting">gboolean modest_conf_key_exists (<a href="modest-ModestConf.html#ModestConf">ModestConf</a> *self,
498 checks if the given key exists in the configuration system</p>
502 <div class="variablelist"><table border="0">
503 <col align="left" valign="top">
507 <span class="term"><em class="parameter"><code>self</code></em> :</span></td>
508 <td> a ModestConf instance
513 <span class="term"><em class="parameter"><code>key</code></em> :</span></td>
514 <td> the key to remove
519 <span class="term"><em class="parameter"><code>err</code></em> :</span></td>
520 <td> a GError ptr, or NULL if not interested.
525 <span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
526 <td> TRUE if exists, FALSE otherwise.
527 <em class="parameter"><code>err</code></em> gives details in case of error