diff options
| author | Michael Biebl <biebl@debian.org> | 2020-10-05 22:27:18 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-10-05 22:27:18 +0200 |
| commit | aafc1dbe4712c86189bbc1d4d54ad8cb4c69be7e (patch) | |
| tree | a2a9bb4d007339a0b1304540388230ccedac32bd /src/tests/config/nm-test-device.c | |
| parent | e7b44ef4c80907346ec7492a09c45277459924fc (diff) | |
New upstream version 1.27.90 upstream/1.27.90
Diffstat (limited to 'src/tests/config/nm-test-device.c')
| -rw-r--r-- | src/tests/config/nm-test-device.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/src/tests/config/nm-test-device.c b/src/tests/config/nm-test-device.c index 6e59a4aa..e897f68e 100644 --- a/src/tests/config/nm-test-device.c +++ b/src/tests/config/nm-test-device.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright (C) 2013 Red Hat, Inc. */ @@ -13,65 +13,67 @@ /*****************************************************************************/ struct _NMTestDevice { - NMDevice parent; + NMDevice parent; }; struct _NMTestDeviceClass { - NMDeviceClass parent; + NMDeviceClass parent; }; -G_DEFINE_TYPE (NMTestDevice, nm_test_device, NM_TYPE_DEVICE) +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))) +#define PARENT_CLASS (G_OBJECT_CLASS(g_type_class_peek_parent(nm_test_device_parent_class))) /*****************************************************************************/ static NMDeviceCapabilities -get_generic_capabilities (NMDevice *device) +get_generic_capabilities(NMDevice *device) { - return NM_DEVICE_CAP_IS_NON_KERNEL; + return NM_DEVICE_CAP_IS_NON_KERNEL; } /*****************************************************************************/ static void -nm_test_device_init (NMTestDevice *self) -{ -} +nm_test_device_init(NMTestDevice *self) +{} /* We jump over NMDevice's construct/destruct methods, which require NMPlatform * and NMSettings to be initialized. */ static void -constructed (GObject *object) +constructed(GObject *object) { - PARENT_CLASS->constructed (object); + PARENT_CLASS->constructed(object); } static void -dispose (GObject *object) +dispose(GObject *object) { - PARENT_CLASS->dispose (object); + PARENT_CLASS->dispose(object); } NMDevice * -nm_test_device_new (const char *hwaddr) +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, - NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_ETHERNET, - NULL); + return g_object_new(NM_TYPE_TEST_DEVICE, + NM_DEVICE_IFACE, + "dummy", + NM_DEVICE_PERM_HW_ADDRESS, + hwaddr, + NM_DEVICE_DEVICE_TYPE, + NM_DEVICE_TYPE_ETHERNET, + NULL); } static void -nm_test_device_class_init (NMTestDeviceClass *klass) +nm_test_device_class_init(NMTestDeviceClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); - NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); + GObjectClass * object_class = G_OBJECT_CLASS(klass); + NMDeviceClass *device_class = NM_DEVICE_CLASS(klass); - object_class->constructed = constructed; - object_class->dispose = dispose; + object_class->constructed = constructed; + object_class->dispose = dispose; - device_class->get_generic_capabilities = get_generic_capabilities; + device_class->get_generic_capabilities = get_generic_capabilities; } |