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>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">
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>
19 <a href="#GSignondConfig.description" class="shortcut">Description</a>
21 <a href="#GSignondConfig.object-hierarchy" class="shortcut">Object Hierarchy</a>
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>
28 <div class="refentry">
29 <a name="GSignondConfig"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
32 <h2><span class="refentrytitle"><a name="GSignondConfig.top_of_page"></a>GSignondConfig</span></h2>
33 <p>GSignondConfig — gSSO configuration information</p>
35 <td valign="top" align="right"></td>
37 <div class="refsynopsisdiv">
38 <a name="GSignondConfig.synopsis"></a><h2>Synopsis</h2>
39 <pre class="synopsis">
40 #include <gsignond/gsignond-config.h>
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>);
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>
64 <div class="refsect1">
65 <a name="GSignondConfig.description"></a><h2>Description</h2>
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>.
74 The configuration is discovered from these sources, in decreasing order of
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>
87 <div class="refsect1">
88 <a name="idp10159744"></a><h2>Where the configuration file is searched for</h2>
93 If gSSO has been compiled with --enable-debug, then these locations are used,
94 in decreasing order of priority:
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>
104 Otherwise, the config file location is determined at compilation time as
105 $(sysconfdir) + "gsignond/gsignond.conf"
109 <div class="refsect1">
110 <a name="idp13808"></a><h2>Example configuration file</h2>
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>
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>
126 Opaque structure for the object.
130 <div class="refsect2">
131 <a name="GSignondConfigClass"></a><h3>struct GSignondConfigClass</h3>
132 <pre class="programlisting">struct GSignondConfigClass {
136 Opaque structure for the class.
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>
145 Get an integer configuration value.
147 <div class="variablelist"><table border="0">
148 <col align="left" valign="top">
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>
156 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
157 <td>the key name</td>
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>
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>
173 Get a string configuration value.
175 <div class="variablelist"><table border="0">
176 <col align="left" valign="top">
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>
184 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
185 <td>the key name</td>
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>
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>
201 Create a <a class="link" href="GSignondConfig.html" title="GSignondConfig"><span class="type">GSignondConfig</span></a> object.
203 <div class="variablelist"><table border="0">
204 <col align="left" valign="top">
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>
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>
219 Sets the configuration value to the provided integer.
221 <div class="variablelist"><table border="0">
222 <col align="left" valign="top">
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>
230 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
231 <td>the key name</td>
234 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
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>
247 Sets the configuration value to the provided string.
249 <div class="variablelist"><table border="0">
250 <col align="left" valign="top">
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>
258 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
259 <td>the key name</td>
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>
273 Generated by GTK-Doc V1.19.1</div>