2c79a454a14ab35ee233eee571aeac2d460da26c
[NetworkManager.git] / src / ip6-manager / nm-ip6-manager.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* nm-ip6-manager.c - Handle IPv6 address configuration for NetworkManager
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2, or (at your option)
7  * any later version.
8  *
9  * This program 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
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  *
18  * Copyright (C) 2009 Red Hat, Inc.
19  */
20
21 #ifndef NM_IP6_MANAGER_H
22 #define NM_IP6_MANAGER_H
23
24 #include <glib.h>
25 #include <glib-object.h>
26
27 #include <nm-setting-ip6-config.h>
28
29 #include "nm-ip6-config.h"
30
31 #define NM_TYPE_IP6_MANAGER            (nm_ip6_manager_get_type ())
32 #define NM_IP6_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IP6_MANAGER, NMIP6Manager))
33 #define NM_IP6_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IP6_MANAGER, NMIP6ManagerClass))
34 #define NM_IS_IP6_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_IP6_MANAGER))
35 #define NM_IS_IP6_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_IP6_MANAGER))
36 #define NM_IP6_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_MANAGER, NMIP6ManagerClass))
37
38 typedef struct {
39         GObject parent;
40 } NMIP6Manager;
41
42 typedef struct {
43         GObjectClass parent;
44
45         /* Signals */
46         void (*addrconf_complete) (NMIP6Manager *manager, char *iface, gboolean success);
47
48         void (*config_changed)    (NMIP6Manager *manager, char *iface);
49 } NMIP6ManagerClass;
50
51 GType nm_ip6_manager_get_type (void);
52
53 NMIP6Manager *nm_ip6_manager_get                  (void);
54 void          nm_ip6_manager_prepare_interface    (NMIP6Manager *manager,
55                                                                                                    const char *iface,
56                                                                                                    NMSettingIP6Config *s_ip6);
57 void          nm_ip6_manager_begin_addrconf       (NMIP6Manager *manager,
58                                                                                                    const char *iface);
59 void          nm_ip6_manager_cancel_addrconf      (NMIP6Manager *manager,
60                                                                                                    const char *iface);
61
62 NMIP6Config * nm_ip6_manager_get_ip6_config       (NMIP6Manager *manager,
63                                                                                                    const char *iface);
64
65 #endif /* NM_IP6_MANAGER_H */