[libsoup/pgriffis/remove-property-functions] Remove properties that behave as functions This goes against all convention and isn't binding friend




commit d9bd561c341726d0128db191caba4dbacbe83c2c
Author: Patrick Griffis <pgriffis igalia com>
Date:   Thu Nov 5 15:02:05 2020 -0600

    Remove properties that behave as functions
    This goes against all convention and isn't binding friendly.

 examples/get.c                     |  4 +--
 libsoup/auth/soup-auth-negotiate.c |  2 +-
 libsoup/server/soup-auth-domain.c  | 36 --------------------
 libsoup/server/soup-server.c       | 39 ----------------------
 libsoup/soup-session.c             | 67 +-------------------------------------
 tests/auth-test.c                  |  8 ++---
 tests/cache-test.c                 | 32 ++++++++----------
 tests/continue-test.c              |  2 +-
 tests/hsts-db-test.c               |  5 ++-
 tests/hsts-test.c                  | 10 ++----
 tests/misc-test.c                  |  2 +-
 tests/ntlm-test.c                  | 10 +++---
 tests/proxy-test.c                 |  3 +-
 tests/server-auth-test.c           | 12 +++----
 14 files changed, 40 insertions(+), 192 deletions(-)
---
diff --git a/examples/get.c b/examples/get.c
index 48c35f0a..a03404d9 100644
--- a/examples/get.c
+++ b/examples/get.c
@@ -224,11 +224,11 @@ main (int argc, char **argv)
        soup_uri_free (parsed);
 
        session = g_object_new (SOUP_TYPE_SESSION,
-                               "add-feature-by-type", SOUP_TYPE_CONTENT_DECODER,
-                               "add-feature-by-type", SOUP_TYPE_COOKIE_JAR,
                                "user-agent", "get ",
                                "accept-language-auto", TRUE,
                                NULL);
+        soup_session_add_feature_by_type (session, SOUP_TYPE_CONTENT_DECODER);
+        soup_session_add_feature_by_type (session, SOUP_TYPE_COOKIE_JAR);
        if (ntlm)
                soup_session_add_feature_by_type (session, SOUP_TYPE_AUTH_NTLM);
        if (ca_file)
diff --git a/libsoup/auth/soup-auth-negotiate.c b/libsoup/auth/soup-auth-negotiate.c
index cf2befcf..46bd41bd 100644
--- a/libsoup/auth/soup-auth-negotiate.c
+++ b/libsoup/auth/soup-auth-negotiate.c
@@ -80,7 +80,7 @@ typedef struct {
  *
  * A #GType corresponding to HTTP-based GSS-Negotiate authentication.
  * #SoupSessions do not support this type by default; if you want to
- * enable support for it, call "add-feature-by-type"(),
+ * enable support for it, call soup_session_add_feature_by_type(),
  * passing %SOUP_TYPE_AUTH_NEGOTIATE.
  *
  * This auth type will only work if libsoup was compiled with GSSAPI
diff --git a/libsoup/server/soup-auth-domain.c b/libsoup/server/soup-auth-domain.c
index 1b7da219..3add8df5 100644
--- a/libsoup/server/soup-auth-domain.c
+++ b/libsoup/server/soup-auth-domain.c
@@ -50,8 +50,6 @@ enum {
 
        PROP_REALM,
        PROP_PROXY,
-       PROP_ADD_PATH,
-       PROP_REMOVE_PATH,
        PROP_FILTER,
        PROP_FILTER_DATA,
        PROP_GENERIC_AUTH_CALLBACK,
@@ -116,14 +114,6 @@ soup_auth_domain_set_property (GObject *object, guint prop_id,
        case PROP_PROXY:
                priv->proxy = g_value_get_boolean (value);
                break;
-       case PROP_ADD_PATH:
-               soup_auth_domain_add_path (auth_domain,
-                                          g_value_get_string (value));
-               break;
-       case PROP_REMOVE_PATH:
-               soup_auth_domain_remove_path (auth_domain,
-                                             g_value_get_string (value));
-               break;
        case PROP_FILTER:
                priv->filter = g_value_get_pointer (value);
                break;
@@ -207,32 +197,6 @@ soup_auth_domain_class_init (SoupAuthDomainClass *auth_domain_class)
                                      FALSE,
                                      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
                                      G_PARAM_STATIC_STRINGS));
-       /**
-        * SoupAuthDomain:add-path:
-        *
-        * Shortcut for calling soup_auth_domain_add_path().
-        **/
-       g_object_class_install_property (
-               object_class, PROP_ADD_PATH,
-               g_param_spec_string ("add-path",
-                                    "Add a path",
-                                    "Add a path covered by this auth domain",
-                                    NULL,
-                                    G_PARAM_WRITABLE |
-                                    G_PARAM_STATIC_STRINGS));
-       /**
-        * SoupAuthDomain:remove-path:
-        *
-         * Shortcut for calling soup_auth_domain_remove_path().
-        **/
-       g_object_class_install_property (
-               object_class, PROP_REMOVE_PATH,
-               g_param_spec_string ("remove-path",
-                                    "Remove a path",
-                                    "Remove a path covered by this auth domain",
-                                    NULL,
-                                    G_PARAM_WRITABLE |
-                                    G_PARAM_STATIC_STRINGS));
 
        /**
         * SoupAuthDomain:filter: (type SoupAuthDomainFilter)
diff --git a/libsoup/server/soup-server.c b/libsoup/server/soup-server.c
index 33e4f6ee..40056c5e 100644
--- a/libsoup/server/soup-server.c
+++ b/libsoup/server/soup-server.c
@@ -191,8 +191,6 @@ enum {
        PROP_SERVER_HEADER,
        PROP_HTTP_ALIASES,
        PROP_HTTPS_ALIASES,
-       PROP_ADD_WEBSOCKET_EXTENSION,
-       PROP_REMOVE_WEBSOCKET_EXTENSION,
 
        LAST_PROP
 };
@@ -331,12 +329,6 @@ soup_server_set_property (GObject *object, guint prop_id,
        case PROP_HTTPS_ALIASES:
                set_aliases (&priv->https_aliases, g_value_get_boxed (value));
                break;
-       case PROP_ADD_WEBSOCKET_EXTENSION:
-               soup_server_add_websocket_extension (server, g_value_get_gtype (value));
-               break;
-       case PROP_REMOVE_WEBSOCKET_EXTENSION:
-               soup_server_remove_websocket_extension (server, g_value_get_gtype (value));
-               break;
        default:
                G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                break;
@@ -592,37 +584,6 @@ soup_server_class_init (SoupServerClass *server_class)
                                    "URI schemes that are considered aliases for 'https'",
                                    G_TYPE_STRV,
                                    G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-        /**
-         * SoupServer:add-websocket-extension: (skip)
-         *
-         * Add support for #SoupWebsocketExtension of the given type.
-         * (Shortcut for calling soup_server_add_websocket_extension().)
-         *
-         * Since: 2.68
-         **/
-        g_object_class_install_property (
-                object_class, PROP_ADD_WEBSOCKET_EXTENSION,
-                g_param_spec_gtype ("add-websocket-extension",
-                                    "Add support for a WebSocket extension",
-                                    "Add support for a WebSocket extension of the given type",
-                                    SOUP_TYPE_WEBSOCKET_EXTENSION,
-                                    G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-        /**
-         * SoupServer:remove-websocket-extension: (skip)
-         *
-         * Remove support for #SoupWebsocketExtension of the given type. (Shortcut for
-         * calling soup_server_remove_websocket_extension().)
-         *
-         * Since: 2.68
-         **/
-        g_object_class_install_property (
-                object_class, PROP_REMOVE_WEBSOCKET_EXTENSION,
-                g_param_spec_gtype ("remove-websocket-extension",
-                                    "Remove support for a WebSocket extension",
-                                    "Remove support for a WebSocket extension of the given type",
-                                    SOUP_TYPE_WEBSOCKET_EXTENSION,
-                                    G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
 }
 
 /**
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index d2258ccd..8379cd48 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -186,9 +186,6 @@ enum {
        PROP_ACCEPT_LANGUAGE,
        PROP_ACCEPT_LANGUAGE_AUTO,
        PROP_IDLE_TIMEOUT,
-       PROP_ADD_FEATURE,
-       PROP_ADD_FEATURE_BY_TYPE,
-       PROP_REMOVE_FEATURE_BY_TYPE,
        PROP_HTTP_ALIASES,
        PROP_HTTPS_ALIASES,
        PROP_LOCAL_ADDRESS,
@@ -506,15 +503,6 @@ soup_session_set_property (GObject *object, guint prop_id,
                priv->idle_timeout = g_value_get_uint (value);
                socket_props_changed = TRUE;
                break;
-       case PROP_ADD_FEATURE:
-               soup_session_add_feature (session, g_value_get_object (value));
-               break;
-       case PROP_ADD_FEATURE_BY_TYPE:
-               soup_session_add_feature_by_type (session, g_value_get_gtype (value));
-               break;
-       case PROP_REMOVE_FEATURE_BY_TYPE:
-               soup_session_remove_feature_by_type (session, g_value_get_gtype (value));
-               break;
        case PROP_HTTP_ALIASES:
                set_aliases (&priv->http_aliases, g_value_get_boxed (value));
                break;
@@ -2033,9 +2021,7 @@ soup_session_abort (SoupSession *session)
  * @session: a #SoupSession
  * @feature: an object that implements #SoupSessionFeature
  *
- * Adds @feature's functionality to @session. You can also add a
- * feature to the session at construct time by using the
- * SoupSession:add-feature property.
+ * Adds @feature's functionality to @session.
  *
  * See the main #SoupSession documentation for information on what
  * features are present in sessions by default.
@@ -2070,9 +2056,6 @@ soup_session_add_feature (SoupSession *session, SoupSessionFeature *feature)
  * existing feature on @session the chance to accept @feature_type as
  * a "subfeature". This can be used to add new #SoupAuth types, for instance.
  *
- * You can also add a feature to the session at construct time by
- * using the SoupSession:add-feature-by-type property.
- *
  * See the main #SoupSession documentation for information on what
  * features are present in sessions by default.
  *
@@ -2609,54 +2592,6 @@ soup_session_class_init (SoupSessionClass *session_class)
                                      G_PARAM_READWRITE |
                                      G_PARAM_STATIC_STRINGS));
 
-       /**
-        * SoupSession:add-feature: (skip)
-        *
-        * Add a feature object to the session. (Shortcut for calling
-        * soup_session_add_feature().)
-        *
-        * Since: 2.24
-        **/
-       g_object_class_install_property (
-               object_class, PROP_ADD_FEATURE,
-               g_param_spec_object ("add-feature",
-                                    "Add Feature",
-                                    "Add a feature object to the session",
-                                    SOUP_TYPE_SESSION_FEATURE,
-                                    G_PARAM_READWRITE |
-                                    G_PARAM_STATIC_STRINGS));
-       /**
-        * SoupSession:add-feature-by-type: (skip)
-        *
-        * Add a feature object of the given type to the session.
-        * (Shortcut for calling soup_session_add_feature_by_type().)
-        *
-        * Since: 2.24
-        **/
-       g_object_class_install_property (
-               object_class, PROP_ADD_FEATURE_BY_TYPE,
-               g_param_spec_gtype ("add-feature-by-type",
-                                   "Add Feature By Type",
-                                   "Add a feature object of the given type to the session",
-                                   G_TYPE_OBJECT,
-                                   G_PARAM_READWRITE |
-                                   G_PARAM_STATIC_STRINGS));
-       /**
-        * SoupSession:remove-feature-by-type: (skip)
-        *
-        * Remove feature objects from the session. (Shortcut for
-        * calling soup_session_remove_feature_by_type().)
-        *
-        * Since: 2.24
-        **/
-       g_object_class_install_property (
-               object_class, PROP_REMOVE_FEATURE_BY_TYPE,
-               g_param_spec_gtype ("remove-feature-by-type",
-                                   "Remove Feature By Type",
-                                   "Remove features of the given type from the session",
-                                   G_TYPE_OBJECT,
-                                   G_PARAM_READWRITE |
-                                   G_PARAM_STATIC_STRINGS));
        /**
         * SoupSession:http-aliases:
         *
diff --git a/tests/auth-test.c b/tests/auth-test.c
index 44b94b43..d5e27b23 100644
--- a/tests/auth-test.c
+++ b/tests/auth-test.c
@@ -900,16 +900,16 @@ do_select_auth_test (void)
 
        basic_auth_domain = soup_auth_domain_basic_new (
                "realm", "auth-test",
-               "add-path", "/",
                "auth-callback", server_basic_auth_callback,
                NULL);
+        soup_auth_domain_add_path (basic_auth_domain, "/");
        soup_server_add_auth_domain (server, basic_auth_domain);
 
        digest_auth_domain = soup_auth_domain_digest_new (
                "realm", "auth-test",
-               "add-path", "/",
                "auth-callback", server_digest_auth_callback,
                NULL);
+        soup_auth_domain_add_path (digest_auth_domain, "/");
        soup_server_add_auth_domain (server, digest_auth_domain);
 
        debug_printf (1, "  Testing with no auth\n");
@@ -1051,9 +1051,9 @@ do_auth_close_test (void)
 
        basic_auth_domain = soup_auth_domain_basic_new (
                "realm", "auth-test",
-               "add-path", "/",
                "auth-callback", server_basic_auth_callback,
                NULL);
+        soup_auth_domain_add_path (basic_auth_domain, "/");
        soup_server_add_auth_domain (server, basic_auth_domain);
        g_object_unref (basic_auth_domain);
 
@@ -1178,9 +1178,9 @@ do_disappearing_auth_test (void)
 
        auth_domain = soup_auth_domain_basic_new (
                                                  "realm", "auth-test",
-                                                 "add-path", "/",
                                                  "auth-callback", server_basic_auth_callback,
                                                  NULL);
+        soup_auth_domain_add_path (auth_domain, "/");
        soup_server_add_auth_domain (server, auth_domain);
        g_signal_connect (server, "request-read",
                          G_CALLBACK (disappear_request_read), NULL);
diff --git a/tests/cache-test.c b/tests/cache-test.c
index 6cfadaad..1a5df948 100644
--- a/tests/cache-test.c
+++ b/tests/cache-test.c
@@ -294,9 +294,8 @@ do_basics_test (gconstpointer data)
        cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL);
        debug_printf (2, "  Caching to %s\n", cache_dir);
        cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER);
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature", cache,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
 
        g_signal_connect (session, "request-queued",
                          G_CALLBACK (request_queued), NULL);
@@ -488,9 +487,9 @@ do_cancel_test (gconstpointer data)
        cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL);
        debug_printf (2, "  Caching to %s\n", cache_dir);
        cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER);
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature", cache,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
+
        g_signal_connect (session, "request-unqueued",
                          G_CALLBACK (request_unqueued), NULL);
 
@@ -521,9 +520,9 @@ do_cancel_test (gconstpointer data)
 
        soup_test_session_abort_unref (session);
 
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature", cache,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
+
        g_signal_connect (session, "request-unqueued",
                          G_CALLBACK (request_unqueued), NULL);
 
@@ -582,9 +581,8 @@ do_refcounting_test (gconstpointer data)
        cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL);
        debug_printf (2, "  Caching to %s\n", cache_dir);
        cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER);
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature", cache,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
 
        last_request_validated = last_request_hit_network = FALSE;
        cancelled_requests = 0;
@@ -637,9 +635,8 @@ do_headers_test (gconstpointer data)
        cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL);
        debug_printf (2, "  Caching to %s\n", cache_dir);
        cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER);
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature", cache,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
 
        g_signal_connect (session, "request-queued",
                          G_CALLBACK (request_queued), NULL);
@@ -714,9 +711,8 @@ do_leaks_test (gconstpointer data)
        cache_dir = g_dir_make_tmp ("cache-test-XXXXXX", NULL);
        debug_printf (2, "  Caching to %s\n", cache_dir);
        cache = soup_cache_new (cache_dir, SOUP_CACHE_SINGLE_USER);
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature", cache,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
 
        debug_printf (2, "  Initial requests\n");
        body = do_request (session, base_uri, "GET", "/1", NULL,
diff --git a/tests/continue-test.c b/tests/continue-test.c
index bea725a7..844c1ad4 100644
--- a/tests/continue-test.c
+++ b/tests/continue-test.c
@@ -520,9 +520,9 @@ setup_server (void)
 
        auth_domain = soup_auth_domain_basic_new (
                "realm", "continue-test",
-               "add-path", "/auth",
                "auth-callback", auth_callback,
                NULL);
+        soup_auth_domain_add_path (auth_domain, "/auth");
        soup_server_add_auth_domain (server, auth_domain);
        g_object_unref (auth_domain);
 
diff --git a/tests/hsts-db-test.c b/tests/hsts-db-test.c
index 783f8fe4..f1034867 100644
--- a/tests/hsts-db-test.c
+++ b/tests/hsts-db-test.c
@@ -112,9 +112,8 @@ hsts_db_session_new (void)
 {
        SoupHSTSEnforcer *hsts_db = soup_hsts_enforcer_db_new (DB_FILE);
 
-       SoupSession *session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                                     "add-feature", hsts_db,
-                                                     NULL);
+       SoupSession *session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (hsts_db));
        g_signal_connect (session, "request-queued", G_CALLBACK (on_request_queued), NULL);
        g_object_unref (hsts_db);
 
diff --git a/tests/hsts-test.c b/tests/hsts-test.c
index bc9a10d0..1f859f7f 100644
--- a/tests/hsts-test.c
+++ b/tests/hsts-test.c
@@ -156,16 +156,12 @@ on_request_queued (SoupSession *session,
 static SoupSession *
 hsts_session_new (SoupHSTSEnforcer *enforcer)
 {
-       SoupSession *session;
+       SoupSession *session = session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
 
        if (enforcer)
-               session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                                "add-feature", enforcer,
-                                                NULL);
+                soup_session_add_feature (session, SOUP_SESSION_FEATURE (enforcer));
        else
-               session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                                "add-feature-by-type", SOUP_TYPE_HSTS_ENFORCER,
-                                                NULL);
+                soup_session_add_feature_by_type (session, SOUP_TYPE_HSTS_ENFORCER);
 
        g_signal_connect (session, "request-queued", G_CALLBACK (on_request_queued), NULL);
 
diff --git a/tests/misc-test.c b/tests/misc-test.c
index 063fb703..2d06f0c8 100644
--- a/tests/misc-test.c
+++ b/tests/misc-test.c
@@ -676,9 +676,9 @@ main (int argc, char **argv)
 
        auth_domain = soup_auth_domain_basic_new (
                "realm", "misc-test",
-               "add-path", "/auth",
                "auth-callback", auth_callback,
                NULL);
+        soup_auth_domain_add_path (auth_domain, "/auth");
        soup_server_add_auth_domain (server, auth_domain);
        g_object_unref (auth_domain);
 
diff --git a/tests/ntlm-test.c b/tests/ntlm-test.c
index aca219eb..bf6a2319 100644
--- a/tests/ntlm-test.c
+++ b/tests/ntlm-test.c
@@ -672,9 +672,8 @@ do_retrying_test (TestServer *ts,
 
        debug_printf (1, "  /alice\n");
 
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature-by-type", SOUP_TYPE_AUTH_NTLM,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature_by_type (session, SOUP_TYPE_AUTH_NTLM);
 
        uri = soup_uri_new_with_base (ts->uri, "/alice");
        msg = soup_message_new_from_uri ("GET", uri);
@@ -694,9 +693,8 @@ do_retrying_test (TestServer *ts,
 
        debug_printf (1, "  /bob\n");
 
-       session = soup_test_session_new (SOUP_TYPE_SESSION,
-                                        "add-feature-by-type", SOUP_TYPE_AUTH_NTLM,
-                                        NULL);
+       session = soup_test_session_new (SOUP_TYPE_SESSION, NULL);
+        soup_session_add_feature_by_type (session, SOUP_TYPE_AUTH_NTLM);
        retried = FALSE;
        uri = soup_uri_new_with_base (ts->uri, "/bob");
        msg = soup_message_new_from_uri ("GET", uri);
diff --git a/tests/proxy-test.c b/tests/proxy-test.c
index ca947e42..938a23b0 100644
--- a/tests/proxy-test.c
+++ b/tests/proxy-test.c
@@ -324,9 +324,8 @@ do_proxy_auth_cache_test (void)
 
        session = soup_test_session_new (SOUP_TYPE_SESSION,
                                         "proxy-resolver", proxy_resolvers[AUTH_PROXY],
-                                        "add-feature", cache,
                                         NULL);
-
+        soup_session_add_feature (session, SOUP_SESSION_FEATURE (cache));
        url = g_strconcat (HTTP_SERVER, "/Basic/realm1/", NULL);
 
        debug_printf (1, "  GET %s via %s (from network)\n", url, proxy_names[AUTH_PROXY]);
diff --git a/tests/server-auth-test.c b/tests/server-auth-test.c
index f6da2b05..0d57c88c 100644
--- a/tests/server-auth-test.c
+++ b/tests/server-auth-test.c
@@ -346,21 +346,21 @@ main (int argc, char **argv)
 
        auth_domain = soup_auth_domain_basic_new (
                "realm", "server-auth-test",
-               "add-path", "/Basic",
-               "add-path", "/Any",
-               "remove-path", "/Any/Not",
                "auth-callback", basic_auth_callback,
                NULL);
+        soup_auth_domain_add_path (auth_domain, "/Basic");
+        soup_auth_domain_add_path (auth_domain, "/Any");
+        soup_auth_domain_remove_path (auth_domain, "/Any/Not");
        soup_server_add_auth_domain (server, auth_domain);
        g_object_unref (auth_domain);
 
        auth_domain = soup_auth_domain_digest_new (
                "realm", "server-auth-test",
-               "add-path", "/Digest",
-               "add-path", "/Any",
-               "remove-path", "/Any/Not",
                "auth-callback", digest_auth_callback,
                NULL);
+        soup_auth_domain_add_path (auth_domain, "/Digest");
+        soup_auth_domain_add_path (auth_domain, "/Any");
+        soup_auth_domain_remove_path (auth_domain, "/Any/Not");
        soup_server_add_auth_domain (server, auth_domain);
        g_object_unref (auth_domain);
 


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