summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2013-08-20 12:32:55 +0200
committerJens Georg <mail@jensge.org>2013-08-20 12:32:55 +0200
commit9c750cad9535328de23a79f6f9202459efd049ed (patch)
tree05fcff08d418a5e0d94f1e00c3a30f84ae184f92 /doc
parent97a23542a181355025938bd3d6a065a4548fd62e (diff)
downloadgupnp-9c750cad9535328de23a79f6f9202459efd049ed.tar.gz
doc: Fix service example
Diffstat (limited to 'doc')
-rw-r--r--doc/server-tutorial.xml16
1 files changed, 6 insertions, 10 deletions
diff --git a/doc/server-tutorial.xml b/doc/server-tutorial.xml
index 06f1501..8f03295 100644
--- a/doc/server-tutorial.xml
+++ b/doc/server-tutorial.xml
@@ -135,19 +135,15 @@
/* Create the GUPnP context with default host and port */
context = gupnp_context_new (NULL, NULL, 0, NULL);</programlisting>
<para>
- UPnP uses HTTP to provide the device and service description files, so
- next we tell GUPnP to publish them. This is done with
- gupnp_context_host_path() which takes a local filename to send when a
- certain server path is requested.
- </para>
-<programlisting>gupnp_context_host_path (context, "BinaryLight1.xml", "/BinaryLight1.xml");
-gupnp_context_host_path (context, "SwitchPower1.xml", "/SwitchPower1.xml");</programlisting>
- <para>
- Next the root device can be created.
+ Next the root device can be created. The name of the device description
+ file can be passed as an absolute file path or a relative path to the
+ second parameter of gupnp_root_device_new(). The service description
+ files referenced in the device description are expected to be at the path
+ given there as well.
</para>
<programlisting>GUPnPRootDevice *dev;
/* Create the root device object */
-dev = gupnp_root_device_new (context, "/BinaryLight1.xml");
+dev = gupnp_root_device_new (context, "BinaryLight1.xml", ".");
/* Activate the root device, so that it announces itself */
gupnp_root_device_set_available (dev, TRUE);</programlisting>
<para>