1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>gsignond API Reference Manual: GSignondConfig</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="gsignond API Reference Manual">
8 <link rel="up" href="ch02.html" title="GSignond configuration">
9 <link rel="prev" href="ch02.html" title="GSignond configuration">
10 <link rel="next" href="gsignond-General-configuration.html" title="General configuration">
11 <meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
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="10"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18 <a href="#GSignondConfig.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19 <a href="#GSignondConfig.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="gsignond-General-configuration.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26 <div class="refentry">
27 <a name="GSignondConfig"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
30 <h2><span class="refentrytitle"><a name="GSignondConfig.top_of_page"></a>GSignondConfig</span></h2>
31 <p>GSignondConfig — gSSO configuration information</p>
33 <td class="gallery_image" valign="top" align="right"></td>
35 <div class="refsect1">
36 <a name="GSignondConfig.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table width="100%" border="0">
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
44 <td class="function_type">
45 <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="returnvalue">GSignondConfig</span></a> *
47 <td class="function_name">
48 <a class="link" href="GSignondConfig.html#gsignond-config-new" title="gsignond_config_new ()">gsignond_config_new</a> <span class="c_punctuation">()</span>
52 <td class="function_type">
53 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
55 <td class="function_name">
56 <a class="link" href="GSignondConfig.html#gsignond-config-get-integer" title="gsignond_config_get_integer ()">gsignond_config_get_integer</a> <span class="c_punctuation">()</span>
60 <td class="function_type">
61 <span class="returnvalue">void</span>
63 <td class="function_name">
64 <a class="link" href="GSignondConfig.html#gsignond-config-set-integer" title="gsignond_config_set_integer ()">gsignond_config_set_integer</a> <span class="c_punctuation">()</span>
68 <td class="function_type">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
70 <td class="function_name">
71 <a class="link" href="GSignondConfig.html#gsignond-config-get-string" title="gsignond_config_get_string ()">gsignond_config_get_string</a> <span class="c_punctuation">()</span>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
78 <td class="function_name">
79 <a class="link" href="GSignondConfig.html#gsignond-config-set-string" title="gsignond_config_set_string ()">gsignond_config_set_string</a> <span class="c_punctuation">()</span>
85 <div class="refsect1">
86 <a name="GSignondConfig.object-hierarchy"></a><h2>Object Hierarchy</h2>
87 <pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
88 <span class="lineart">╰──</span> GSignondConfig
91 <div class="refsect1">
92 <a name="GSignondConfig.includes"></a><h2>Includes</h2>
93 <pre class="synopsis">#include <gsignond/gsignond-config.h>
96 <div class="refsect1">
97 <a name="GSignondConfig.description"></a><h2>Description</h2>
98 <p><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> holds configuration information as a set of keys and values
99 (integer or strings). The key names are defined in </p>
100 <a class="link" href="gsignond-General-configuration.html" title="General configuration">general config keys</a>,
101 <p>and <a class="link" href="gsignond-DBus-configuration.html" title="DBus configuration">DBus config keys</a>.</p>
102 <p>The configuration is retrieved from the gSSO configuration file. See below
103 for where the file is searched for.</p>
104 <div class="refsect1">
105 <a name="id-1.3.2.6.6"></a><h2>Where the configuration file is searched for</h2>
107 <p>If gSSO has been compiled with --enable-debug, then these locations are used,
108 in decreasing order of priority:</p>
109 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
110 <li class="listitem"><p>GSIGNOND_CONFIG environment variable</p></li>
111 <li class="listitem"><p>g_get_user_config_dir() + "gsignond.conf"</p></li>
112 <li class="listitem"><p>path specified in --sysconfdir configure option ($(sysconfdir))</p></li>
113 <li class="listitem"><p>each of <a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-get-system-config-dirs"><code class="function">g_get_system_config_dirs()</code></a> + "gsignond.conf"</p></li>
115 <p>Otherwise, the config file location is determined at compilation time as
116 $(sysconfdir) + "gsignond.conf"</p>
117 <div class="refsect1">
118 <a name="id-1.3.2.6.10"></a><h2>Example configuration file</h2>
120 <p>See example configuration file here:</p>
121 <a class="ulink" href="http://code.google.com/p/accounts-sso/source/browse/gsignond.conf.in?repo=gsignond" target="_top">
122 http://code.google.com/p/accounts-sso/source/browse/gsignond.conf.in?repo=gsignond</a>
124 <div class="refsect1">
125 <a name="GSignondConfig.functions_details"></a><h2>Functions</h2>
126 <div class="refsect2">
127 <a name="gsignond-config-new"></a><h3>gsignond_config_new ()</h3>
128 <pre class="programlisting"><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="returnvalue">GSignondConfig</span></a> *
129 gsignond_config_new ();</pre>
130 <p>Create a <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> object.</p>
131 <div class="refsect3">
132 <a name="id-1.3.2.7.2.5"></a><h4>Returns</h4>
133 <p> an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a>. gSSO extensions should not use this
134 as they're already provided with a config object when they're created.</p>
139 <div class="refsect2">
140 <a name="gsignond-config-get-integer"></a><h3>gsignond_config_get_integer ()</h3>
141 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
142 gsignond_config_get_integer (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
143 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
144 <p>Get an integer configuration value.</p>
145 <div class="refsect3">
146 <a name="id-1.3.2.7.3.5"></a><h4>Parameters</h4>
147 <div class="informaltable"><table width="100%" border="0">
149 <col width="150px" class="parameters_name">
150 <col class="parameters_description">
151 <col width="200px" class="parameters_annotations">
155 <td class="parameter_name"><p>self</p></td>
156 <td class="parameter_description"><p>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a></p></td>
157 <td class="parameter_annotations"> </td>
160 <td class="parameter_name"><p>key</p></td>
161 <td class="parameter_description"><p>the key name</p></td>
162 <td class="parameter_annotations"> </td>
167 <div class="refsect3">
168 <a name="id-1.3.2.7.3.6"></a><h4>Returns</h4>
169 <p> the value corresponding to the key as an integer. If the key does not
170 exist or cannot be converted to the integer, 0 is returned.</p>
175 <div class="refsect2">
176 <a name="gsignond-config-set-integer"></a><h3>gsignond_config_set_integer ()</h3>
177 <pre class="programlisting"><span class="returnvalue">void</span>
178 gsignond_config_set_integer (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
179 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
180 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> value</code></em>);</pre>
181 <p>Sets the configuration value to the provided integer.</p>
182 <div class="refsect3">
183 <a name="id-1.3.2.7.4.5"></a><h4>Parameters</h4>
184 <div class="informaltable"><table width="100%" border="0">
186 <col width="150px" class="parameters_name">
187 <col class="parameters_description">
188 <col width="200px" class="parameters_annotations">
192 <td class="parameter_name"><p>self</p></td>
193 <td class="parameter_description"><p>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a></p></td>
194 <td class="parameter_annotations"> </td>
197 <td class="parameter_name"><p>key</p></td>
198 <td class="parameter_description"><p>the key name</p></td>
199 <td class="parameter_annotations"> </td>
202 <td class="parameter_name"><p>value</p></td>
203 <td class="parameter_description"><p>the value</p></td>
204 <td class="parameter_annotations"> </td>
211 <div class="refsect2">
212 <a name="gsignond-config-get-string"></a><h3>gsignond_config_get_string ()</h3>
213 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
214 gsignond_config_get_string (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
215 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre>
216 <p>Get a string configuration value.</p>
217 <div class="refsect3">
218 <a name="id-1.3.2.7.5.5"></a><h4>Parameters</h4>
219 <div class="informaltable"><table width="100%" border="0">
221 <col width="150px" class="parameters_name">
222 <col class="parameters_description">
223 <col width="200px" class="parameters_annotations">
227 <td class="parameter_name"><p>self</p></td>
228 <td class="parameter_description"><p>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a></p></td>
229 <td class="parameter_annotations"> </td>
232 <td class="parameter_name"><p>key</p></td>
233 <td class="parameter_description"><p>the key name</p></td>
234 <td class="parameter_annotations"> </td>
239 <div class="refsect3">
240 <a name="id-1.3.2.7.5.6"></a><h4>Returns</h4>
241 <p> the value corresponding to the key as string. If the key does not
242 exist, NULL is returned. </p>
243 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
247 <div class="refsect2">
248 <a name="gsignond-config-set-string"></a><h3>gsignond_config_set_string ()</h3>
249 <pre class="programlisting"><span class="returnvalue">void</span>
250 gsignond_config_set_string (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
251 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>,
252 <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *value</code></em>);</pre>
253 <p>Sets the configuration value to the provided string.</p>
254 <div class="refsect3">
255 <a name="id-1.3.2.7.6.5"></a><h4>Parameters</h4>
256 <div class="informaltable"><table width="100%" border="0">
258 <col width="150px" class="parameters_name">
259 <col class="parameters_description">
260 <col width="200px" class="parameters_annotations">
264 <td class="parameter_name"><p>self</p></td>
265 <td class="parameter_description"><p>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a></p></td>
266 <td class="parameter_annotations"> </td>
269 <td class="parameter_name"><p>key</p></td>
270 <td class="parameter_description"><p>the key name</p></td>
271 <td class="parameter_annotations"> </td>
274 <td class="parameter_name"><p>value</p></td>
275 <td class="parameter_description"><p> the value. </p></td>
276 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
283 <div class="refsect1">
284 <a name="GSignondConfig.other_details"></a><h2>Types and Values</h2>
289 Generated by GTK-Doc V1.20</div>