File: errorcb.xml

package info (click to toggle)
libdmapsharing 3.9.13-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,340 kB
  • sloc: ansic: 17,285; sh: 4,782; xml: 556; makefile: 459
file content (38 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="errorcb">
	<refmeta>
		<refentrytitle>Error Callback</refentrytitle>
		<manvolnum>3</manvolnum>
		<refmiscinfo>Libdmapsharing</refmiscinfo>
	</refmeta>

	<refnamediv>
		<refname>Error Added Callback</refname>
		<refpurpose>
			Defining an Error Callback
		</refpurpose>
	</refnamediv>

	<refsect1>
		<title>Error Callback</title>
		<para>
The "error" callback handles errors which might occur while executing the libdmapsharing
mainloop. The parameters are a DmapConnection, GError, and pointer to user data.

		</para>
		<para>
The following is a simple "error" callback:

		</para>
		<screen>
static void
error_cb(DmapConnection *connection, GError *error, gpointer user_data)
{
	fprintf(stderr, "%s\n", error->message);
}
		</screen>
	</refsect1>
</refentry>