This file is indexed.

/usr/share/gtk-doc/html/libdmapsharing-3.0/serviceaddedcb.html is in libdmapsharing-3.0-dev 2.9.14-1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Service Added Callback</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libdmapsharing Reference Manual">
<link rel="up" href="ch02.html" title="Libdmapsharing Browsing Overview">
<link rel="prev" href="browserapi.html" title="mDNS Browser API">
<link rel="next" href="connectedcb.html" title="Connected Callback">
<meta name="generator" content="GTK-Doc V1.18 (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="browserapi.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.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">libdmapsharing Reference Manual</th>
<td><a accesskey="n" href="connectedcb.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="serviceaddedcb"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Service Added Callback</span></h2>
<p>Service Added Callback — 
			Defining a Service Added Callback
		</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="id560785"></a><h2>Service Added Callback</h2>
<p>
A "service-added" callback should create a media DB and a record
factory. Both of these objects will be passed to dmap_connection_new. This
object will interact with a DMAP share and populate the media DB. In
order to instruct the object to begin interrogating the DMAP service,
call the dmap_connection_connect function and pass it a "connected"
callback. The following is a simple "service-added" callback that creates
a DAAP connection:

		</p>
<pre class="screen">
static void
service_added_cb (DMAPMdnsBrowser *browser,
                  DMAPMdnsBrowserService *service,
                  gpointer user_data)
{
	DMAPRecordFactory *factory;
	DMAPConnection *conn;
	DMAPDb *db;

	db = DMAP_DB (my_dmap_db_new ());
	if (db == NULL) {
		g_error ("Error creating DB");
	}

	factory = DMAP_RECORD_FACTORY (my_daap_record_factory_new ());
	if (factory == NULL) {
		g_error ("Error creating record factory");
	}
	conn = DMAP_CONNECTION (dmap_connection_new (service-&gt;name,
						     service-&gt;host,
						     service-&gt;port,
						     FALSE,
						     db,
						     factory));
	dmap_connection_connect (DMAP_CONNECTION (conn),
				(DMAPConnectionCallback) connected_cb,
				 db);
}
		</pre>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>