NetworkManager r3645 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3645 - in trunk: . src
- Date: Thu, 8 May 2008 19:13:28 +0100 (BST)
Author: dcbw
Date: Thu May 8 18:13:28 2008
New Revision: 3645
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3645&view=rev
Log:
2008-05-08 Dan Williams <dcbw redhat com>
Patch from Markus Becker <mab comnets uni-bremen de>
* src/nm-gsm-device.c
src/nm-cdma-device.c
- (real_get_best_auto_connection): implement; allow autoconnection
to GSM & CDMA devices
Modified:
trunk/ChangeLog
trunk/src/nm-cdma-device.c
trunk/src/nm-gsm-device.c
Modified: trunk/src/nm-cdma-device.c
==============================================================================
--- trunk/src/nm-cdma-device.c (original)
+++ trunk/src/nm-cdma-device.c Thu May 8 18:13:28 2008
@@ -9,6 +9,7 @@
#include "nm-utils.h"
#include "nm-properties-changed-signal.h"
#include "nm-cdma-device-glue.h"
+#include "nm-setting-connection.h"
G_DEFINE_TYPE (NMCdmaDevice, nm_cdma_device, NM_TYPE_SERIAL_DEVICE)
@@ -203,6 +204,31 @@
return priv->pending_id ? NM_ACT_STAGE_RETURN_POSTPONE : NM_ACT_STAGE_RETURN_FAILURE;
}
+static NMConnection *
+real_get_best_auto_connection (NMDevice *dev,
+ GSList *connections,
+ char **specific_object)
+{
+ GSList *iter;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+ NMSettingConnection *s_con;
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ g_assert (s_con);
+
+ if (!s_con->autoconnect)
+ continue;
+
+ if (strcmp (s_con->type, NM_SETTING_CDMA_SETTING_NAME))
+ continue;
+
+ return connection;
+ }
+ return NULL;
+}
+
static guint32
real_get_generic_capabilities (NMDevice *dev)
{
@@ -453,6 +479,7 @@
object_class->set_property = set_property;
object_class->finalize = finalize;
+ device_class->get_best_auto_connection = real_get_best_auto_connection;
device_class->get_generic_capabilities = real_get_generic_capabilities;
device_class->act_stage1_prepare = real_act_stage1_prepare;
device_class->connection_secrets_updated = real_connection_secrets_updated;
Modified: trunk/src/nm-gsm-device.c
==============================================================================
--- trunk/src/nm-gsm-device.c (original)
+++ trunk/src/nm-gsm-device.c Thu May 8 18:13:28 2008
@@ -9,6 +9,7 @@
#include "nm-utils.h"
#include "nm-properties-changed-signal.h"
#include "nm-gsm-device-glue.h"
+#include "nm-setting-connection.h"
G_DEFINE_TYPE (NMGsmDevice, nm_gsm_device, NM_TYPE_SERIAL_DEVICE)
@@ -515,6 +516,31 @@
return priv->pending_id ? NM_ACT_STAGE_RETURN_POSTPONE : NM_ACT_STAGE_RETURN_FAILURE;
}
+static NMConnection *
+real_get_best_auto_connection (NMDevice *dev,
+ GSList *connections,
+ char **specific_object)
+{
+ GSList *iter;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+ NMSettingConnection *s_con;
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ g_assert (s_con);
+
+ if (!s_con->autoconnect)
+ continue;
+
+ if (strcmp (s_con->type, NM_SETTING_GSM_SETTING_NAME))
+ continue;
+
+ return connection;
+ }
+ return NULL;
+}
+
static guint32
real_get_generic_capabilities (NMDevice *dev)
{
@@ -765,6 +791,7 @@
object_class->set_property = set_property;
object_class->finalize = finalize;
+ device_class->get_best_auto_connection = real_get_best_auto_connection;
device_class->get_generic_capabilities = real_get_generic_capabilities;
device_class->act_stage1_prepare = real_act_stage1_prepare;
device_class->connection_secrets_updated = real_connection_secrets_updated;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]