summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/gupnp-sections.txt3
-rw-r--r--examples/light-client.c2
-rw-r--r--examples/light-server.c13
-rw-r--r--libgupnp/gupnp-context-manager.c61
-rw-r--r--libgupnp/gupnp-context-manager.h7
-rw-r--r--libgupnp/gupnp-context.c28
-rw-r--r--libgupnp/gupnp-context.h10
-rw-r--r--libgupnp/gupnp-service-info.c85
-rw-r--r--libgupnp/gupnp-service-info.h4
-rw-r--r--libgupnp/gupnp-service-proxy.c120
-rw-r--r--libgupnp/gupnp-service-proxy.h20
-rw-r--r--tests/gtest/test-bugs.c20
-rw-r--r--tests/gtest/test-context.c3
-rw-r--r--tests/test-introspection.c47
-rw-r--r--tests/test-server.c9
-rw-r--r--vala/GUPnP-1.2.metadata4
16 files changed, 38 insertions, 398 deletions
diff --git a/doc/gupnp-sections.txt b/doc/gupnp-sections.txt
index 12f9c77..9f24f56 100644
--- a/doc/gupnp-sections.txt
+++ b/doc/gupnp-sections.txt
@@ -173,7 +173,6 @@ GUPnPRootDevicePrivate
<TITLE>GUPnPContext</TITLE>
GUPnPContext
gupnp_context_new
-gupnp_context_get_host_ip
gupnp_context_get_port
gupnp_context_get_server
gupnp_context_get_session
@@ -205,7 +204,6 @@ GUPnPContextPrivate
<FILE>gupnp-context-manager</FILE>
<TITLE>GUPnPContextManager</TITLE>
GUPnPContextManager
-gupnp_context_manager_new
gupnp_context_manager_create
gupnp_context_manager_rescan_control_points
gupnp_context_manager_manage_control_point
@@ -281,7 +279,6 @@ gupnp_service_info_get_id
gupnp_service_info_get_scpd_url
gupnp_service_info_get_control_url
gupnp_service_info_get_event_subscription_url
-gupnp_service_info_get_introspection
gupnp_service_info_get_introspection_async
gupnp_service_info_get_introspection_async_full
<SUBSECTION Standard>
diff --git a/examples/light-client.c b/examples/light-client.c
index 4ef7108..82ee54c 100644
--- a/examples/light-client.c
+++ b/examples/light-client.c
@@ -146,7 +146,7 @@ main (int argc, char **argv)
}
/* Create the UPnP context */
- context = gupnp_context_new (NULL, NULL, 0, &error);
+ context = gupnp_context_new (NULL, 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 3d5f589..66f8566 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, NULL, 0, &error);
+ context = gupnp_context_new (NULL, 0, &error);
if (error) {
g_printerr ("Error creating the GUPnP context: %s\n",
error->message);
@@ -159,7 +159,15 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
}
/* Create root device */
- dev = gupnp_root_device_new (context, "BinaryLight1.xml", ".");
+ dev = gupnp_root_device_new (context, "BinaryLight1.xml", ".", &error);
+ if (error != NULL) {
+ g_printerr ("Error creating the GUPnP root device: %s\n",
+ error->message);
+
+ g_error_free (error);
+
+ return EXIT_FAILURE;
+ }
gupnp_root_device_set_available (dev, TRUE);
/* Get the switch service from the root device */
@@ -171,6 +179,7 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
return EXIT_FAILURE;
}
+
/* Autoconnect the action and state variable handlers. This connects
query_target_cb and query_status_cb to the Target and Status state
variables query callbacks, and set_target_cb, get_target_cb and
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index 76915d9..2ac4388 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -75,7 +75,6 @@ struct _GUPnPContextManagerPrivate {
enum {
PROP_0,
- PROP_MAIN_CONTEXT,
PROP_PORT,
PROP_WHITE_LIST
};
@@ -313,13 +312,6 @@ gupnp_context_manager_set_property (GObject *object,
case PROP_PORT:
priv->port = g_value_get_uint (value);
break;
- case PROP_MAIN_CONTEXT:
- if (g_value_get_pointer (value) != NULL)
- g_warning ("GUPnPContextManager:main-context is "
- "deprecated. Use "
- "g_main_context_push_thread_default()"
- "instead.");
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -340,13 +332,6 @@ gupnp_context_manager_get_property (GObject *object,
case PROP_PORT:
g_value_set_uint (value, manager->priv->port);
break;
- case PROP_MAIN_CONTEXT:
- g_warning ("GUPnPContextManager:main-context is deprecated. "
- "Use g_main_context_push_thread_default()"
- "instead.");
- g_value_set_pointer (value,
- g_main_context_get_thread_default ());
- break;
case PROP_WHITE_LIST:
g_value_set_object (value, manager->priv->white_list);
break;
@@ -403,27 +388,6 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass)
g_type_class_add_private (klass, sizeof (GUPnPContextManagerPrivate));
/**
- * GSSDPClient:main-context:
- *
- * The #GMainContext to pass to created #GUPnPContext objects. Set to
- * NULL to use the default.
- *
- * Deprecated: 0.17.2: Use g_main_context_push_thread_default()
- * instead.
- **/
- g_object_class_install_property
- (object_class,
- PROP_MAIN_CONTEXT,
- g_param_spec_pointer
- ("main-context",
- "Main context",
- "GMainContext to pass to created GUPnPContext"
- " objects",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK |
- G_PARAM_STATIC_BLURB));
-
- /**
* GUPnPContextManager:port:
*
* Port the contexts listen on, or 0 if you don't care what
@@ -499,31 +463,6 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass)
GUPNP_TYPE_CONTEXT);
}
-/**
- * gupnp_context_manager_new:
- * @main_context: (allow-none): Deprecated: 0.17.2: %NULL. If you want to use
- * a different main context use
- * g_main_context_push_thread_default() instead.
- * @port: Port to create contexts for, or 0 if you don't care what port is used.
- *
- * Same as gupnp_context_manager_create().
- *
- * Returns: (transfer full): A new #GUPnPContextManager object.
- * Since: 0.13.0
- * Deprecated: 0.17.2: Use gupnp_context_manager_create().
- **/
-GUPnPContextManager *
-gupnp_context_manager_new (GMainContext *main_context,
- guint port)
-{
- if (main_context)
- g_warning ("gupnp_context_manager_new::main_context is"
- " deprecated. Use "
- " g_main_context_push_thread_default() instead");
-
- return gupnp_context_manager_create (port);
-}
-
#ifdef HAVE_LINUX_RTNETLINK_H
#include "gupnp-linux-context-manager.h"
#endif
diff --git a/libgupnp/gupnp-context-manager.h b/libgupnp/gupnp-context-manager.h
index 9ff917d..3356dc8 100644
--- a/libgupnp/gupnp-context-manager.h
+++ b/libgupnp/gupnp-context-manager.h
@@ -82,13 +82,6 @@ struct _GUPnPContextManagerClass {
void (* _gupnp_reserved4) (void);
};
-
-#ifndef GUPNP_DISABLE_DEPRECATED
-GUPnPContextManager *
-gupnp_context_manager_new (GMainContext *main_context,
- guint port);
-#endif
-
GUPnPContextManager *
gupnp_context_manager_create (guint port);
diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c
index 2919ab3..2cf764d 100644
--- a/libgupnp/gupnp-context.c
+++ b/libgupnp/gupnp-context.c
@@ -634,8 +634,6 @@ _gupnp_context_get_server_uri (GUPnPContext *context)
/**
* gupnp_context_new:
- * @main_context: (allow-none): Deprecated: 0.17.2: Always set to %NULL. If you
- * want to use a different context, use g_main_context_push_thread_default().
* @iface: (allow-none): The network interface to use, or %NULL to
* auto-detect.
* @port: Port to run on, or 0 if you don't care what port is used.
@@ -647,16 +645,10 @@ _gupnp_context_get_server_uri (GUPnPContext *context)
* Return value: A new #GUPnPContext object, or %NULL on an error
**/
GUPnPContext *
-gupnp_context_new (GMainContext *main_context,
- const char *iface,
+gupnp_context_new (const char *iface,
guint port,
GError **error)
{
- if (main_context)
- g_warning ("gupnp_context_new::main_context is deprecated."
- " Use g_main_context_push_thread_default()"
- " instead");
-
return g_initable_new (GUPNP_TYPE_CONTEXT,
NULL,
error,
@@ -666,24 +658,6 @@ gupnp_context_new (GMainContext *main_context,
}
/**
- * gupnp_context_get_host_ip:
- * @context: A #GUPnPContext
- *
- * Get the IP address we advertise ourselves as using.
- *
- * Return value: The IP address. This string should not be freed.
- *
- * Deprecated:0.12.7: The "host-ip" property has moved to the base class
- * #GSSDPClient so newer applications should use
- * #gssdp_client_get_host_ip instead.
- **/
-const char *
-gupnp_context_get_host_ip (GUPnPContext *context)
-{
- return gssdp_client_get_host_ip (GSSDP_CLIENT (context));
-}
-
-/**
* gupnp_context_get_port:
* @context: A #GUPnPContext
*
diff --git a/libgupnp/gupnp-context.h b/libgupnp/gupnp-context.h
index b2e4ece..08a0f57 100644
--- a/libgupnp/gupnp-context.h
+++ b/libgupnp/gupnp-context.h
@@ -81,18 +81,10 @@ struct _GUPnPContextClass {
};
GUPnPContext *
-gupnp_context_new (GMainContext *main_context,
- const char *iface,
+gupnp_context_new (const char *iface,
guint port,
GError **error);
-#ifndef GUPNP_DISABLE_DEPRECATED
-
-const char *
-gupnp_context_get_host_ip (GUPnPContext *context);
-
-#endif /* GUPNP_DISABLE_DEPRECATED */
-
guint
gupnp_context_get_port (GUPnPContext *context);
diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c
index 1065f55..53d222a 100644
--- a/libgupnp/gupnp-service-info.c
+++ b/libgupnp/gupnp-service-info.c
@@ -541,91 +541,6 @@ gupnp_service_info_get_event_subscription_url (GUPnPServiceInfo *info)
info->priv->url_base);
}
-/**
- * gupnp_service_info_get_introspection:
- * @info: A #GUPnPServiceInfo
- * @error: return location for a #GError, or %NULL
- *
- * Note that introspection object is created from the information in service
- * description document (SCPD) provided by the service so it can not be created
- * if the service does not provide an SCPD.
- *
- * Warning: You should use gupnp_service_info_get_introspection_async()
- * instead, this function re-enter the GMainloop before returning or might
- * even block.
- *
- * Return value: (transfer full): A new #GUPnPServiceIntrospection for this
- * service or %NULL. Unref after use.
- *
- * Deprecated: 0.20.15. Use gupnp_service_info_get_introspection_async() or
- * gupnp_service_info_get_introspection_async_full() instead.
- **/
-G_DEPRECATED GUPnPServiceIntrospection *
-gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
- GError **error)
-{
- GUPnPServiceIntrospection *introspection;
- SoupSession *session;
- SoupMessage *msg;
- int status;
- char *scpd_url;
- xmlDoc *scpd;
-
- g_return_val_if_fail (GUPNP_IS_SERVICE_INFO (info), NULL);
-
- introspection = NULL;
-
- scpd_url = gupnp_service_info_get_scpd_url (info);
-
- msg = NULL;
- if (scpd_url != NULL) {
- msg = soup_message_new (SOUP_METHOD_GET, scpd_url);
-
- g_free (scpd_url);
- }
-
- if (msg == NULL) {
- g_set_error (error,
- GUPNP_SERVER_ERROR,
- GUPNP_SERVER_ERROR_INVALID_URL,
- "No valid SCPD URL defined");
-
- return NULL;
- }
-
- /* Send off the message */
- session = gupnp_context_get_session (info->priv->context);
-
- status = soup_session_send_message (session, msg);
- if (!SOUP_STATUS_IS_SUCCESSFUL (status)) {
- _gupnp_error_set_server_error (error, msg);
-
- g_object_unref (msg);
-
- return NULL;
- }
-
- scpd = xmlRecoverMemory (msg->response_body->data,
- msg->response_body->length);
-
- g_object_unref (msg);
-
- if (scpd) {
- introspection = gupnp_service_introspection_new (scpd);
-
- xmlFreeDoc (scpd);
- }
-
- if (!introspection) {
- g_set_error (error,
- GUPNP_SERVER_ERROR,
- GUPNP_SERVER_ERROR_INVALID_RESPONSE,
- "Could not parse SCPD");
- }
-
- return introspection;
-}
-
/*
* SCPD URL downloaded.
*/
diff --git a/libgupnp/gupnp-service-info.h b/libgupnp/gupnp-service-info.h
index 3fe2b3e..62accad 100644
--- a/libgupnp/gupnp-service-info.h
+++ b/libgupnp/gupnp-service-info.h
@@ -123,10 +123,6 @@ gupnp_service_info_get_control_url (GUPnPServiceInfo *info);
char *
gupnp_service_info_get_event_subscription_url (GUPnPServiceInfo *info);
-GUPnPServiceIntrospection *
-gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
- GError **error);
-
void
gupnp_service_info_get_introspection_async
(GUPnPServiceInfo *info,
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index cf837ef..3c32588 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -662,71 +662,6 @@ out:
}
/**
- * gupnp_service_proxy_send_action_hash: (skip)
- * @proxy: A #GUPnPServiceProxy
- * @action: An action
- * @error: (allow-none): The location where to store any error, or %NULL
- * @in_hash: (element-type utf8 GValue) (transfer none): A #GHashTable of in
- * parameter name and #GValue pairs
- * @out_hash: (inout) (element-type utf8 GValue) (transfer full): A #GHashTable
- * of out parameter name and initialized #GValue pairs
- *
- * See gupnp_service_proxy_send_action(); this version takes a pair of
- * #GHashTable<!-- -->s for runtime determined parameter lists.
- *
- * Do not use this function in newly written code; it cannot guarantee the
- * order of arguments and thus breaks interaction with many devices.
- *
- * Return value: %TRUE if sending the action was succesful.
- *
- * Deprecated: 0.20.9: Use gupnp_service_proxy_send_action() or
- * gupnp_service_proxy_send_action_list()
- **/
-gboolean
-gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy,
- const char *action,
- GError **error,
- GHashTable *in_hash,
- GHashTable *out_hash)
-{
- GMainLoop *main_loop;
- GUPnPServiceProxyAction *handle;
-
- g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE);
- g_return_val_if_fail (action, FALSE);
-
- main_loop = g_main_loop_new (g_main_context_get_thread_default (),
- TRUE);
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- handle = gupnp_service_proxy_begin_action_hash (proxy,
- action,
- stop_main_loop,
- main_loop,
- in_hash);
- G_GNUC_END_IGNORE_DEPRECATIONS
- if (!handle) {
- g_main_loop_unref (main_loop);
-
- return FALSE;
- }
-
- /* Loop till we get a reply (or time out) */
- if (g_main_loop_is_running (main_loop))
- g_main_loop_run (main_loop);
-
- g_main_loop_unref (main_loop);
-
- if (!gupnp_service_proxy_end_action_hash (proxy,
- handle,
- error,
- out_hash))
- return FALSE;
-
- return TRUE;
-}
-
-/**
* gupnp_service_proxy_send_action_list: (rename-to gupnp_service_proxy_send_action_list)
* @proxy: (transfer none) : A #GUPnPServiceProxy
* @action: An action
@@ -1148,61 +1083,6 @@ gupnp_service_proxy_begin_action_list
}
/**
- * gupnp_service_proxy_begin_action_hash: (skip)
- * @proxy: A #GUPnPServiceProxy
- * @action: An action
- * @callback: (scope async): The callback to call when sending the action has succeeded
- * or failed
- * @user_data: User data for @callback
- * @hash: (element-type utf8 GValue): A #GHashTable of in parameter name and #GValue pairs
- *
- * See gupnp_service_proxy_begin_action(); this version takes a #GHashTable
- * for runtime generated parameter lists.
- *
- * Do not use this function in newly written code; it cannot guarantee the
- * order of arguments and thus breaks interaction with many devices.
- *
- * Return value: (transfer none): A #GUPnPServiceProxyAction handle. This will
- * be freed when calling gupnp_service_proxy_cancel_action() or
- * gupnp_service_proxy_end_action_hash().
- *
- * Deprecated: 0.20.9: Use gupnp_service_proxy_send_action() or
- * gupnp_service_proxy_send_action_list()
- *
- **/
-GUPnPServiceProxyAction *
-gupnp_service_proxy_begin_action_hash
- (GUPnPServiceProxy *proxy,
- const char *action,
- GUPnPServiceProxyActionCallback callback,
- gpointer user_data,
- GHashTable *hash)
-{
- GUPnPServiceProxyAction *ret;
-
- g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), NULL);
- g_return_val_if_fail (action, NULL);
- g_return_val_if_fail (callback, NULL);
-
- /* Create message */
- ret = begin_action_msg (proxy, action, callback, user_data);
-
- if (ret->error) {
- g_idle_add (action_error_idle_cb, ret);
-
- return ret;
- }
-
- /* Arguments */
- g_hash_table_foreach (hash, (GHFunc) write_in_parameter, ret->msg_str);
-
- /* Finish and send off */
- finish_action_msg (ret, action);
-
- return ret;
-}
-
-/**
* gupnp_service_proxy_end_action:
* @proxy: A #GUPnPServiceProxy
* @action: A #GUPnPServiceProxyAction handle
diff --git a/libgupnp/gupnp-service-proxy.h b/libgupnp/gupnp-service-proxy.h
index 8722812..0643cd4 100644
--- a/libgupnp/gupnp-service-proxy.h
+++ b/libgupnp/gupnp-service-proxy.h
@@ -133,16 +133,6 @@ gupnp_service_proxy_send_action_valist
GError **error,
va_list var_args);
-#ifndef GUPNP_DISABLE_DEPRECATED
-gboolean
-gupnp_service_proxy_send_action_hash
- (GUPnPServiceProxy *proxy,
- const char *action,
- GError **error,
- GHashTable *in_hash,
- GHashTable *out_hash) G_GNUC_DEPRECATED;
-#endif
-
gboolean
gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy,
const char *action,
@@ -176,16 +166,6 @@ gupnp_service_proxy_begin_action_list
GUPnPServiceProxyActionCallback callback,
gpointer user_data);
-#ifndef GUPNP_DISABLE_DEPRECATED
-GUPnPServiceProxyAction *
-gupnp_service_proxy_begin_action_hash
- (GUPnPServiceProxy *proxy,
- const char *action,
- GUPnPServiceProxyActionCallback callback,
- gpointer user_data,
- GHashTable *hash) G_GNUC_DEPRECATED;
-#endif
-
gboolean
gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy,
GUPnPServiceProxyAction *action,
diff --git a/tests/gtest/test-bugs.c b/tests/gtest/test-bugs.c
index 89c6a60..252109f 100644
--- a/tests/gtest/test-bugs.c
+++ b/tests/gtest/test-bugs.c
@@ -214,9 +214,9 @@ test_bgo_696762 (void)
data.loop = g_main_loop_new (NULL, FALSE);
- context = gupnp_context_new (NULL, "lo", 0, &error);
+ context = gupnp_context_new ("lo", 0, &error);
+ g_assert_no_error (error);
g_assert (context != NULL);
- g_assert (error == NULL);
cp = gupnp_control_point_new (context,
"urn:test-gupnp-org:service:TestService:1");
@@ -281,9 +281,9 @@ test_bgo_678701 (void)
data.loop = g_main_loop_new (NULL, FALSE);
- context = gupnp_context_new (NULL, "lo", 0, &error);
+ context = gupnp_context_new ("lo", 0, &error);
+ g_assert_no_error (error);
g_assert (context != NULL);
- g_assert (error == NULL);
factory = gupnp_resource_factory_get_default ();
gupnp_resource_factory_register_resource_proxy_type (factory,
@@ -338,9 +338,9 @@ test_bgo_690400 (void)
data.loop = g_main_loop_new (NULL, FALSE);
- context = gupnp_context_new (NULL, "lo", 0, &error);
+ context = gupnp_context_new ("lo", 0, &error);
+ g_assert_no_error (error);
g_assert (context != NULL);
- g_assert (error == NULL);
cp = gupnp_control_point_new (context,
"urn:test-gupnp-org:service:TestService:1");
@@ -397,9 +397,9 @@ test_bgo_722696 (void)
char *icon;
int width;
- context = gupnp_context_new (NULL, "lo", 0, &error);
+ context = gupnp_context_new ("lo", 0, &error);
+ g_assert_no_error (error);
g_assert (context != NULL);
- g_assert (error == NULL);
rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH, &error);
g_assert_no_error (error);
@@ -458,9 +458,9 @@ test_bgo_743233 (void)
GUPnPControlPoint *cp = NULL;
GError *error = NULL;
- context = gupnp_context_new (NULL, "lo", 0, &error);
+ context = gupnp_context_new ("lo", 0, &error);
+ g_assert_no_error (error);
g_assert (context != NULL);
- g_assert (error == NULL);
cp = gupnp_control_point_new (context,
"usn:uuid:0dc60534-642c-478f-ae61-1d78dbe1f73d");
diff --git a/tests/gtest/test-context.c b/tests/gtest/test-context.c
index 93dc283..e941b00 100644
--- a/tests/gtest/test-context.c
+++ b/tests/gtest/test-context.c
@@ -134,8 +134,7 @@ test_gupnp_context_http_ranged_requests (void)
g_assert (error == NULL);
file_length = g_mapped_file_get_length (file);
- context = gupnp_context_new (NULL,
- "lo",
+ context = gupnp_context_new ("lo",
0,
&error);
g_assert (context != NULL);
diff --git a/tests/test-introspection.c b/tests/test-introspection.c
index 505f51d..bd24869 100644
--- a/tests/test-introspection.c
+++ b/tests/test-introspection.c
@@ -32,18 +32,10 @@ GMainLoop *main_loop;
static GCancellable *cancellable;
-static gboolean async = FALSE;
-static GOptionEntry entries[] =
-{
- { "async", 'a', 0, G_OPTION_ARG_NONE, &async,
- "Asynchronously create intropection object", NULL },
- { NULL }
-};
-
static void
interrupt_signal_handler (G_GNUC_UNUSED int signum)
{
- if (!async || g_cancellable_is_cancelled (cancellable)) {
+ if (g_cancellable_is_cancelled (cancellable)) {
g_main_loop_quit (main_loop);
} else {
g_print ("Canceling all introspection calls. "
@@ -204,24 +196,13 @@ service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp,
GUPnPServiceProxy *proxy)
{
GUPnPServiceInfo *info;
- GUPnPServiceIntrospection *introspection;
- GError *error = NULL;
info = GUPNP_SERVICE_INFO (proxy);
- if (async) {
- gupnp_service_info_get_introspection_async_full (info,
- got_introspection,
- cancellable,
- NULL);
- } else {
- introspection =
- gupnp_service_info_get_introspection (info, &error);
- got_introspection (info, introspection, error, NULL);
-
- if (error)
- g_error_free (error);
- }
+ gupnp_service_info_get_introspection_async_full (info,
+ got_introspection,
+ cancellable,
+ NULL);
}
static void
@@ -244,28 +225,10 @@ main (int argc, char **argv)
GError *error = NULL;
GUPnPContext *context;
GUPnPControlPoint *cp;
- GOptionContext *option_context;
#ifndef G_OS_WIN32
struct sigaction sig_action;
#endif /* G_OS_WIN32 */
- option_context = g_option_context_new ("- test GUPnP introspection");
- g_option_context_add_main_entries (option_context,
- entries,
- NULL);
- g_option_context_parse (option_context,
- &argc,
- &argv,
- &error);
- if (error) {
- g_printerr ("Error parsing the commandline arguments: %s\n",
- error->message);
- g_error_free (error);
-
- return EXIT_FAILURE;
- }
-
-
error = NULL;
context = g_initable_new (GUPNP_TYPE_CONTEXT, NULL, &error, NULL);
if (error) {
diff --git a/tests/test-server.c b/tests/test-server.c
index 3f9461a..53d704b 100644
--- a/tests/test-server.c
+++ b/tests/test-server.c
@@ -87,7 +87,14 @@ main (int argc, char **argv)
g_print ("Running on port %d\n", gupnp_context_get_port (context));
/* Create root device */
- dev = gupnp_root_device_new (context, "description.xml", ".");
+ dev = gupnp_root_device_new (context, "description.xml", ".", &error);
+ if (error != NULL) {
+ g_printerr ("Error creating the GUPnP root device: %s\n",
+ error->message);
+ g_error_free (error);
+
+ return EXIT_FAILURE;
+ }
/* Implement Browse action on ContentDirectory if available */
content_dir = gupnp_device_info_get_service
diff --git a/vala/GUPnP-1.2.metadata b/vala/GUPnP-1.2.metadata
index 4d376b4..1108c78 100644
--- a/vala/GUPnP-1.2.metadata
+++ b/vala/GUPnP-1.2.metadata
@@ -3,9 +3,6 @@ Acl
.is_allowed skip
.is_allowed_async skip
.is_allowed_finish skip
-ContextManager
- .main_context skip
- .new skip
DeviceInfo
.get_device nullable=true
.get_service nullable=true
@@ -21,7 +18,6 @@ ServiceAction
ServiceInfo
.document skip
.element skip
- .get_introspection nullable=true
ServiceIntrospection
.get_action nullable=true unowned=true
.get_state_variable nullable=true unowned=true