From d503c09466dbd0b58f8ee639311cbf24fac0f360 Mon Sep 17 00:00:00 2001 From: Daniel Gnoutcheff Date: Wed, 28 Jul 2010 02:26:39 -0400 Subject: [PATCH] DBus API: removing user settings support Remove bits from the external DBus API that were once needed for user settings support. --- cli/src/connections.c | 1 - introspection/errors.xml | 14 +------------- introspection/nm-active-connection.xml | 3 --- introspection/nm-manager-client.xml | 1 - introspection/nm-manager.xml | 6 ------ introspection/nm-vpn-connection.xml | 3 --- libnm-glib/nm-client.c | 4 ---- libnm-glib/nm-client.h | 1 - src/nm-activation-request.c | 12 ------------ src/nm-active-connection.h | 1 - src/nm-manager.c | 21 --------------------- src/vpn-manager/nm-vpn-connection.c | 12 ------------ 12 files changed, 1 insertion(+), 78 deletions(-) diff --git a/cli/src/connections.c b/cli/src/connections.c index f19e3135ae..42fde78aab 100644 --- a/cli/src/connections.c +++ b/cli/src/connections.c @@ -1361,7 +1361,6 @@ do_connection_up (NmCli *nmc, int argc, char **argv) nmc->nowait_flag = !wait; nmc->should_wait = TRUE; nm_client_activate_connection (nmc->client, - NM_DBUS_SERVICE_SYSTEM_SETTINGS, con_path, device, spec_object, diff --git a/introspection/errors.xml b/introspection/errors.xml index 444b325d5e..f2db86679f 100644 --- a/introspection/errors.xml +++ b/introspection/errors.xml @@ -5,7 +5,7 @@ - Connection was not provided by any known settings service. + Connection was not provided by the settings service. @@ -15,18 +15,6 @@ - - - Invalid settings service (not a recognized system or user settings service name). - - - - - - Connection was superseded by a system connection. - - - User does not have the permission to activate this connection. diff --git a/introspection/nm-active-connection.xml b/introspection/nm-active-connection.xml index 765830a1dc..494eba42b2 100644 --- a/introspection/nm-active-connection.xml +++ b/introspection/nm-active-connection.xml @@ -2,9 +2,6 @@ - - The D-Bus service name providing this connection. - The path of the connection. diff --git a/introspection/nm-manager-client.xml b/introspection/nm-manager-client.xml index f30d1d671d..375bfc6e9f 100644 --- a/introspection/nm-manager-client.xml +++ b/introspection/nm-manager-client.xml @@ -22,7 +22,6 @@ object. dbus-glib generates the same bound function names for D-Bus the methods - diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml index e1b466799f..753ceece4f 100644 --- a/introspection/nm-manager.xml +++ b/introspection/nm-manager.xml @@ -27,11 +27,6 @@ Activate a connection using the supplied device. - - - The D-Bus service name of the settings service that provides this connection. - - The connection to activate the devices with. @@ -62,7 +57,6 @@ - Another connection is already activating or the same connection is already active. FIXME: check if the error name is correct. FIXME: split into 2 errors? diff --git a/introspection/nm-vpn-connection.xml b/introspection/nm-vpn-connection.xml index 3a47cdf1b2..eaf0fa678e 100644 --- a/introspection/nm-vpn-connection.xml +++ b/introspection/nm-vpn-connection.xml @@ -2,9 +2,6 @@ - - The D-Bus service name providing this connection. - The path of the connection. diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c index a1f986f493..7de1b68517 100644 --- a/libnm-glib/nm-client.c +++ b/libnm-glib/nm-client.c @@ -977,7 +977,6 @@ activate_cb (DBusGProxy *proxy, /** * nm_client_activate_connection: * @client: a #NMClient - * @service_name: the connection's service name * @connection_path: the connection's DBus path * @device: the #NMDevice * @specific_object: the device specific object (currently used only for @@ -989,7 +988,6 @@ activate_cb (DBusGProxy *proxy, **/ void nm_client_activate_connection (NMClient *client, - const char *service_name, const char *connection_path, NMDevice *device, const char *specific_object, @@ -1001,7 +999,6 @@ nm_client_activate_connection (NMClient *client, g_return_if_fail (NM_IS_CLIENT (client)); g_return_if_fail (NM_IS_DEVICE (device)); - g_return_if_fail (service_name != NULL); g_return_if_fail (connection_path != NULL); /* NULL specific object must be translated into "/" because D-Bus does @@ -1015,7 +1012,6 @@ nm_client_activate_connection (NMClient *client, info->user_data = user_data; org_freedesktop_NetworkManager_activate_connection_async (NM_CLIENT_GET_PRIVATE (client)->client_proxy, - service_name, connection_path, nm_object_get_path (NM_OBJECT (device)), internal_so, diff --git a/libnm-glib/nm-client.h b/libnm-glib/nm-client.h index c67e0d8f84..206c55546a 100644 --- a/libnm-glib/nm-client.h +++ b/libnm-glib/nm-client.h @@ -99,7 +99,6 @@ NMDevice *nm_client_get_device_by_path (NMClient *client, const char *object_ typedef void (*NMClientActivateDeviceFn) (gpointer user_data, const char *object_path, GError *error); void nm_client_activate_connection (NMClient *client, - const char *service_name, const char *connection_path, NMDevice *device, const char *specific_object, diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index e13d95feea..4d8d0d8603 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -83,7 +83,6 @@ typedef struct { enum { PROP_0, - PROP_SERVICE_NAME, PROP_CONNECTION, PROP_SPECIFIC_OBJECT, PROP_DEVICES, @@ -256,10 +255,6 @@ get_property (GObject *object, guint prop_id, GPtrArray *devices; switch (prop_id) { - case PROP_SERVICE_NAME: - /* TODO Remove this propery. */ - g_value_set_string (value, NM_DBUS_SERVICE_SYSTEM_SETTINGS); - break; case PROP_CONNECTION: g_value_set_boxed (value, nm_connection_get_path (priv->connection)); break; @@ -305,13 +300,6 @@ nm_act_request_class_init (NMActRequestClass *req_class) object_class->finalize = finalize; /* properties */ - g_object_class_install_property - (object_class, PROP_SERVICE_NAME, - g_param_spec_string (NM_ACTIVE_CONNECTION_SERVICE_NAME, - "Service name", - "Service name", - NULL, - G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_CONNECTION, g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION, diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h index 55d27e7398..15ae201d4c 100644 --- a/src/nm-active-connection.h +++ b/src/nm-active-connection.h @@ -24,7 +24,6 @@ #include #include "nm-connection.h" -#define NM_ACTIVE_CONNECTION_SERVICE_NAME "service-name" #define NM_ACTIVE_CONNECTION_CONNECTION "connection" #define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT "specific-object" #define NM_ACTIVE_CONNECTION_DEVICES "devices" diff --git a/src/nm-manager.c b/src/nm-manager.c index e00a0ccad2..865529c0d1 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -61,7 +61,6 @@ static gboolean impl_manager_get_devices (NMManager *manager, GPtrArray **devices, GError **err); static void impl_manager_activate_connection (NMManager *manager, - const char *service_name, const char *connection_path, const char *device_path, const char *specific_object_path, @@ -261,7 +260,6 @@ typedef enum NM_MANAGER_ERROR_UNKNOWN_CONNECTION = 0, NM_MANAGER_ERROR_UNKNOWN_DEVICE, NM_MANAGER_ERROR_UNMANAGED_DEVICE, - NM_MANAGER_ERROR_INVALID_SERVICE, NM_MANAGER_ERROR_SYSTEM_CONNECTION, NM_MANAGER_ERROR_PERMISSION_DENIED, NM_MANAGER_ERROR_CONNECTION_NOT_ACTIVE, @@ -297,10 +295,6 @@ nm_manager_error_get_type (void) ENUM_ENTRY (NM_MANAGER_ERROR_UNKNOWN_DEVICE, "UnknownDevice"), /* Unmanaged device. */ ENUM_ENTRY (NM_MANAGER_ERROR_UNMANAGED_DEVICE, "UnmanagedDevice"), - /* Invalid settings service (not a recognized system or user - * settings service name) - */ - ENUM_ENTRY (NM_MANAGER_ERROR_INVALID_SERVICE, "InvalidService"), /* Connection was superceded by a system connection. */ ENUM_ENTRY (NM_MANAGER_ERROR_SYSTEM_CONNECTION, "SystemConnection"), /* User does not have the permission to activate this connection. */ @@ -2172,7 +2166,6 @@ activation_auth_done (PendingActivation *pending, GError *error) static void impl_manager_activate_connection (NMManager *self, - const char *service_name, const char *connection_path, const char *device_path, const char *specific_object_path, @@ -2180,20 +2173,6 @@ impl_manager_activate_connection (NMManager *self, { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); PendingActivation *pending; - GError *error = NULL; - - // TODO user settings services are gone, so service_name is no longer - // meaningful. Remove the parameter and this check. - if (strcmp (service_name, NM_DBUS_SERVICE_SYSTEM_SETTINGS)) { - error = g_error_new_literal (NM_MANAGER_ERROR, - NM_MANAGER_ERROR_INVALID_SERVICE, - "Invalid settings service name"); - dbus_g_method_return_error (context, error); - nm_log_warn (LOGD_CORE, "connection %s:%s failed to activate: (%d) %s", - service_name, connection_path, error->code, error->message); - g_error_free (error); - return; - } /* Need to check the caller's permissions and stuff before we can * activate the connection. diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 0d618aae80..bda021992d 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -97,7 +97,6 @@ static guint signals[LAST_SIGNAL] = { 0 }; enum { PROP_0, - PROP_SERVICE_NAME, PROP_CONNECTION, PROP_SPECIFIC_OBJECT, PROP_DEVICES, @@ -1044,10 +1043,6 @@ get_property (GObject *object, guint prop_id, NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (object); switch (prop_id) { - case PROP_SERVICE_NAME: - /* TODO remove this property */ - g_value_set_string (value, NM_DBUS_SERVICE_SYSTEM_SETTINGS); - break; case PROP_CONNECTION: g_value_set_boxed (value, nm_connection_get_path (priv->connection)); break; @@ -1095,13 +1090,6 @@ nm_vpn_connection_class_init (NMVPNConnectionClass *connection_class) object_class->finalize = finalize; /* properties */ - g_object_class_install_property - (object_class, PROP_SERVICE_NAME, - g_param_spec_string (NM_ACTIVE_CONNECTION_SERVICE_NAME, - "Service name", - "Service name", - NULL, - G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_CONNECTION, g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION,