Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DLNA-RUI
gupnp
Commits
9c750cad
Commit
9c750cad
authored
Aug 20, 2013
by
Jens Georg
Browse files
doc: Fix service example
parent
97a23542
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/server-tutorial.xml
View file @
9c750cad
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment