summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-08-07 19:14:04 +0200
committerJens Georg <mail@jensge.org>2022-08-07 19:14:04 +0200
commit98da362250dde377939d9d13110e2b5d6a98aee8 (patch)
tree3b397305a3b1832eee9997b08936e790cfb58c2f /examples
parenta585bdffc2581c8d499b8b9890322082a74f2960 (diff)
downloadgupnp-98da362250dde377939d9d13110e2b5d6a98aee8.tar.gz
Context: Add new convenience constructors
Add new constructors that allow to set the new parameters directly, instead of forcing the use of g_object_new
Diffstat (limited to 'examples')
-rw-r--r--examples/get-volume.c6
-rw-r--r--examples/light-client.c5
-rw-r--r--examples/light-server.c2
3 files changed, 10 insertions, 3 deletions
diff --git a/examples/get-volume.c b/examples/get-volume.c
index 0413631..46c5f62 100644
--- a/examples/get-volume.c
+++ b/examples/get-volume.c
@@ -126,7 +126,11 @@ int main(int argc, char *argv[])
GError *error = NULL;
GMainLoop *loop = g_main_loop_new (NULL, FALSE);
- GUPnPContext *context = gupnp_context_new ("wlp3s0", 0, &error);
+ GUPnPContext *context = gupnp_context_new_full ("wlp3s0",
+ NULL,
+ 0,
+ GSSDP_UDA_VERSION_1_0,
+ &error);
if (error != NULL) {
g_error ("%s", error->message);
diff --git a/examples/light-client.c b/examples/light-client.c
index 359bc3e..b3eae95 100644
--- a/examples/light-client.c
+++ b/examples/light-client.c
@@ -160,7 +160,10 @@ main (int argc, char **argv)
}
/* Create the UPnP context */
- context = gupnp_context_new (NULL, 0, &error);
+ context = gupnp_context_new_for_address (NULL,
+ 0,
+ GSSDP_UDA_VERSION_1_0,
+ &error);
if (error) {
g_printerr ("Error creating the GUPnP context: %s\n",
error->message);
diff --git a/examples/light-server.c b/examples/light-server.c
index 246b4d6..88b3e27 100644
--- a/examples/light-server.c
+++ b/examples/light-server.c
@@ -149,7 +149,7 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
}
/* Create the UPnP context */
- context = gupnp_context_new (NULL, 0, &error);
+ context = gupnp_context_new_for_address (NULL, 0, GSSDP_UDA_VERSION_1_0, &error);
if (error) {
g_printerr ("Error creating the GUPnP context: %s\n",
error->message);