ipv6: fix incorrect address config signal emission
[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
47         /* addrconf_complete is emitted only during initial configuration to indicate
48          * that the initial configuration is complete.
49          */
50         void (*addrconf_complete) (NMIP6Manager *manager, char *iface, gboolean success);
51
52         /* config_changed gets emitted only *after* initial configuration is
53          * complete; it's like DHCP renew and indicates that the existing config
54          * of the interface has changed.
55          */
56         void (*config_changed)    (NMIP6Manager *manager, char *iface);
57 } NMIP6ManagerClass;
58
59 GType nm_ip6_manager_get_type (void);
60
61 NMIP6Manager *nm_ip6_manager_get                  (void);
62 void          nm_ip6_manager_prepare_interface    (NMIP6Manager *manager,
63                                                                                                    const char *iface,
64                                                                                                    NMSettingIP6Config *s_ip6);
65 void          nm_ip6_manager_begin_addrconf       (NMIP6Manager *manager,
66                                                                                                    const char *iface);
67 void          nm_ip6_manager_cancel_addrconf      (NMIP6Manager *manager,
68                                                                                                    const char *iface);
69
70 NMIP6Config * nm_ip6_manager_get_ip6_config       (NMIP6Manager *manager,
71                                                                                                    const char *iface);
72
73 #endif /* NM_IP6_MANAGER_H */