Commit 485bcfe5 authored by Tambet Ingo's avatar Tambet Ingo

2007-09-28 Tambet Ingo <tambet@gmail.com>

        * src/nm-manager.c:
        * src/nm-manager.h:
        Implement device activation through NMManager.
        Implement "pending device activation" here - If the connection
isn't found,
        we try to wait for up to 5 seconds for the connection to be
provided.
        Add NMConnectionType argument to "connection-added" and
"connection-removed"
        signals.
        (nm_manager_get): Remove. Finally.

        * src/nm-activation-request.c: 
        * src/nm-activation-request.h: 
        Remove all the deferred activation code.

        * src/nm-device.c: Remove all the deferred activation code. Once
        * the device
        activation is started, it's started. Update the activation
virtual function
        signature.

        * src/nm-device-interface.c:
        * src/nm-device-interface.h:
        Device activation now takes only NMActRequest argument.
        Don't expose device activation directly on dbus, it's supposed
to go through
        NMManager now.

        * src/NetworkManagerPolicy.c (nm_policy_device_change_check):
        * Make the code
        a bit more compact.
        Use the new device activation methods through NMManager.

        * introspection/nm-manager-client.xml: 
        * introspection/nm-manager.xml: 
        * libnm-glib/nm-client.c:
        * libnm-glib/nm-client.h:
        Add device activation method.
        
        * libnm-glib/nm-device.c: 
        * libnm-glib/nm-device.h: 
        * introspection/nm-device.xml: 
        Remove device activation method. It's done through NMManager
now.

        * src/vpn-manager/nm-vpn-manager.c (impl_vpn_manager_connect):
        * Use the shiny
        new (nm_manager_get_device_by_path) function, get rid of our own
)find_device).



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2915 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent a3e10d7d
2007-09-28 Tambet Ingo <tambet@gmail.com>
* src/nm-manager.c:
* src/nm-manager.h:
Implement device activation through NMManager.
Implement "pending device activation" here - If the connection isn't found,
we try to wait for up to 5 seconds for the connection to be provided.
Add NMConnectionType argument to "connection-added" and "connection-removed"
signals.
(nm_manager_get): Remove. Finally.
* src/nm-activation-request.c:
* src/nm-activation-request.h:
Remove all the deferred activation code.
* src/nm-device.c: Remove all the deferred activation code. Once the device
activation is started, it's started. Update the activation virtual function
signature.
* src/nm-device-interface.c:
* src/nm-device-interface.h:
Device activation now takes only NMActRequest argument.
Don't expose device activation directly on dbus, it's supposed to go through
NMManager now.
* src/NetworkManagerPolicy.c (nm_policy_device_change_check): Make the code
a bit more compact.
Use the new device activation methods through NMManager.
* introspection/nm-manager-client.xml:
* introspection/nm-manager.xml:
* libnm-glib/nm-client.c:
* libnm-glib/nm-client.h:
Add device activation method.
* libnm-glib/nm-device.c:
* libnm-glib/nm-device.h:
* introspection/nm-device.xml:
Remove device activation method. It's done through NMManager now.
* src/vpn-manager/nm-vpn-manager.c (impl_vpn_manager_connect): Use the shiny
new (nm_manager_get_device_by_path) function, get rid of our own )find_device).
2007-09-28 Dan Williams <dcbw@redhat.com>
* libnm-glib/nm-vpn-connection.c
......
......@@ -2,12 +2,6 @@
<node name="/">
<interface name="org.freedesktop.NetworkManager.Device">
<method name="Activate">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_activate"/>
<arg name="service_name" type="s" direction="in"/>
<arg name="connection" type="o" direction="in"/>
<arg name="specific_object" type="o" direction="in"/>
</method>
<method name="Deactivate">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_device_deactivate"/>
</method>
......
......@@ -14,6 +14,15 @@
<arg name="devices" type="ao" direction="out"/>
</method>
<method name="ActivateDevice">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_activate_device"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="device" type="o" direction="in"/>
<arg name="service_name" type="s" direction="in"/>
<arg name="connection" type="o" direction="in"/>
<arg name="specific_object" type="o" direction="in"/>
</method>
<method name="Sleep">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_sleep"/>
<arg name="sleep" type="b" direction="in"/>
......
......@@ -14,6 +14,15 @@
<arg name="devices" type="ao" direction="out"/>
</method>
<method name="ActivateDevice">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_activate_device"/>
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg name="device" type="o" direction="in"/>
<arg name="service_name" type="s" direction="in"/>
<arg name="connection" type="o" direction="in"/>
<arg name="specific_object" type="o" direction="in"/>
</method>
<method name="Sleep">
<annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_manager_sleep"/>
<arg name="sleep" type="b" direction="in"/>
......
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#include <dbus/dbus-glib.h>
#include <string.h>
#include "nm-client.h"
......@@ -5,6 +7,7 @@
#include "nm-device-802-11-wireless.h"
#include "nm-device-private.h"
#include "nm-marshal.h"
#include <nm-utils.h>
#include "nm-client-bindings.h"
......@@ -392,6 +395,55 @@ nm_client_get_device_by_path (NMClient *client, const char *object_path)
return device;
}
typedef struct {
NMClientActivateDeviceFn fn;
gpointer user_data;
} ActivateDeviceInfo;
static void
activate_cb (DBusGProxy *proxy, GError *err, gpointer user_data)
{
ActivateDeviceInfo *info = (ActivateDeviceInfo *) user_data;
if (info->fn)
info->fn (info->user_data, err);
else
nm_warning ("Device activation failed: %s", err->message);
/* FIXME: Free err as well? */
g_slice_free (ActivateDeviceInfo, info);
}
void
nm_client_activate_device (NMClient *client,
NMDevice *device,
const char *service_name,
const char *connection_path,
const char *specific_object,
NMClientActivateDeviceFn callback,
gpointer user_data)
{
ActivateDeviceInfo *info;
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);
info = g_slice_new (ActivateDeviceInfo);
info->fn = callback;
info->user_data = user_data;
org_freedesktop_NetworkManager_activate_device_async (NM_CLIENT_GET_PRIVATE (client)->client_proxy,
nm_object_get_path (NM_OBJECT (device)),
service_name,
connection_path,
specific_object,
activate_cb,
info);
}
gboolean
nm_client_wireless_get_enabled (NMClient *client)
{
......
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
#ifndef NM_CLIENT_H
#define NM_CLIENT_H 1
......@@ -40,7 +41,17 @@ NMClient *nm_client_new (void);
gboolean nm_client_manager_is_running (NMClient *client);
GSList *nm_client_get_devices (NMClient *client);
NMDevice *nm_client_get_device_by_path (NMClient *client,
const char *object_path);
const char *object_path);
typedef void (*NMClientActivateDeviceFn) (gpointer user_data, GError *error);
void nm_client_activate_device (NMClient *client,
NMDevice *device,
const char *service_name,
const char *connection_path,
const char *specific_object,
NMClientActivateDeviceFn callback,
gpointer user_data);
gboolean nm_client_wireless_get_enabled (NMClient *client);
void nm_client_wireless_set_enabled (NMClient *client, gboolean enabled);
......
......@@ -155,28 +155,6 @@ nm_device_new (DBusGConnection *connection, const char *path)
NULL);
}
void
nm_device_activate (NMDevice *device,
const char *service_name,
const char *connection_path,
const char *specific_object)
{
GError *err = NULL;
g_return_if_fail (NM_IS_DEVICE (device));
g_return_if_fail (service_name != NULL);
g_return_if_fail (connection_path != NULL);
if (!org_freedesktop_NetworkManager_Device_activate (NM_DEVICE_GET_PRIVATE (device)->device_proxy,
service_name,
connection_path,
specific_object ? specific_object : "/",
&err)) {
g_warning ("Cannot activate device: %s", err->message);
g_error_free (err);
}
}
void
nm_device_deactivate (NMDevice *device)
{
......
......@@ -35,11 +35,6 @@ GType nm_device_get_type (void);
NMDevice *nm_device_new (DBusGConnection *connection,
const char *path);
void nm_device_activate (NMDevice *device,
const char *service_name,
const char *connection_path,
const char *specific_object);
void nm_device_deactivate (NMDevice *device);
char *nm_device_get_iface (NMDevice *device);
......
......@@ -326,7 +326,7 @@ main (int argc, char *argv[])
goto done;
}
manager = nm_manager_get ();
manager = nm_manager_new ();
if (manager == NULL) {
nm_error ("Failed to initialize the network manager.");
goto done;
......
......@@ -204,6 +204,7 @@ nm_policy_device_change_check (gpointer user_data)
{
NMPolicy *policy = (NMPolicy *) user_data;
GSList *iter;
guint32 caps;
NMConnection * connection = NULL;
char * specific_object = NULL;
NMDevice * new_dev = NULL;
......@@ -213,56 +214,42 @@ nm_policy_device_change_check (gpointer user_data)
switch (nm_manager_get_state (policy->manager)) {
case NM_STATE_CONNECTED:
old_dev = nm_manager_get_active_device (policy->manager);
caps = nm_device_get_capabilities (old_dev);
/* Don't interrupt semi-supported devices. If the user chose
* one, they must explicitly choose to move to another device, we're not
* going to move for them.
*/
if ((NM_IS_DEVICE_802_3_ETHERNET (old_dev) && !(caps & NM_DEVICE_CAP_CARRIER_DETECT))) {
nm_info ("Old device '%s' was semi-supported and user chosen, won't"
" change unless told to.",
nm_device_get_iface (old_dev));
goto out;
}
break;
case NM_STATE_CONNECTING:
for (iter = nm_manager_get_devices (policy->manager); iter; iter = iter->next) {
if (nm_device_is_activating (NM_DEVICE (iter->data))) {
old_dev = NM_DEVICE (iter->data);
break;
NMDevice *d = NM_DEVICE (iter->data);
if (nm_device_is_activating (d)) {
if (nm_device_can_interrupt_activation (d)) {
old_dev = d;
break;
} else
goto out;
}
}
break;
case NM_STATE_DISCONNECTED:
/* Check for devices that have deferred activation requests */
for (iter = nm_manager_get_devices (policy->manager); iter; iter = iter->next) {
NMActRequest *req = nm_device_get_act_request (NM_DEVICE (iter->data));
if (req && nm_act_request_is_deferred (req)) {
old_dev = NM_DEVICE (iter->data);
break;
}
if (nm_manager_activation_pending (policy->manager)) {
nm_info ("There is a pending activation, won't change.");
goto out;
}
break;
default:
break;
}
if (old_dev) {
guint32 caps = nm_device_get_capabilities (old_dev);
NMActRequest *req = nm_device_get_act_request (old_dev);
/* Don't interrupt a currently activating device automatically. */
if ( (nm_device_is_activating (old_dev)
&& !nm_device_can_interrupt_activation (old_dev))
|| nm_act_request_is_deferred (req)) {
nm_info ("Old device '%s' activating, won't change.",
nm_device_get_iface (old_dev));
goto out;
}
/* Don't interrupt semi-supported devices either. If the user chose
* one, they must explicitly choose to move to another device, we're not
* going to move for them.
*/
if ( (NM_IS_DEVICE_802_3_ETHERNET (old_dev)
&& !(caps & NM_DEVICE_CAP_CARRIER_DETECT))) {
nm_info ("Old device '%s' was semi-supported and user chosen, won't"
" change unless told to.",
nm_device_get_iface (old_dev));
goto out;
}
}
new_dev = nm_policy_auto_get_best_device (policy, &connection, &specific_object);
/* Four cases here:
......@@ -321,14 +308,8 @@ nm_policy_device_change_check (gpointer user_data)
/* Don't interrupt activation of a wireless device by
* trying to auto-activate any connection on that device.
*/
if (old_dev == new_dev) {
NMActRequest *req = nm_device_get_act_request (new_dev);
if (nm_device_is_activating (new_dev))
same_activating = TRUE;
else if (req && nm_act_request_is_deferred (req))
same_activating = TRUE;
}
if (old_dev == new_dev && nm_device_is_activating (new_dev))
same_activating = TRUE;
if (!same_activating && !old_has_link && (old_mode != IW_MODE_ADHOC)) {
NMSettingConnection * new_sc = (NMSettingConnection *) nm_connection_get_setting (connection, NM_SETTING_CONNECTION);
......@@ -358,12 +339,7 @@ nm_policy_device_change_check (gpointer user_data)
}
if (new_dev) {
nm_device_interface_activate (NM_DEVICE_INTERFACE (new_dev),
NULL,
NULL,
connection,
specific_object,
FALSE);
nm_manager_activate_device (policy->manager, new_dev, connection, specific_object, FALSE);
}
}
......@@ -500,6 +476,7 @@ state_changed (NMManager *manager, NMState state, gpointer user_data)
static void
connection_added (NMManager *manager,
NMConnection *connection,
NMConnectionType connection_type,
gpointer user_data)
{
NMPolicy *policy = (NMPolicy *) user_data;
......@@ -510,6 +487,7 @@ connection_added (NMManager *manager,
static void
connection_removed (NMManager *manager,
NMConnection *connection,
NMConnectionType connection_type,
gpointer user_data)
{
NMPolicy *policy = (NMPolicy *) user_data;
......
......@@ -20,11 +20,13 @@
*/
#include <string.h>
#include <dbus/dbus-glib.h>
#include "nm-activation-request.h"
#include "nm-marshal.h"
#include "nm-manager.h"
#include "nm-utils.h"
#include "nm-manager.h" /* FIXME! */
#define CONNECTION_GET_SECRETS_CALL_TAG "get-secrets-call"
G_DEFINE_TYPE (NMActRequest, nm_act_request, G_TYPE_OBJECT)
......@@ -34,8 +36,6 @@ G_DEFINE_TYPE (NMActRequest, nm_act_request, G_TYPE_OBJECT)
enum {
CONNECTION_SECRETS_UPDATED,
CONNECTION_SECRETS_FAILED,
DEFERRED_ACTIVATION_TIMEOUT,
DEFERRED_ACTIVATION_START,
LAST_SIGNAL
};
......@@ -44,11 +44,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
typedef struct {
char *deferred_service_name;
char *deferred_connection_path;
gulong deferred_connection_id;
guint32 deferred_timeout_id;
NMConnection *connection;
char *specific_object;
gboolean user_requested;
......@@ -59,35 +54,11 @@ nm_act_request_init (NMActRequest *req)
{
}
static void
clear_deferred_stuff (NMActRequest *req)
{
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (req);
g_free (priv->deferred_service_name);
priv->deferred_service_name = NULL;
g_free (priv->deferred_connection_path);
priv->deferred_connection_path = NULL;
if (priv->deferred_connection_id) {
NMManager *manager = nm_manager_get ();
g_signal_handler_disconnect (manager, priv->deferred_connection_id);
g_object_unref (manager);
priv->deferred_connection_id = 0;
}
if (priv->deferred_timeout_id) {
g_source_remove (priv->deferred_timeout_id);
priv->deferred_timeout_id = 0;
}
}
static void
dispose (GObject *object)
{
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
clear_deferred_stuff (NM_ACT_REQUEST (object));
if (priv->connection) {
DBusGProxy *proxy;
......@@ -112,8 +83,6 @@ finalize (GObject *object)
{
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
g_free (priv->deferred_service_name);
g_free (priv->deferred_connection_path);
g_free (priv->specific_object);
G_OBJECT_CLASS (nm_act_request_parent_class)->finalize (object);
......@@ -149,26 +118,6 @@ nm_act_request_class_init (NMActRequestClass *req_class)
nm_marshal_VOID__OBJECT_STRING,
G_TYPE_NONE, 2,
G_TYPE_OBJECT, G_TYPE_STRING);
signals[DEFERRED_ACTIVATION_TIMEOUT] =
g_signal_new ("deferred-activation-timeout",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMActRequestClass, deferred_activation_timeout),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0,
G_TYPE_NONE);
signals[DEFERRED_ACTIVATION_START] =
g_signal_new ("deferred-activation-start",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (NMActRequestClass, deferred_activation_start),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0,
G_TYPE_NONE);
}
NMActRequest *
......@@ -195,106 +144,6 @@ nm_act_request_new (NMConnection *connection,
return NM_ACT_REQUEST (obj);
}
static gboolean
deferred_timeout_cb (gpointer data)
{
NMActRequest *self = NM_ACT_REQUEST (data);
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (self);
priv->deferred_timeout_id = 0;
clear_deferred_stuff (self);
g_signal_emit (self, signals[DEFERRED_ACTIVATION_TIMEOUT], 0);
return FALSE;
}
static void
connection_added_cb (NMManager *manager,
NMConnection *connection,
gpointer user_data)
{
NMActRequest *self;
NMActRequestPrivate *priv;
const char *service_name;
const char *path;
g_return_if_fail (NM_IS_ACT_REQUEST (user_data));
g_return_if_fail (NM_IS_CONNECTION (connection));
g_return_if_fail (NM_IS_MANAGER (manager));
self = NM_ACT_REQUEST (user_data);
service_name = nm_manager_get_connection_service_name (manager, connection);
path = nm_manager_get_connection_dbus_path (manager, connection);
if (!service_name || !path) {
nm_warning ("Couldn't get connection service name or path (%s, %s)",
service_name, path);
return;
}
priv = NM_ACT_REQUEST_GET_PRIVATE (self);
if ( strcmp (service_name, priv->deferred_service_name)
|| strcmp (path, priv->deferred_connection_path))
return;
clear_deferred_stuff (self);
priv->connection = g_object_ref (connection);
g_signal_emit (self, signals[DEFERRED_ACTIVATION_START], 0);
}
NMActRequest *
nm_act_request_new_deferred (const char *service_name,
const char *connection_path,
const char *specific_object,
gboolean user_requested)
{
GObject *obj;
NMManager *manager;
NMActRequestPrivate *priv;
gulong id;
g_return_val_if_fail (service_name != NULL, NULL);
g_return_val_if_fail (connection_path != NULL, NULL);
obj = g_object_new (NM_TYPE_ACT_REQUEST, NULL);
if (!obj)
return NULL;
priv = NM_ACT_REQUEST_GET_PRIVATE (obj);
priv->deferred_service_name = g_strdup (service_name);
priv->deferred_connection_path = g_strdup (connection_path);
priv->user_requested = user_requested;
if (specific_object)
priv->specific_object = g_strdup (specific_object);
id = g_timeout_add (5000, deferred_timeout_cb, NM_ACT_REQUEST (obj));
priv->deferred_timeout_id = id;
manager = nm_manager_get ();
id = g_signal_connect (manager,
"connection-added",
G_CALLBACK (connection_added_cb),
NM_ACT_REQUEST (obj));
priv->deferred_connection_id = id;
g_object_unref (manager);
return NM_ACT_REQUEST (obj);
}
gboolean
nm_act_request_is_deferred (NMActRequest *req)
{
NMActRequestPrivate *priv;
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
priv = NM_ACT_REQUEST_GET_PRIVATE (req);
return priv->deferred_connection_path ? TRUE : FALSE;
}
typedef struct GetSecretsInfo {
NMActRequest *req;
char *setting_name;
......
......@@ -47,8 +47,6 @@ typedef struct {
void (*connection_secrets_failed) (NMActRequest *req,
NMConnection *connection,
const char * setting);
void (*deferred_activation_timeout) (NMActRequest *req);
void (*deferred_activation_start) (NMActRequest *req);
} NMActRequestClass;
GType nm_act_request_get_type (void);
......@@ -57,13 +55,6 @@ NMActRequest *nm_act_request_new (NMConnection *connection,
const char *specific_object,
gboolean user_requested);
NMActRequest *nm_act_request_new_deferred (const char *service_name,
const char *connection_path,
const char *specific_object,
gboolean user_requested);
gboolean nm_act_request_is_deferred (NMActRequest *req);
NMConnection *nm_act_request_get_connection (NMActRequest *req);
gboolean nm_act_request_request_connection_secrets (NMActRequest *req,
const char *setting_name,
......
......@@ -4,12 +4,6 @@
#include "nm-ip4-config.h"
#include "nm-utils.h"
static gboolean impl_device_activate (NMDeviceInterface *device,
const char *service_name,
const char *connection_path,
const char *specific_object,
GError **err);
static gboolean impl_device_deactivate (NMDeviceInterface *device, GError **err);
#include "nm-device-interface-glue.h"
......@@ -186,27 +180,6 @@ nm_device_interface_get_type (void)
return device_interface_type;
}
/* Pass _either_ connection_path or connection. Passing 'connection' is
* meant for internal use only.
*/
void
nm_device_interface_activate (NMDeviceInterface *device,
const char *service_name,
const char *connection_path,
NMConnection *connection,
const char *specific_object,
gboolean user_requested)
{
g_return_if_fail (NM_IS_DEVICE_INTERFACE (device));
NM_DEVICE_INTERFACE_GET_INTERFACE (device)->activate (device,
service_name,
connection_path,
connection,
specific_object,
user_requested);
}
/* FIXME: This should be public and nm_device_get_iface() should be removed. */
static const char *
nm_device_interface_get_iface (NMDeviceInterface *device)
......@@ -220,21 +193,15 @@ nm_device_interface_get_iface (NMDeviceInterface *device)
return iface;
}
static gboolean
impl_device_activate (NMDeviceInterface *device,
const char *service_name,
const char *connection_path,
const char *specific_object,
GError **err)
gboolean
nm_device_interface_activate (NMDeviceInterface *device,
NMActRequest *req)
{
nm_info ("User request for activation of %s.", nm_device_interface_get_iface (device));
nm_device_interface_activate (device,
service_name,
connection_path,
NULL,
specific_object,
TRUE);
return TRUE;
g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
nm_info ("Activating device %s", nm_device_interface_get_iface (device));
return NM_DEVICE_INTERFACE_GET_INTERFACE (device)->activate (device, req);
}
void
......
......@@ -5,6 +5,7 @@
#include <glib-object.h>
#include "NetworkManager.h"
#include "nm-connection.h"
#include "nm-activation-request.h"
#define NM_TYPE_DEVICE_INTERFACE (nm_device_interface_get_type ())
#define NM_DEVICE_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_INTERFACE, NMDeviceInterface))
......@@ -52,12 +53,9 @@ struct _NMDeviceInterface {
GTypeInterface g_iface;
/* Methods */
void (*activate) (NMDeviceInterface *device,
const char *service_name,
const char *connection_path,
NMConnection *connection,
const char *specific_object,
gboolean user_requested);
gboolean (*activate) (NMDeviceInterface *device,
NMActRequest *req);
void (*deactivate) (NMDeviceInterface *device);
/* Signals */
......@@ -70,12 +68,8 @@ GType nm_device_interface_error_get_type (void);
GType nm_device_interface_get_type (void);
void nm_device_interface_activate (NMDeviceInterface *device,
const char *service_name,
const char *connection_path,
NMConnection *connection,
const char *specific_object,
gboolean user_requested);
gboolean nm_device_interface_activate (NMDeviceInterface *device,
NMActRequest *req);
void nm_device_interface_deactivate (NMDeviceInterface *device);
......
/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
/* NetworkManager -- Network link manager
*
* Dan Williams <dcbw@redhat.com>
......@@ -69,8 +70,6 @@ struct _NMDevicePrivate
struct in6_addr ip6_address;
NMActRequest * act_request;
gulong act_deferred_timeout_id;
gulong act_deferred_start_id;
guint act_source_id;
gulong secrets_updated_id;
gulong secrets_failed_id;
......@@ -83,12 +82,8 @@ struct _NMDevicePrivate
gulong dhcp_timeout_sigid;
};
static void nm_device_activate (NMDeviceInterface *device,
const char *service_name,
const char *connection_path,
NMConnection *connection,
const char *specific_object,