/usr/share/gtk-doc/html/libepc-1.0/libepc-1.0-EpcShell.html is in libepc-doc 0.4.4-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EpcShell</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Easy Publish and Consume Reference Manual">
<link rel="up" href="internal-api.html" title="Internal API">
<link rel="prev" href="internal-api.html" title="Internal API">
<link rel="next" href="libepc-1.0-EpcTls.html" title="EpcTls">
<meta name="generator" content="GTK-Doc V1.18.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="2">
<tr valign="middle">
<td><a accesskey="p" href="internal-api.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="internal-api.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">Easy Publish and Consume Reference Manual</th>
<td><a accesskey="n" href="libepc-1.0-EpcTls.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libepc-1.0-EpcShell.synopsis" class="shortcut">Top</a>
|
<a href="#libepc-1.0-EpcShell.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libepc-1.0-EpcShell"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libepc-1.0-EpcShell.top_of_page"></a>EpcShell</span></h2>
<p>EpcShell — library management functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libepc-1.0-EpcShell.stability-level"></a><h2>Stability Level</h2>
Private, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="libepc-1.0-EpcShell.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libepc/shell.h>
#define <a class="link" href="libepc-1.0-EpcShell.html#EPC-DEBUG-LEVEL:CAPS" title="EPC_DEBUG_LEVEL()">EPC_DEBUG_LEVEL</a> (level)
<span class="returnvalue">guint</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-get-debug-level" title="epc_shell_get_debug_level ()">epc_shell_get_debug_level</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
struct <a class="link" href="libepc-1.0-EpcShell.html#EpcShellProgressHooks" title="struct EpcShellProgressHooks">EpcShellProgressHooks</a>;
<span class="returnvalue">void</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-begin" title="epc_shell_progress_begin ()">epc_shell_progress_begin</a> (<em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *message</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-end" title="epc_shell_progress_end ()">epc_shell_progress_end</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-update" title="epc_shell_progress_update ()">epc_shell_progress_update</a> (<em class="parameter"><code><span class="type">gdouble</span> percentage</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *message</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-set-progress-hooks" title="epc_shell_set_progress_hooks ()">epc_shell_set_progress_hooks</a> (<em class="parameter"><code>const <a class="link" href="libepc-1.0-EpcShell.html#EpcShellProgressHooks" title="struct EpcShellProgressHooks"><span class="type">EpcShellProgressHooks</span></a> *hooks</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GDestroyNotify</span> destroy_data</code></em>);
#define <a class="link" href="libepc-1.0-EpcShell.html#EPC-AVAHI-ERROR:CAPS" title="EPC_AVAHI_ERROR">EPC_AVAHI_ERROR</a>
<span class="returnvalue">guint</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-watch-avahi-client-state" title="epc_shell_watch_avahi_client_state ()">epc_shell_watch_avahi_client_state</a> (<em class="parameter"><code><span class="type">AvahiClientCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GDestroyNotify</span> destroy_data</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">AvahiEntryGroup</span> * <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-create-avahi-entry-group" title="epc_shell_create_avahi_entry_group ()">epc_shell_create_avahi_entry_group</a> (<em class="parameter"><code><span class="type">AvahiEntryGroupCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);
<span class="returnvalue">AvahiServiceBrowser</span> * <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-create-service-browser" title="epc_shell_create_service_browser ()">epc_shell_create_service_browser</a> (<em class="parameter"><code><span class="type">AvahiIfIndex</span> interface</code></em>,
<em class="parameter"><code><span class="type">AvahiProtocol</span> protocol</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *type</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *domain</code></em>,
<em class="parameter"><code><span class="type">AvahiLookupFlags</span> flags</code></em>,
<em class="parameter"><code><span class="type">AvahiServiceBrowserCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-restart-avahi-client" title="epc_shell_restart_avahi_client ()">epc_shell_restart_avahi_client</a> (<em class="parameter"><code>const <span class="type">gchar</span> *strloc</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-get-host-name" title="epc_shell_get_host_name ()">epc_shell_get_host_name</a> (<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-watch-remove" title="epc_shell_watch_remove ()">epc_shell_watch_remove</a> (<em class="parameter"><code><span class="type">guint</span> id</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libepc-1.0-EpcShell.description"></a><h2>Description</h2>
<p>
The methods of the <span class="type">EpcShell</span> singleton are used to manage library resources.
</p>
</div>
<div class="refsect1">
<a name="libepc-1.0-EpcShell.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="EPC-DEBUG-LEVEL:CAPS"></a><h3>EPC_DEBUG_LEVEL()</h3>
<pre class="programlisting">#define EPC_DEBUG_LEVEL(level) G_UNLIKELY(epc_shell_get_debug_level () >= (level))
</pre>
<p>
Checks if the library's debug level, which can be modified by setting the
<code class="varname">EPC_DEBUG</code> environment variable, is above the value
sepecified by <em class="parameter"><code>level</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
<td>the minimum level to check for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if the library's debug level is above the threshold specified
by <em class="parameter"><code>level</code></em>, and <code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-get-debug-level"></a><h3>epc_shell_get_debug_level ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span> epc_shell_get_debug_level (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Query the library's debug level. The debug level can be modified by setting
the external <code class="varname">EPC_DEBUG</code> environment variable. In most
cases the <a class="link" href="libepc-1.0-EpcShell.html#EPC-DEBUG-LEVEL:CAPS" title="EPC_DEBUG_LEVEL()"><span class="type">EPC_DEBUG_LEVEL</span></a> macro should be used, instead of calling this
checking the return value of this function.
</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>The library's current debugging level.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="EpcShellProgressHooks"></a><h3>struct EpcShellProgressHooks</h3>
<pre class="programlisting">struct EpcShellProgressHooks {
void (*begin) (const gchar *title,
gpointer user_data);
void (*update) (gdouble percentage,
const gchar *message,
gpointer user_data);
void (*end) (gpointer user_data);
};
</pre>
<p>
This table is used by <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-set-progress-hooks" title="epc_shell_set_progress_hooks ()"><span class="type">epc_shell_set_progress_hooks</span></a> to install functions
allowing the library to provide feedback during processing.
</p>
<p>
See also: <a class="link" href="libepc-1.0-progress-window.html#epc-progress-window-install" title="epc_progress_window_install ()"><span class="type">epc_progress_window_install</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="EpcShellProgressHooks.begin"></a>begin</code></em> ()</span></p></td>
<td>the function called by <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-begin" title="epc_shell_progress_begin ()"><span class="type">epc_shell_progress_begin</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="EpcShellProgressHooks.update"></a>update</code></em> ()</span></p></td>
<td>the function called by <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-update" title="epc_shell_progress_update ()"><span class="type">epc_shell_progress_update</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="EpcShellProgressHooks.end"></a>end</code></em> ()</span></p></td>
<td>the function called by <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-end" title="epc_shell_progress_end ()"><span class="type">epc_shell_progress_end</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-progress-begin"></a><h3>epc_shell_progress_begin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> epc_shell_progress_begin (<em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *message</code></em>);</pre>
<p>
Call this function before starting a lengthy operation to allow the
application tp provide some visual feedback during the operation,
and to generally keep its UI responsive.
</p>
<p>
This function calls your <span class="type">"begin"</span> hook with <em class="parameter"><code>title</code></em>
as argument and <span class="type">"update"</span> with <em class="parameter"><code>message</code></em>.
</p>
<p>
See also: <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-set-progress-hooks" title="epc_shell_set_progress_hooks ()"><code class="function">epc_shell_set_progress_hooks()</code></a>, <a class="link" href="libepc-1.0-progress-window.html#epc-progress-window-install" title="epc_progress_window_install ()"><span class="type">epc_progress_window_install</span></a>,
<a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-update" title="epc_shell_progress_update ()"><code class="function">epc_shell_progress_update()</code></a>, <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-end" title="epc_shell_progress_end ()"><span class="type">epc_shell_progress_end</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>title</code></em> :</span></p></td>
<td>the title of the lengthy operation</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>description of the lengthy operation</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-progress-end"></a><h3>epc_shell_progress_end ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> epc_shell_progress_end (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Call this function when your lengthy operation has finished.
</p>
<p>
See also: <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-set-progress-hooks" title="epc_shell_set_progress_hooks ()"><code class="function">epc_shell_set_progress_hooks()</code></a>, <a class="link" href="libepc-1.0-progress-window.html#epc-progress-window-install" title="epc_progress_window_install ()"><span class="type">epc_progress_window_install</span></a>,
<a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-begin" title="epc_shell_progress_begin ()"><code class="function">epc_shell_progress_begin()</code></a>, <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-update" title="epc_shell_progress_update ()"><span class="type">epc_shell_progress_update</span></a>
</p>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-progress-update"></a><h3>epc_shell_progress_update ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> epc_shell_progress_update (<em class="parameter"><code><span class="type">gdouble</span> percentage</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *message</code></em>);</pre>
<p>
Called this function to inform about progress of a lengthy operation.
The progress is expressed as <em class="parameter"><code>percentage</code></em> in the range [0..1], or -1 if the
progress cannot be estimated.
</p>
<p>
See also: <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-set-progress-hooks" title="epc_shell_set_progress_hooks ()"><code class="function">epc_shell_set_progress_hooks()</code></a>, <a class="link" href="libepc-1.0-progress-window.html#epc-progress-window-install" title="epc_progress_window_install ()"><span class="type">epc_progress_window_install</span></a>,
epc_shell_progress_begin, <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-progress-end" title="epc_shell_progress_end ()"><code class="function">epc_shell_progress_end()</code></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>percentage</code></em> :</span></p></td>
<td>current progress of the operation, or -1</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td>
<td>a description of the current progress</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-set-progress-hooks"></a><h3>epc_shell_set_progress_hooks ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> epc_shell_set_progress_hooks (<em class="parameter"><code>const <a class="link" href="libepc-1.0-EpcShell.html#EpcShellProgressHooks" title="struct EpcShellProgressHooks"><span class="type">EpcShellProgressHooks</span></a> *hooks</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GDestroyNotify</span> destroy_data</code></em>);</pre>
<p>
Installs functions which are called during processing, such as generating
server keys. This allows the application to indicate progress and generally
keep its UI responsive. If no progress callbacks are provided,
or when <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is passed for <em class="parameter"><code>hooks</code></em>, progress messages are written to the
console.
</p>
<p>
See also: <span class="type">EpcEntropyProgress</span>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>hooks</code></em> :</span></p></td>
<td>the function table to install, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>custom data which shall be passed to the start hook</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy_data</code></em> :</span></p></td>
<td>function to call on <em class="parameter"><code>user_data</code></em> when the hooks are replaced</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="EPC-AVAHI-ERROR:CAPS"></a><h3>EPC_AVAHI_ERROR</h3>
<pre class="programlisting">#define EPC_AVAHI_ERROR (epc_avahi_error_quark ())
</pre>
<p>
Error domain for <em class="citetitle">Avahi</em> operations. Errors in this
domain will be <em class="citetitle">Avahi</em> error codes. See GError
for information on error domains.
</p>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-watch-avahi-client-state"></a><h3>epc_shell_watch_avahi_client_state ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span> epc_shell_watch_avahi_client_state (<em class="parameter"><code><span class="type">AvahiClientCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GDestroyNotify</span> destroy_data</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Registers a function to watch state changes of the library's <span class="type">AvahiClient</span>.
On success the identifier of the newly created watch is returned. Pass it
to <a class="link" href="libepc-1.0-EpcShell.html#epc-shell-watch-remove" title="epc_shell_watch_remove ()"><code class="function">epc_shell_watch_remove()</code></a> to remove the watch. On failure it returns 0 and
sets <em class="parameter"><code>error</code></em>. The error domain is <a class="link" href="libepc-1.0-EpcShell.html#EPC-AVAHI-ERROR:CAPS" title="EPC_AVAHI_ERROR"><span class="type">EPC_AVAHI_ERROR</span></a>. Possible error codes are
those of the <em class="citetitle">Avahi</em> library.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Usually there is no need in handling the <span class="type">AVAHI_CLIENT_FAILURE</span> state
for <em class="parameter"><code>callback</code></em>, as the callback dispatcher takes care already. This
state is dispatched mostly for notification purposes.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a callback function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>callback</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>destroy_data</code></em> :</span></p></td>
<td>a function for freeing <em class="parameter"><code>user_data</code></em> when removing the watch</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <span class="type">GError</span>, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The identifier of the newly created watch, or 0 on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-create-avahi-entry-group"></a><h3>epc_shell_create_avahi_entry_group ()</h3>
<pre class="programlisting"><span class="returnvalue">AvahiEntryGroup</span> * epc_shell_create_avahi_entry_group (<em class="parameter"><code><span class="type">AvahiEntryGroupCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>
Creates a new <span class="type">AvahiEntryGroup</span> for the library's shared <span class="type">AvahiClient</span>.
On success the newly created <span class="type">AvahiEntryGroup</span> is returned,
and <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> on failure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a callback function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>callback</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly created <span class="type">AvahiEntryGroup</span>, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-create-service-browser"></a><h3>epc_shell_create_service_browser ()</h3>
<pre class="programlisting"><span class="returnvalue">AvahiServiceBrowser</span> * epc_shell_create_service_browser (<em class="parameter"><code><span class="type">AvahiIfIndex</span> interface</code></em>,
<em class="parameter"><code><span class="type">AvahiProtocol</span> protocol</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *type</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *domain</code></em>,
<em class="parameter"><code><span class="type">AvahiLookupFlags</span> flags</code></em>,
<em class="parameter"><code><span class="type">AvahiServiceBrowserCallback</span> callback</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Creates a new <span class="type">AvahiServiceBrowser</span> for the library's shared <span class="type">AvahiClient</span>.
On success the newly created <span class="type">AvahiEntryGroup</span> is returned. On failure
<a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set. The error domain is <a class="link" href="libepc-1.0-EpcShell.html#EPC-AVAHI-ERROR:CAPS" title="EPC_AVAHI_ERROR"><span class="type">EPC_AVAHI_ERROR</span></a>.
Possible error codes are those of the <em class="citetitle">Avahi</em> library.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface</code></em> :</span></p></td>
<td>the index of the network interface to watch</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>protocol</code></em> :</span></p></td>
<td>the protocol of the services to watch</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>the DNS-SD service type to watch</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td>the DNS domain to watch, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags for creating the service browser</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
<td>a callback function</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>data to pass to <em class="parameter"><code>callback</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <span class="type">GError</span>, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly created <span class="type">AvahiServiceBrowser</span>, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-restart-avahi-client"></a><h3>epc_shell_restart_avahi_client ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> epc_shell_restart_avahi_client (<em class="parameter"><code>const <span class="type">gchar</span> *strloc</code></em>);</pre>
<p>
Requests restart of the builtin Avahi client. Use this function to react on
critical failures (like <span class="type">AVAHI_ENTRY_GROUP_FAILURE</span>) reported to your Avahi
callbacks. The <em class="parameter"><code>strloc</code></em> argument is used to prevent endless restart cycles.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Do not call this function to react on <span class="type">AVAHI_CLIENT_FAILURE</span> in a
<span class="type">AvahiClientCallback</span>. The builtin callback dispatcher deals with
that situation.
</p>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>strloc</code></em> :</span></p></td>
<td>code location of the callee (<span class="type">G_STRLOC</span>)</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-get-host-name"></a><h3>epc_shell_get_host_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * epc_shell_get_host_name (<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Retrieves the official host name of this machine. On failure the function
returns <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> and sets <em class="parameter"><code>error</code></em>. The error domain is <a class="link" href="libepc-1.0-EpcShell.html#EPC-AVAHI-ERROR:CAPS" title="EPC_AVAHI_ERROR"><span class="type">EPC_AVAHI_ERROR</span></a>.
Possible error codes are those of the <em class="citetitle">Avahi</em> library.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <span class="type">GError</span>, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The official host name, or <a href="/opt/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a> on error.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="epc-shell-watch-remove"></a><h3>epc_shell_watch_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> epc_shell_watch_remove (<em class="parameter"><code><span class="type">guint</span> id</code></em>);</pre>
<p>
Removes the watching callback identified by <em class="parameter"><code>id</code></em>.
</p>
<p>
See also: <code class="function">epc_shell_watch_avahi_client()</code>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>identifier of an watching callback</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18.1</div>
</body>
</html>
|