UPnP

Artifact [23458efc76]
Login

Artifact 23458efc7614eddb5965028b440839b606a77b06:

Wiki page [Upnp] by schelte 2014-08-27 15:36:57.
D 2014-08-27T15:36:57.925
L Upnp
P 3ca38d9021eb52b7f25f787bf9a3ff3106c68398
U schelte
W 3463
<h1>Modules</h1>

This package contains a number of modules that provide various parts of the functionality needed to perform upnp functions from Tcl.

The package depends on the following external packages:
  *  tcludp
  *  tdom
  *  http
  *  wibble (server side only)

The package provides the following modules:
  *  ssdp
  *  upnp
  *  didl

<h2>ssdp</h2>
The ssdp package provides the low level infrastructure for the discovery step of UPnP networking. It takes care of sending out advertisements, periodically refreshing them, and responding to searches.

The ssdp package creates an ssdp command with the following subcommands:
<dl>
<dt>ssdp agent
<dd>Return a standard user agent string
<dt>ssdp detection <operation> <target> <cmdprefix>
<dd>Specify a cmdprefix to invoke when the specified target is advertised.
<dt>ssdp provide <struct>
<dd>Start advertising the specified device and service structure.
<dt>ssdp remove
<dd>Stop advertising and remove all advertised devices from the network.
<dt>ssdp search <target> 
<dd>Initiate a search for a device or service.
</dl>

<h2>upnp</h2>
The upnp package provides functionality for the higher layers of UPnP networking,

The upnp package creates a upnp command with the following subcommands:
<dl>
<dt>upnp advertise <specfile> ?<base>?
<dd>Advertise devices and services described in the specified specfile.
<dt>upnp discover <target> ?<cmdprefix>?
<dd>Try to locate the specified device or service on the network. Also listen for any future providers of the device or service. When a device or service is located, the control functions advertised by the service or services of the device are created as commands in a unique namespace per device, named after the uuid of the device. When everything has been set up, the command prefix is invoked with the name of the namespace appended as an extra argument.
<dt>upnp revoke
<dd>Revoke all advertised devices and services.
</dl>

<h2>didl</h2>
The didl package provides functionality to facilitate the implementation of some UPnP services that exchange information in a DIDL-Lite XML structure.

The didl package creates a didl command with the following subcommands:
<dl>
<dt>didl build <data>
<dd>Create a DIDL-Lite XML document from the data dict.
<dt>didl parse <doc>
<dd>Parse a DIDL-Lite XML document into a dict.
</dl>


<h1>Demos</h1>

The demos directory contains a few demo programs. These can be executed before the package is installed using the demo script.

<h2>mbrowser</h2>

The mbrowser demo looks for media servers on your network and then allows you to browse the available media. If there are images in a format Tk supports, you can view them by clicking on their name.

The mbrowser demo is designed to use a standard icon set, although it will work without it On linux you can just create a symbolic link called icons to the installed icon set of your liking, for example:
    ln -s /usr/share/icons/oxygen demos/icons

On other platforms you can download an icon set like [http://tango.freedesktop.org/|Tango] and place that in the icons subdirectory under the demos directory.

<h2>mserver</h2>

The mserver demo implements a UPnP media server. It will serve files under demos/mediaserver/library to interested UPnP consumers. Either place your content under this directory, or make demos/mediaserver/library a symbolic to where your content is located.


Z ce4faa71da5969499efa3f69a9cd79a9