summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-wimax.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core/nm-setting-wimax.c')
-rw-r--r--libnm-core/nm-setting-wimax.c101
1 files changed, 55 insertions, 46 deletions
diff --git a/libnm-core/nm-setting-wimax.c b/libnm-core/nm-setting-wimax.c
index f2351c7e99..aa574a56de 100644
--- a/libnm-core/nm-setting-wimax.c
+++ b/libnm-core/nm-setting-wimax.c
@@ -22,10 +22,11 @@
#include "nm-default.h"
+#include "nm-setting-wimax.h"
+
#include <string.h>
#include <net/ethernet.h>
-#include "nm-setting-wimax.h"
#include "nm-setting-private.h"
#include "nm-utils.h"
#include "nm-utils-private.h"
@@ -42,34 +43,23 @@
* connections cannot be activated.
**/
-G_DEFINE_TYPE (NMSettingWimax, nm_setting_wimax, NM_TYPE_SETTING)
+/*****************************************************************************/
-#define NM_SETTING_WIMAX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_WIMAX, NMSettingWimaxPrivate))
+NM_GOBJECT_PROPERTIES_DEFINE_BASE (
+ PROP_NETWORK_NAME,
+ PROP_MAC_ADDRESS,
+);
typedef struct {
char *network_name;
char *mac_address;
} NMSettingWimaxPrivate;
-NM_GOBJECT_PROPERTIES_DEFINE_BASE (
- PROP_NETWORK_NAME,
- PROP_MAC_ADDRESS,
-);
+G_DEFINE_TYPE (NMSettingWimax, nm_setting_wimax, NM_TYPE_SETTING)
-/**
- * nm_setting_wimax_new:
- *
- * Creates a new #NMSettingWimax object with default values.
- *
- * Returns: the new empty #NMSettingWimax object
- *
- * Deprecated: 1.2: WiMAX is no longer supported.
- **/
-NMSetting *
-nm_setting_wimax_new (void)
-{
- return (NMSetting *) g_object_new (NM_TYPE_SETTING_WIMAX, NULL);
-}
+#define NM_SETTING_WIMAX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_WIMAX, NMSettingWimaxPrivate))
+
+/*****************************************************************************/
/**
* nm_setting_wimax_get_network_name:
@@ -144,20 +134,25 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
return TRUE;
}
-static void
-nm_setting_wimax_init (NMSettingWimax *setting)
-{
-}
+/*****************************************************************************/
static void
-finalize (GObject *object)
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
{
- NMSettingWimaxPrivate *priv = NM_SETTING_WIMAX_GET_PRIVATE (object);
-
- g_free (priv->network_name);
- g_free (priv->mac_address);
+ NMSettingWimax *setting = NM_SETTING_WIMAX (object);
- G_OBJECT_CLASS (nm_setting_wimax_parent_class)->finalize (object);
+ switch (prop_id) {
+ case PROP_NETWORK_NAME:
+ g_value_set_string (value, nm_setting_wimax_get_network_name (setting));
+ break;
+ case PROP_MAC_ADDRESS:
+ g_value_set_string (value, nm_setting_wimax_get_mac_address (setting));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
}
static void
@@ -182,23 +177,37 @@ set_property (GObject *object, guint prop_id,
}
}
+/*****************************************************************************/
+
static void
-get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
+nm_setting_wimax_init (NMSettingWimax *setting)
{
- NMSettingWimax *setting = NM_SETTING_WIMAX (object);
+}
- switch (prop_id) {
- case PROP_NETWORK_NAME:
- g_value_set_string (value, nm_setting_wimax_get_network_name (setting));
- break;
- case PROP_MAC_ADDRESS:
- g_value_set_string (value, nm_setting_wimax_get_mac_address (setting));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
+/**
+ * nm_setting_wimax_new:
+ *
+ * Creates a new #NMSettingWimax object with default values.
+ *
+ * Returns: the new empty #NMSettingWimax object
+ *
+ * Deprecated: 1.2: WiMAX is no longer supported.
+ **/
+NMSetting *
+nm_setting_wimax_new (void)
+{
+ return (NMSetting *) g_object_new (NM_TYPE_SETTING_WIMAX, NULL);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMSettingWimaxPrivate *priv = NM_SETTING_WIMAX_GET_PRIVATE (object);
+
+ g_free (priv->network_name);
+ g_free (priv->mac_address);
+
+ G_OBJECT_CLASS (nm_setting_wimax_parent_class)->finalize (object);
}
static void
@@ -210,8 +219,8 @@ nm_setting_wimax_class_init (NMSettingWimaxClass *klass)
g_type_class_add_private (klass, sizeof (NMSettingWimaxPrivate));
- object_class->set_property = set_property;
object_class->get_property = get_property;
+ object_class->set_property = set_property;
object_class->finalize = finalize;
setting_class->verify = verify;