diff options
Diffstat (limited to 'src/tests/config/nm-test-device.c')
| -rw-r--r-- | src/tests/config/nm-test-device.c | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/src/tests/config/nm-test-device.c b/src/tests/config/nm-test-device.c index 1ae964ee..3ec866f5 100644 --- a/src/tests/config/nm-test-device.c +++ b/src/tests/config/nm-test-device.c @@ -20,16 +20,37 @@ #include "nm-default.h" +#include "nm-test-device.h" + #include <string.h> -#include "nm-test-device.h" -#include "nm-device-private.h" +#include "devices/nm-device-private.h" #include "nm-utils.h" +/*****************************************************************************/ + +struct _NMTestDevice { + NMDevice parent; +}; + +struct _NMTestDeviceClass { + NMDeviceClass parent; +}; + G_DEFINE_TYPE (NMTestDevice, nm_test_device, NM_TYPE_DEVICE) #define PARENT_CLASS (G_OBJECT_CLASS (g_type_class_peek_parent (nm_test_device_parent_class))) +/*****************************************************************************/ + +static NMDeviceCapabilities +get_generic_capabilities (NMDevice *device) +{ + return NM_DEVICE_CAP_IS_NON_KERNEL; +} + +/*****************************************************************************/ + static void nm_test_device_init (NMTestDevice *self) { @@ -50,10 +71,13 @@ dispose (GObject *object) PARENT_CLASS->dispose (object); } -static NMDeviceCapabilities -get_generic_capabilities (NMDevice *device) +NMDevice * +nm_test_device_new (const char *hwaddr) { - return NM_DEVICE_CAP_IS_NON_KERNEL; + return g_object_new (NM_TYPE_TEST_DEVICE, + NM_DEVICE_IFACE, "dummy", + NM_DEVICE_PERM_HW_ADDRESS, hwaddr, + NULL); } static void @@ -67,12 +91,3 @@ nm_test_device_class_init (NMTestDeviceClass *klass) device_class->get_generic_capabilities = get_generic_capabilities; } - -NMDevice * -nm_test_device_new (const char *hwaddr) -{ - return g_object_new (NM_TYPE_TEST_DEVICE, - NM_DEVICE_IFACE, "dummy", - NM_DEVICE_PERM_HW_ADDRESS, hwaddr, - NULL); -} |