[gssdp] client: Remove deprecated parameters



commit 6062f7ab69ed68f17b5ff344bd95902745227cea
Author: Jens Georg <mail jensge org>
Date:   Tue Oct 11 21:16:19 2016 +0200

    client: Remove deprecated parameters
    
    Signed-off-by: Jens Georg <mail jensge org>

 examples/test-browser.c |    5 +----
 examples/test-publish.c |    5 +----
 libgssdp/gssdp-client.c |   26 +-------------------------
 libgssdp/gssdp-client.h |    8 +-------
 tests/test-util.c       |    6 +++---
 5 files changed, 7 insertions(+), 43 deletions(-)
---
diff --git a/examples/test-browser.c b/examples/test-browser.c
index 91feaca..609a7e2 100644
--- a/examples/test-browser.c
+++ b/examples/test-browser.c
@@ -61,10 +61,7 @@ main (G_GNUC_UNUSED int    argc,
 #endif
 
         error = NULL;
-        client = g_initable_new (GSSDP_TYPE_CLIENT,
-                                 NULL,
-                                 &error,
-                                 NULL);
+        client = gssdp_client_new (NULL, &error);
         if (error) {
                 g_printerr ("Error creating the GSSDP client: %s\n",
                             error->message);
diff --git a/examples/test-publish.c b/examples/test-publish.c
index e77ca4c..79d735b 100644
--- a/examples/test-publish.c
+++ b/examples/test-publish.c
@@ -37,10 +37,7 @@ main (G_GNUC_UNUSED int    argc,
 #endif
 
         error = NULL;
-        client = g_initable_new (GSSDP_TYPE_CLIENT,
-                                 NULL,
-                                 &error,
-                                 NULL);
+        client = gssdp_client_new (NULL, &error);
         if (error) {
                 g_printerr ("Error creating the GSSDP client: %s\n",
                             error->message);
diff --git a/libgssdp/gssdp-client.c b/libgssdp/gssdp-client.c
index d14b310..d406c3e 100644
--- a/libgssdp/gssdp-client.c
+++ b/libgssdp/gssdp-client.c
@@ -645,23 +645,14 @@ gssdp_client_class_init (GSSDPClientClass *klass)
 
 /**
  * gssdp_client_new:
- * @main_context: (allow-none): Deprecated: 0.11.2: Always set to NULL. If you want to
- *                specify a context use g_main_context_push_thread_default()
  * @iface: (allow-none): The name of the network interface, or %NULL for auto-detection.
  * @error: Location to store error, or NULL
  *
  * Return value: A new #GSSDPClient object.
  **/
 GSSDPClient *
-gssdp_client_new (GMainContext *main_context,
-                  const char   *iface,
-                  GError      **error)
+gssdp_client_new (const char *iface, GError **error)
 {
-        if (main_context) {
-                g_warning ("GSSDPClient:main-context is deprecated."
-                           " Please use g_main_context_push_thread_default()");
-        }
-
         return g_initable_new (GSSDP_TYPE_CLIENT,
                                NULL,
                                error,
@@ -692,21 +683,6 @@ gssdp_client_new_with_port (const char *iface,
                                NULL);
 }
 
-/*
- * gssdp_client_get_main_context: (skip)
- * @client: A #GSSDPClient
- *
- * Returns: (transfer none): The #GMainContext @client is associated with, or %NULL.
- * Deprecated: 0.11.2: Returns g_main_context_get_thread_default()
- **/
-GMainContext *
-gssdp_client_get_main_context (GSSDPClient *client)
-{
-        g_return_val_if_fail (GSSDP_IS_CLIENT (client), NULL);
-
-        return g_main_context_get_thread_default ();
-}
-
 /**
  * gssdp_client_set_server_id:
  * @client: A #GSSDPClient
diff --git a/libgssdp/gssdp-client.h b/libgssdp/gssdp-client.h
index 940a2b8..c460a20 100644
--- a/libgssdp/gssdp-client.h
+++ b/libgssdp/gssdp-client.h
@@ -44,8 +44,7 @@ struct _GSSDPClientClass {
 };
 
 GSSDPClient *
-gssdp_client_new              (GMainContext *main_context,
-                               const char   *iface,
+gssdp_client_new              (const char   *iface,
                                GError      **error);
 
 GSSDPClient *
@@ -53,11 +52,6 @@ gssdp_client_new_with_port    (const char *iface,
                                guint16     msearch_port,
                                GError    **error);
 
-#ifndef GSSDP_DISABLE_DEPRECATED
-GMainContext *
-gssdp_client_get_main_context (GSSDPClient  *client);
-#endif
-
 void
 gssdp_client_set_server_id    (GSSDPClient  *client,
                                const char   *server_id);
diff --git a/tests/test-util.c b/tests/test-util.c
index e53546a..e061ad3 100644
--- a/tests/test-util.c
+++ b/tests/test-util.c
@@ -66,14 +66,14 @@ get_client (GError **outer_error)
 
                 g_debug ("Detecting network interface to use for tests...");
 
-                client = gssdp_client_new (NULL, "lo", &error);
+                client = gssdp_client_new ("lo", &error);
                 if (error == NULL) {
                         g_debug ("Using lo");
                         device = g_strdup ("lo");
                         g_object_unref (client);
                 } else {
                         g_clear_error(&error);
-                        client = gssdp_client_new (NULL, "lo0", &error);
+                        client = gssdp_client_new ("lo0", &error);
                         if (error == NULL) {
                                 g_debug ("Using lo0");
                                 device = g_strdup ("lo0");
@@ -85,5 +85,5 @@ get_client (GError **outer_error)
                 g_once_init_leave (&init_guard, 1);
         }
 
-        return gssdp_client_new (NULL, device, outer_error);
+        return gssdp_client_new (device, outer_error);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]