DBus API: removing user settings support

Remove bits from the external DBus API that were once needed for user
settings support.
This commit is contained in:
Daniel Gnoutcheff 2010-07-28 02:26:39 -04:00
parent fa8c9304b5
commit d503c09466
12 changed files with 1 additions and 78 deletions

View file

@ -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,

View file

@ -5,7 +5,7 @@
<tp:error name="Unknown Connection">
<tp:docstring>
Connection was not provided by any known settings service.
Connection was not provided by the settings service.
</tp:docstring>
</tp:error>
@ -15,18 +15,6 @@
</tp:docstring>
</tp:error>
<tp:error name="Invalid Service">
<tp:docstring>
Invalid settings service (not a recognized system or user settings service name).
</tp:docstring>
</tp:error>
<tp:error name="System Connection">
<tp:docstring>
Connection was superseded by a system connection.
</tp:docstring>
</tp:error>
<tp:error name="Permission Denied">
<tp:docstring>
User does not have the permission to activate this connection.

View file

@ -2,9 +2,6 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.Connection.Active">
<property name="ServiceName" type="s" access="read">
<tp:docstring>The D-Bus service name providing this connection.</tp:docstring>
</property>
<property name="Connection" type="o" access="read">
<tp:docstring>The path of the connection.</tp:docstring>
</property>

View file

@ -22,7 +22,6 @@ object. dbus-glib generates the same bound function names for D-Bus the methods
<method name="ActivateConnection">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_activate_connection"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="service_name" type="s" direction="in"/>
<arg name="connection" type="o" direction="in"/>
<arg name="device" type="o" direction="in"/>
<arg name="specific_object" type="o" direction="in"/>

View file

@ -27,11 +27,6 @@
<tp:docstring>
Activate a connection using the supplied device.
</tp:docstring>
<arg name="service_name" type="s" direction="in">
<tp:docstring>
The D-Bus service name of the settings service that provides this connection.
</tp:docstring>
</arg>
<arg name="connection" type="o" direction="in">
<tp:docstring>
The connection to activate the devices with.
@ -62,7 +57,6 @@
<tp:possible-errors>
<tp:error name="org.freedesktop.NetworkManager.Error.UnknownConnection"/>
<tp:error name="org.freedesktop.NetworkManager.Error.UnknownDevice"/>
<tp:error name="org.freedesktop.NetworkManager.Error.InvalidService"/>
<tp:error name="org.freedesktop.NetworkManager.Error.ConnectionActivating">
<tp:docstring>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?</tp:docstring>
</tp:error>

View file

@ -2,9 +2,6 @@
<node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<interface name="org.freedesktop.NetworkManager.Connection.Active">
<property name="ServiceName" type="s" access="read">
<tp:docstring>The D-Bus service name providing this connection.</tp:docstring>
</property>
<property name="Connection" type="o" access="read">
<tp:docstring>The path of the connection.</tp:docstring>
</property>

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -24,7 +24,6 @@
#include <glib-object.h>
#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"

View file

@ -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.

View file

@ -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,