device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-glib / nm-ip4-config.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the
15  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301 USA.
17  *
18  * Copyright 2007 - 2008 Novell, Inc.
19  * Copyright 2008 Red Hat, Inc.
20  */
21
22 #ifndef NM_IP4_CONFIG_H
23 #define NM_IP4_CONFIG_H
24
25 #include <glib.h>
26 #include <glib-object.h>
27 #include <dbus/dbus-glib.h>
28 #include "nm-object.h"
29
30 G_BEGIN_DECLS
31
32 #define NM_TYPE_IP4_CONFIG            (nm_ip4_config_get_type ())
33 #define NM_IP4_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP4_CONFIG, NMIP4Config))
34 #define NM_IP4_CONFIG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
35 #define NM_IS_IP4_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP4_CONFIG))
36 #define NM_IS_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP4_CONFIG))
37 #define NM_IP4_CONFIG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
38
39 typedef struct {
40         NMObject parent;
41 } NMIP4Config;
42
43 typedef struct {
44         NMObjectClass parent;
45
46         /* Padding for future expansion */
47         void (*_reserved1) (void);
48         void (*_reserved2) (void);
49         void (*_reserved3) (void);
50         void (*_reserved4) (void);
51         void (*_reserved5) (void);
52         void (*_reserved6) (void);
53 } NMIP4ConfigClass;
54
55 #define NM_IP4_CONFIG_GATEWAY "gateway"
56 #define NM_IP4_CONFIG_ADDRESSES "addresses"
57 #define NM_IP4_CONFIG_ROUTES "routes"
58 #define NM_IP4_CONFIG_NAMESERVERS "nameservers"
59 #define NM_IP4_CONFIG_DOMAINS "domains"
60 #define NM_IP4_CONFIG_SEARCHES "searches"
61 #define NM_IP4_CONFIG_WINS_SERVERS "wins-servers"
62
63 GType nm_ip4_config_get_type (void);
64
65 GObject *nm_ip4_config_new (DBusGConnection *connection, const char *object_path);
66
67 NM_AVAILABLE_IN_0_9_10
68 const char *     nm_ip4_config_get_gateway      (NMIP4Config *config);
69 const GSList *   nm_ip4_config_get_addresses    (NMIP4Config *config);
70 const GSList *   nm_ip4_config_get_routes       (NMIP4Config *config);
71 const GArray *   nm_ip4_config_get_nameservers  (NMIP4Config *config);
72 const GPtrArray *nm_ip4_config_get_domains      (NMIP4Config *config);
73 NM_AVAILABLE_IN_0_9_10
74 const GPtrArray *nm_ip4_config_get_searches     (NMIP4Config *config);
75 const GArray *   nm_ip4_config_get_wins_servers (NMIP4Config *config);
76
77 G_END_DECLS
78
79 #endif /* NM_IP4_CONFIG_H */