aboutsummaryrefslogtreecommitdiff
path: root/doc/reference/libcontextprovider/html/libcontextprovider-Context-provider-setup.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference/libcontextprovider/html/libcontextprovider-Context-provider-setup.html')
-rw-r--r--doc/reference/libcontextprovider/html/libcontextprovider-Context-provider-setup.html313
1 files changed, 313 insertions, 0 deletions
diff --git a/doc/reference/libcontextprovider/html/libcontextprovider-Context-provider-setup.html b/doc/reference/libcontextprovider/html/libcontextprovider-Context-provider-setup.html
new file mode 100644
index 00000000..fe07805f
--- /dev/null
+++ b/doc/reference/libcontextprovider/html/libcontextprovider-Context-provider-setup.html
@@ -0,0 +1,313 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Context provider setup</title>
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="libcontextprovider Reference Manual">
+<link rel="up" href="ch01.html" title="ContextKit Context provider C Interface">
+<link rel="prev" href="ch01.html" title="ContextKit Context provider C Interface">
+<link rel="next" href="libcontextprovider-ContextProviderChangeSet.html" title="ContextProviderChangeSet">
+<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
+<link rel="stylesheet" href="style.css" type="text/css">
+<link rel="chapter" href="ch01.html" title="ContextKit Context provider C Interface">
+</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="2">
+<tr valign="middle">
+<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
+<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
+<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
+<th width="100%" align="center">libcontextprovider Reference Manual</th>
+<td><a accesskey="n" href="libcontextprovider-ContextProviderChangeSet.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
+</tr>
+<tr><td colspan="5" class="shortcuts">
+<a href="#libcontextprovider-Context-provider-setup.synopsis" class="shortcut">Top</a>
+  | 
+ <a href="#libcontextprovider-Context-provider-setup.description" class="shortcut">Description</a>
+</td></tr>
+</table>
+<div class="refentry" lang="en">
+<a name="libcontextprovider-Context-provider-setup"></a><div class="titlepage"></div>
+<div class="refnamediv"><table width="100%"><tr>
+<td valign="top">
+<h2><span class="refentrytitle"><a name="libcontextprovider-Context-provider-setup.top_of_page"></a>Context provider setup</span></h2>
+<p>Context provider setup</p>
+</td>
+<td valign="top" align="right"></td>
+</tr></table></div>
+<div class="refsynopsisdiv">
+<a name="libcontextprovider-Context-provider-setup.synopsis"></a><h2>Synopsis</h2>
+<pre class="synopsis">
+void (<a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderGetCallback" title="ContextProviderGetCallback ()">*ContextProviderGetCallback</a>) (<a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys,
+ <a class="link" href="libcontextprovider-ContextProviderChangeSet.html#ContextProviderChangeSet" title="ContextProviderChangeSet">ContextProviderChangeSet</a> *change_set,
+ void *user_data);
+void (<a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderSubscribedCallback" title="ContextProviderSubscribedCallback ()">*ContextProviderSubscribedCallback</a>)
+ (<a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys_subscribed,
+ void *user_data);
+void (<a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderUnsubscribedCallback" title="ContextProviderUnsubscribedCallback ()">*ContextProviderUnsubscribedCallback</a>)
+ (<a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys_unsubscribed,
+ <a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys_remaining,
+ void *user_data);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-init" title="context_provider_init ()">context_provider_init</a> (DBusBusType bus_type,
+ const char *bus_name);
+ContextProviderProvider* <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-install" title="context_provider_install ()">context_provider_install</a> (char **provided_keys,
+ <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderGetCallback" title="ContextProviderGetCallback ()">ContextProviderGetCallback</a> get_cb,
+ void *get_cb_target,
+ <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderSubscribedCallback" title="ContextProviderSubscribedCallback ()">ContextProviderSubscribedCallback</a> subscribed_cb,
+ void *subscribed_cb_target,
+ <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderUnsubscribedCallback" title="ContextProviderUnsubscribedCallback ()">ContextProviderUnsubscribedCallback</a> unsubscribed_cb,
+ void *unsubscribed_cb_target);
+void <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-remove" title="context_provider_remove ()">context_provider_remove</a> (ContextProviderProvider *provider);
+<a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-no-of-subscribers" title="context_provider_no_of_subscribers ()">context_provider_no_of_subscribers</a> (const char *key);
+</pre>
+</div>
+<div class="refsect1" lang="en">
+<a name="libcontextprovider-Context-provider-setup.description"></a><h2>Description</h2>
+<p>
+</p>
+</div>
+<div class="refsect1" lang="en">
+<a name="libcontextprovider-Context-provider-setup.details"></a><h2>Details</h2>
+<div class="refsect2" lang="en">
+<a name="ContextProviderGetCallback"></a><h3>ContextProviderGetCallback ()</h3>
+<pre class="programlisting">void (*ContextProviderGetCallback) (<a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys,
+ <a class="link" href="libcontextprovider-ContextProviderChangeSet.html#ContextProviderChangeSet" title="ContextProviderChangeSet">ContextProviderChangeSet</a> *change_set,
+ void *user_data);</pre>
+<p>
+Type definition for a function that will be called back when key values are needed.
+The keys will only ever be keys that this provider registered as providing.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>keys</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet"><span class="type">ContextProviderStringSet</span></a> of keys for which values have been requested
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>change_set</code></em> :</span></p></td>
+<td> a <span class="type">ContextProvideChangeSet</span> in which to fill in the requested values
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td> the user data passed in <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-install" title="context_provider_install ()"><span class="type">context_provider_install</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="ContextProviderSubscribedCallback"></a><h3>ContextProviderSubscribedCallback ()</h3>
+<pre class="programlisting">void (*ContextProviderSubscribedCallback)
+ (<a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys_subscribed,
+ void *user_data);</pre>
+<p>
+Type definition for a function that will be called back when a key is first subscribed to
+The keys will only ever be keys that this provider registered as providing.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>keys_subscribed</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet"><span class="type">ContextProviderStringSet</span></a> of keys which have been newly subscibed
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td> the user data passed in <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-install" title="context_provider_install ()"><span class="type">context_provider_install</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="ContextProviderUnsubscribedCallback"></a><h3>ContextProviderUnsubscribedCallback ()</h3>
+<pre class="programlisting">void (*ContextProviderUnsubscribedCallback)
+ (<a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys_unsubscribed,
+ <a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet">ContextProviderStringSet</a> *keys_remaining,
+ void *user_data);</pre>
+<p>
+Type definition for a function that will be called back when a key is last unsubscribed from.
+The keys will only ever be keys that this provider registered as providing.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>keys_unsubscribed</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet"><span class="type">ContextProviderStringSet</span></a> of keys that have been newly unsubscribed
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>keys_remaining</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-ContextProviderStringSet.html#ContextProviderStringSet" title="ContextProviderStringSet"><span class="type">ContextProviderStringSet</span></a> of keys provided by this provider that are still
+subscribed to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
+<td> the user data passed in <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-install" title="context_provider_install ()"><span class="type">context_provider_install</span></a>
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="context-provider-init"></a><h3>context_provider_init ()</h3>
+<pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
+>gboolean</a> context_provider_init (DBusBusType bus_type,
+ const char *bus_name);</pre>
+<p>
+Initialise the Context Provider library.
+</p>
+<p>
+This sets up the D-Bus connection and optionally requests a well known bus name.
+It must be called before using any other context provider functionality.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>bus_type</code></em> :</span></p></td>
+<td> which bus to advertise context on
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>bus_name</code></em> :</span></p></td>
+<td> A well-known bus name to register, or NULL if not required.
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> TRUE if successful, FALSE otherwise.
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="context-provider-install"></a><h3>context_provider_install ()</h3>
+<pre class="programlisting">ContextProviderProvider* context_provider_install (char **provided_keys,
+ <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderGetCallback" title="ContextProviderGetCallback ()">ContextProviderGetCallback</a> get_cb,
+ void *get_cb_target,
+ <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderSubscribedCallback" title="ContextProviderSubscribedCallback ()">ContextProviderSubscribedCallback</a> subscribed_cb,
+ void *subscribed_cb_target,
+ <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderUnsubscribedCallback" title="ContextProviderUnsubscribedCallback ()">ContextProviderUnsubscribedCallback</a> unsubscribed_cb,
+ void *unsubscribed_cb_target);</pre>
+<p>
+Install a new service providing context.</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>provided_keys</code></em> :</span></p></td>
+<td> a NULL-terminated array of context key names
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>get_cb</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderGetCallback" title="ContextProviderGetCallback ()"><span class="type">ContextProviderGetCallback</span></a> to be called when values are requested for keys
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>get_cb_target</code></em> :</span></p></td>
+<td> user data to pass to <span class="type">get_cb</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>subscribed_cb</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderSubscribedCallback" title="ContextProviderSubscribedCallback ()"><span class="type">ContextProviderSubscribedCallback</span></a> to be called when a key is first subscribed to
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>subscribed_cb_target</code></em> :</span></p></td>
+<td> user data to pass to <span class="type">subscribed_cb</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>unsubscribed_cb</code></em> :</span></p></td>
+<td> a <a class="link" href="libcontextprovider-Context-provider-setup.html#ContextProviderUnsubscribedCallback" title="ContextProviderUnsubscribedCallback ()"><span class="type">ContextProviderUnsubscribedCallback</span></a> to be called when a key is last unsubscribed from
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>unsubscribed_cb_target</code></em> :</span></p></td>
+<td> user data to pass to <span class="type">unsubscribed_cb</span>
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> a new <span class="type">ContextProvider</span> object
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="context-provider-remove"></a><h3>context_provider_remove ()</h3>
+<pre class="programlisting">void context_provider_remove (ContextProviderProvider *provider);</pre>
+<p>
+Remove and dealloctate resources for a <span class="type">ContextProvider</span> created with <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-install" title="context_provider_install ()"><span class="type">context_provider_install</span></a></p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
+<td> a <span class="type">ContextProvder</span> created with <a class="link" href="libcontextprovider-Context-provider-setup.html#context-provider-install" title="context_provider_install ()"><span class="type">context_provider_install</span></a>.
+</td>
+</tr></tbody>
+</table></div>
+</div>
+<hr>
+<div class="refsect2" lang="en">
+<a name="context-provider-no-of-subscribers"></a><h3>context_provider_no_of_subscribers ()</h3>
+<pre class="programlisting"><a
+href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
+>gint</a> context_provider_no_of_subscribers (const char *key);</pre>
+<p>
+</p>
+<p>
+</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody>
+<tr>
+<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
+<td> the name of a context key
+</td>
+</tr>
+<tr>
+<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
+<td> the current number of subscribers for a given context key
+</td>
+</tr>
+</tbody>
+</table></div>
+</div>
+</div>
+</div>
+<div class="footer">
+<hr>
+ Generated by GTK-Doc V1.11</div>
+</body>
+</html>