dfe0222196e5789c1f301b4e0b01752f25ae944e
[profile/ivi/gsignond.git] / docs / html / GSignondConfig.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>GSignondConfig</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.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.19.1 (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="10"><tr valign="middle">
16 <td width="100%" align="left">
17 <a href="#" class="shortcut">Top</a>
18                    | 
19                   <a href="#GSignondConfig.description" class="shortcut">Description</a>
20                    | 
21                   <a href="#GSignondConfig.object-hierarchy" class="shortcut">Object Hierarchy</a>
22 </td>
23 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25 <td><a accesskey="p" href="ch02.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26 <td><a accesskey="n" href="gsignond-General-configuration.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27 </tr></table>
28 <div class="refentry">
29 <a name="GSignondConfig"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="GSignondConfig.top_of_page"></a>GSignondConfig</span></h2>
33 <p>GSignondConfig — gSSO configuration information</p>
34 </td>
35 <td valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsynopsisdiv">
38 <a name="GSignondConfig.synopsis"></a><h2>Synopsis</h2>
39 <pre class="synopsis">
40 #include &lt;gsignond/gsignond-config.h&gt;
41
42 struct              <a class="link" href="GSignondConfig.html#GSignondConfig-struct" title="struct GSignondConfig">GSignondConfig</a>;
43 struct              <a class="link" href="GSignondConfig.html#GSignondConfigClass" title="struct GSignondConfigClass">GSignondConfigClass</a>;
44 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="GSignondConfig.html#gsignond-config-get-integer" title="gsignond_config_get_integer ()">gsignond_config_get_integer</a>         (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
45                                                          <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>);
46 const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="GSignondConfig.html#gsignond-config-get-string" title="gsignond_config_get_string ()">gsignond_config_get_string</a>          (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
47                                                          <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>);
48 <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="returnvalue">GSignondConfig</span></a> *    <a class="link" href="GSignondConfig.html#gsignond-config-new" title="gsignond_config_new ()">gsignond_config_new</a>                 ();
49 <span class="returnvalue">void</span>                <a class="link" href="GSignondConfig.html#gsignond-config-set-integer" title="gsignond_config_set_integer ()">gsignond_config_set_integer</a>         (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
50                                                          <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>,
51                                                          <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>);
52 <span class="returnvalue">void</span>                <a class="link" href="GSignondConfig.html#gsignond-config-set-string" title="gsignond_config_set_string ()">gsignond_config_set_string</a>          (<em class="parameter"><code><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> *self</code></em>,
53                                                          <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>,
54                                                          <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>);
55 </pre>
56 </div>
57 <div class="refsect1">
58 <a name="GSignondConfig.object-hierarchy"></a><h2>Object Hierarchy</h2>
59 <pre class="synopsis">
60   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
61    +----GSignondConfig
62 </pre>
63 </div>
64 <div class="refsect1">
65 <a name="GSignondConfig.description"></a><h2>Description</h2>
66 <p>
67 <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> holds configuration information as a set of keys and values
68 (integer or strings). The key names are defined in 
69 <a class="link" href="gsignond-General-configuration.html" title="General configuration">general config keys</a>,
70 <a class="link" href="gsignond-Database-configuration.html" title="Database configuration">database config keys</a>, and
71 <a class="link" href="gsignond-DBus-configuration.html" title="DBus configuration">DBus config keys</a>.
72 </p>
73 <p>
74 The configuration is discovered from these sources, in decreasing order of 
75 priority:
76 </p>
77 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
78 <li class="listitem"><p>environment variables, if gSSO has been compiled with --enable-debug switch.
79 See the specific keys documentation for the variable names.</p></li>
80 <li class="listitem"><p>gSSO configuration file. See below for where the file is searched for.</p></li>
81 <li class="listitem"><p>default values. See the documentation for specific keys for those.</p></li>
82 </ul></div>
83 <p>
84 </p>
85 <p>
86 </p>
87 <div class="refsect1">
88 <a name="idp10159744"></a><h2>Where the configuration file is searched for</h2>
89 </div>
90 <p>
91 </p>
92 <p>
93 If gSSO has been compiled with --enable-debug, then these locations are used,
94 in decreasing order of priority:
95 </p>
96 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
97 <li class="listitem"><p>GSIGNOND_CONFIG environment variable</p></li>
98 <li class="listitem"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-get-user-config-dir"><code class="function">g_get_user_config_dir()</code></a> + "gsignond/gsignond.conf"</p></li>
99 <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/gsignond.conf"</p></li>
100 </ul></div>
101 <p>
102 </p>
103 <p>
104 Otherwise, the config file location is determined at compilation time as 
105 $(sysconfdir) + "gsignond/gsignond.conf"
106 </p>
107 <p>
108 </p>
109 <div class="refsect1">
110 <a name="idp13808"></a><h2>Example configuration file</h2>
111 </div>
112 <p>
113 </p>
114 <p>
115 See example configuration file here:
116 <a class="ulink" href="http://code.google.com/p/accounts-sso/source/browse/gsignond.conf?repo=gsignond" target="_top">
117 http://code.google.com/p/accounts-sso/source/browse/gsignond.conf?repo=gsignond</a>
118 </p>
119 </div>
120 <div class="refsect1">
121 <a name="GSignondConfig.details"></a><h2>Details</h2>
122 <div class="refsect2">
123 <a name="GSignondConfig-struct"></a><h3>struct GSignondConfig</h3>
124 <pre class="programlisting">struct GSignondConfig;</pre>
125 <p>
126 Opaque structure for the object.
127 </p>
128 </div>
129 <hr>
130 <div class="refsect2">
131 <a name="GSignondConfigClass"></a><h3>struct GSignondConfigClass</h3>
132 <pre class="programlisting">struct GSignondConfigClass {
133 };
134 </pre>
135 <p>
136 Opaque structure for the class.
137 </p>
138 </div>
139 <hr>
140 <div class="refsect2">
141 <a name="gsignond-config-get-integer"></a><h3>gsignond_config_get_integer ()</h3>
142 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                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>
145 Get an integer configuration value.
146 </p>
147 <div class="variablelist"><table border="0">
148 <col align="left" valign="top">
149 <tbody>
150 <tr>
151 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
152 <td>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a>
153 </td>
154 </tr>
155 <tr>
156 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
157 <td>the key name</td>
158 </tr>
159 <tr>
160 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
161 <td>the value corresponding to the key as an integer. If the key does not
162 exist or cannot be converted to the integer, 0 is returned.</td>
163 </tr>
164 </tbody>
165 </table></div>
166 </div>
167 <hr>
168 <div class="refsect2">
169 <a name="gsignond-config-get-string"></a><h3>gsignond_config_get_string ()</h3>
170 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       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>,
171                                                          <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>
172 <p>
173 Get a string configuration value.
174 </p>
175 <div class="variablelist"><table border="0">
176 <col align="left" valign="top">
177 <tbody>
178 <tr>
179 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
180 <td>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a>
181 </td>
182 </tr>
183 <tr>
184 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
185 <td>the key name</td>
186 </tr>
187 <tr>
188 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
189 <td>the value corresponding to the key as string. If the key does not
190 exist, NULL is returned. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
191 </td>
192 </tr>
193 </tbody>
194 </table></div>
195 </div>
196 <hr>
197 <div class="refsect2">
198 <a name="gsignond-config-new"></a><h3>gsignond_config_new ()</h3>
199 <pre class="programlisting"><a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="returnvalue">GSignondConfig</span></a> *    gsignond_config_new                 ();</pre>
200 <p>
201 Create a <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> object.
202 </p>
203 <div class="variablelist"><table border="0">
204 <col align="left" valign="top">
205 <tbody><tr>
206 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
207 <td>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a>. gSSO extensions should not use this
208 as they're already provided with a config object when they're created.</td>
209 </tr></tbody>
210 </table></div>
211 </div>
212 <hr>
213 <div class="refsect2">
214 <a name="gsignond-config-set-integer"></a><h3>gsignond_config_set_integer ()</h3>
215 <pre class="programlisting"><span class="returnvalue">void</span>                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>,
216                                                          <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>,
217                                                          <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>
218 <p>
219 Sets the configuration value to the provided integer.
220 </p>
221 <div class="variablelist"><table border="0">
222 <col align="left" valign="top">
223 <tbody>
224 <tr>
225 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
226 <td>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a>
227 </td>
228 </tr>
229 <tr>
230 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
231 <td>the key name</td>
232 </tr>
233 <tr>
234 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
235 <td>the value</td>
236 </tr>
237 </tbody>
238 </table></div>
239 </div>
240 <hr>
241 <div class="refsect2">
242 <a name="gsignond-config-set-string"></a><h3>gsignond_config_set_string ()</h3>
243 <pre class="programlisting"><span class="returnvalue">void</span>                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>,
244                                                          <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>,
245                                                          <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>
246 <p>
247 Sets the configuration value to the provided string.
248 </p>
249 <div class="variablelist"><table border="0">
250 <col align="left" valign="top">
251 <tbody>
252 <tr>
253 <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
254 <td>an instance of <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a>
255 </td>
256 </tr>
257 <tr>
258 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
259 <td>the key name</td>
260 </tr>
261 <tr>
262 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
263 <td>the value. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
264 </td>
265 </tr>
266 </tbody>
267 </table></div>
268 </div>
269 </div>
270 </div>
271 <div class="footer">
272 <hr>
273           Generated by GTK-Doc V1.19.1</div>
274 </body>
275 </html>