summaryrefslogtreecommitdiff
path: root/libnm-util/nm-setting-wired.h
diff options
context:
space:
mode:
authorTambet Ingo <tambet@gmail.com>2007-11-07 16:06:43 +0000
committerTambet Ingo <tambet@gmail.com>2007-11-07 16:06:43 +0000
commit6b79d40a76a3c8ef516863581fb53b6a0da48ea2 (patch)
tree476dd12e4fd2684405911524903402f5cb2b9b84 /libnm-util/nm-setting-wired.h
parent2682e916bcbebe12a467f92f8910815515f40c55 (diff)
downloadNetworkManager-6b79d40a76a3c8ef516863581fb53b6a0da48ea2.tar.gz
2007-11-07 Tambet Ingo <tambet@gmail.com>
Rework NMSetting structures: Move each setting to it's own file. Convert to GObject. Remove home grown setting types and use GTypes. Use GObject property introspection for hash conversion, enumerating properties, etc. * libnm-util/nm-setting-connection.[ch] * libnm-util/nm-setting-ip4-config.[ch] * libnm-util/nm-setting-ppp.[ch] * libnm-util/nm-setting-vpn.[ch] * libnm-util/nm-setting-vpn-properties.[ch] * libnm-util/nm-setting-wired.[ch] * libnm-util/nm-setting-wireless.[ch] * libnm-util/nm-setting-wireless-security.[ch] New files, each containing a setting. * libnm-util/nm-setting-template.[ch]: A template for creating * new settings. To use it, just replace 'template' with the new setting name, and you're half-way done. * libnm-util/nm-setting.c: Convert to GObject and use GObject introspection instead of internal types and tables. * libnm-util/nm-connection.c: Adapt the new NMSetting work. * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles GValue types defined by dbus-glib for composed types like collections, structures and maps. * src/*: The API of NMSetting and NMConnection changed a bit: * Getting a setting from connection takes the setting type now. Also, since the settings are in multiple files, include relevant settings. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'libnm-util/nm-setting-wired.h')
-rw-r--r--libnm-util/nm-setting-wired.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/libnm-util/nm-setting-wired.h b/libnm-util/nm-setting-wired.h
new file mode 100644
index 0000000000..0cee177539
--- /dev/null
+++ b/libnm-util/nm-setting-wired.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+
+#ifndef NM_SETTING_WIRED_H
+#define NM_SETTING_WIRED_H
+
+#include <nm-setting.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_SETTING_WIRED (nm_setting_wired_get_type ())
+#define NM_SETTING_WIRED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_WIRED, NMSettingWired))
+#define NM_SETTING_WIRED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_WIRED, NMSettingWiredClass))
+#define NM_IS_SETTING_WIRED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_WIRED))
+#define NM_IS_SETTING_WIRED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_SETTING_WIRED))
+#define NM_SETTING_WIRED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_WIRED, NMSettingWiredClass))
+
+#define NM_SETTING_WIRED_SETTING_NAME "802-3-ethernet"
+
+#define NM_SETTING_WIRED_PORT "port"
+#define NM_SETTING_WIRED_SPEED "speed"
+#define NM_SETTING_WIRED_DUPLEX "duplex"
+#define NM_SETTING_WIRED_AUTO_NEGOTIATE "auto-negotiate"
+#define NM_SETTING_WIRED_MAC_ADDRESS "mac-address"
+#define NM_SETTING_WIRED_MTU "mtu"
+
+typedef struct {
+ NMSetting parent;
+
+ char *port;
+ guint32 speed;
+ char *duplex;
+ gboolean auto_negotiate;
+ GByteArray *mac_address;
+ guint32 mtu;
+} NMSettingWired;
+
+typedef struct {
+ NMSettingClass parent;
+} NMSettingWiredClass;
+
+GType nm_setting_wired_get_type (void);
+
+NMSetting *nm_setting_wired_new (void);
+
+G_END_DECLS
+
+#endif /* NM_SETTING_WIRED_H */