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