/usr/share/gtk-doc/html/libdmapsharing-3.0/server-internals.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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Libdmapsharing Server Internals</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="ch03.html" title="Libdmapsharing Internals">
<link rel="prev" href="coding-standards.html" title="Libdmapsharing Coding Standards">
<link rel="next" href="client-internals.html" title="Libdmapsharing Client Internals">
<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="coding-standards.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch03.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="client-internals.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="server-internals"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Libdmapsharing Server Internals</span></h2>
<p>Libdmapsharing Server Internals —
Description of libdmapsharing's internal server code
</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="id587730"></a><h2>Libdmapsharing Server Internals</h2>
<p>
I will use DAAPShare to document the libdmapsharing internals. DAAPShare
provides an example appropriate for any implmentation of the
abstract class DMAPShare, including DPAPShare. DAAPShare calls
_dmap_share_server_start() and _dmap_share_publish_start() when an
object is created. The latter function starts a new web server by calling
soup_server_new() and adds callbacks to the SoupServer object to handle
the various paths required by the DMAP specification (/server-info,
/content-codes, /login, etc). These callbacks are implemented in
DAAPShare and provided to the SoupServer object after being wrapped
in adapter functions (note that some callbacks are common to all
DMAP protocols and are implemented in DMAPShare; e.g., the login
callback). The latter function, _dmap_share_publish_start, starts the
mDNS subsystem. It does this by using the mDNS implmentation option
choosen at compile-time (e.g., Avahi, Howl or DNS-SD).
</p>
<p>
The DMAPStructure class is used to build a representation of the data
that makes up a DMAP request or response. The array cc_defs defines all
possible valid entries in a DMAPStructure representation. Likewise,
the numeric content code used by each node is defined by the enum
DMAPContentCode. Both the cc_defs array and the DMAPContentCode enum
must be in the same order. That is, if you add an entry to cc_defs,
then you must add its corresponding content code to DMAPContentCode in
the same order.
</p>
<p>
Assuming DMAPStructure defines all the entries you require, the actual
protocol-specific structures are built in DAAPShare. Note the use of the
function dmap_structure_add(). Often, the data dmap_structure_add()
adds is provided by a DAAPRecord object that exists in a DMAPDb
object (both interfaces are implemented by the application). Eventually,
the DAAPShare provides the DMAPStructure to the SoupServer object using
the _dmap_share_message_set_from_dmap_structure() function.
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|