[gupnp/wip/ipv6-everywhere: 2/6] ServiceInfo: Add examples to type and id
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp/wip/ipv6-everywhere: 2/6] ServiceInfo: Add examples to type and id
- Date: Sun, 19 Jun 2022 22:11:02 +0000 (UTC)
commit ac82e206718ca030eb6094e7a51c203a1132517d
Author: Jens Georg <mail jensge org>
Date: Sun Jun 19 23:48:08 2022 +0200
ServiceInfo: Add examples to type and id
I always mix up what is what, so just add it to the docs so I don't have
to check the specs each time -.-
libgupnp/gupnp-network-manager.c | 10 ++++++++--
libgupnp/gupnp-service-info.c | 9 ++++++++-
2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/libgupnp/gupnp-network-manager.c b/libgupnp/gupnp-network-manager.c
index 2c192fa..5a7de01 100644
--- a/libgupnp/gupnp-network-manager.c
+++ b/libgupnp/gupnp-network-manager.c
@@ -192,8 +192,14 @@ create_loopback_context (gpointer data)
context = g_initable_new (GUPNP_TYPE_CONTEXT,
NULL,
&error,
- "interface", LOOPBACK_IFACE,
- "port", port,
+ "interface",
+ LOOPBACK_IFACE,
+ "port",
+ port,
+ "address-family",
+ gupnp_context_manager_get_socket_family (
+ GUPNP_CONTEXT_MANAGER (manager)),
+
NULL);
if (error) {
g_warning ("Error creating GUPnP context: %s\n",
diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c
index 4752c3d..bee6c9c 100644
--- a/libgupnp/gupnp-service-info.c
+++ b/libgupnp/gupnp-service-info.c
@@ -418,6 +418,8 @@ gupnp_service_info_get_udn (GUPnPServiceInfo *info)
*
* Get the UPnP service type, or %NULL.
*
+ * Example: `urn:schemas-upnp-org:service:RenderingControl:1`
+ *
* Returns: A constant string.
**/
const char *
@@ -442,7 +444,12 @@ gupnp_service_info_get_service_type (GUPnPServiceInfo *info)
* gupnp_service_info_get_id:
* @info: A #GUPnPServiceInfo
*
- * Get the ID of this service, or %NULL if there is no ID.
+ * Get the serviceID of this service, or %NULL if there is no ID.
+ *
+ * The serviceID should be unique to a device. This makes it possible to provide
+ * the same serviceType multiple times on one device
+ *
+ * Example: `org:serviceId:RenderingControl`
*
* Return value: A string. This string should be freed with g_free() after use.
**/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]