device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-core / nm-setting-generic.c
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
3 /*
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301 USA.
18  *
19  * Copyright 2013 Red Hat, Inc.
20  */
21
22 #include "nm-default.h"
23
24 #include "nm-setting-generic.h"
25 #include "nm-setting-private.h"
26
27 /**
28  * SECTION:nm-setting-generic
29  * @short_description: Describes connection properties for generic devices
30  *
31  * The #NMSettingGeneric object is a #NMSetting subclass that describes
32  * optional properties that apply to "generic" devices (ie, devices that
33  * NetworkManager does not specifically recognize).
34  *
35  * There are currently no properties on this object; it exists only to be
36  * the "connection type" setting on #NMConnections for generic devices.
37  **/
38
39 G_DEFINE_TYPE_WITH_CODE (NMSettingGeneric, nm_setting_generic, NM_TYPE_SETTING,
40                          _nm_register_setting (GENERIC, 1))
41 NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_GENERIC)
42
43 #define NM_SETTING_GENERIC_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_GENERIC, NMSettingGenericPrivate))
44
45 typedef struct {
46         int dummy;
47 } NMSettingGenericPrivate;
48
49 /**************************************************************************/
50
51 /**
52  * nm_setting_generic_new:
53  *
54  * Creates a new #NMSettingGeneric object with default values.
55  *
56  * Returns: (transfer full): the new empty #NMSettingGeneric object
57  **/
58 NMSetting *
59 nm_setting_generic_new (void)
60 {
61         return (NMSetting *) g_object_new (NM_TYPE_SETTING_GENERIC, NULL);
62 }
63
64 static void
65 nm_setting_generic_init (NMSettingGeneric *setting)
66 {
67 }
68
69 static void
70 nm_setting_generic_class_init (NMSettingGenericClass *setting_class)
71 {
72         g_type_class_add_private (setting_class, sizeof (NMSettingGenericPrivate));
73 }