1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* NetworkManager -- Network link manager
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 of the License, or
7 * (at your option) any later version.
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.
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.
18 * Copyright (C) 2004 - 2012 Red Hat, Inc.
19 * Copyright (C) 2005 - 2008 Novell, Inc.
22 #ifndef __NETWORKMANAGER_DISPATCHER_H__
23 #define __NETWORKMANAGER_DISPATCHER_H__
27 #include "nm-default.h"
28 #include "nm-connection.h"
31 DISPATCHER_ACTION_HOSTNAME,
32 DISPATCHER_ACTION_PRE_UP,
34 DISPATCHER_ACTION_PRE_DOWN,
35 DISPATCHER_ACTION_DOWN,
36 DISPATCHER_ACTION_VPN_PRE_UP,
37 DISPATCHER_ACTION_VPN_UP,
38 DISPATCHER_ACTION_VPN_PRE_DOWN,
39 DISPATCHER_ACTION_VPN_DOWN,
40 DISPATCHER_ACTION_DHCP4_CHANGE,
41 DISPATCHER_ACTION_DHCP6_CHANGE
44 typedef void (*DispatcherFunc) (guint call_id, gpointer user_data);
46 gboolean nm_dispatcher_call (DispatcherAction action,
47 NMSettingsConnection *settings_connection,
48 NMConnection *applied_connection,
50 DispatcherFunc callback,
54 gboolean nm_dispatcher_call_sync (DispatcherAction action,
55 NMSettingsConnection *settings_connection,
56 NMConnection *applied_connection,
59 gboolean nm_dispatcher_call_vpn (DispatcherAction action,
60 NMSettingsConnection *settings_connection,
61 NMConnection *applied_connection,
62 NMDevice *parent_device,
63 const char *vpn_iface,
64 NMIP4Config *vpn_ip4_config,
65 NMIP6Config *vpn_ip6_config,
66 DispatcherFunc callback,
70 gboolean nm_dispatcher_call_vpn_sync (DispatcherAction action,
71 NMSettingsConnection *settings_connection,
72 NMConnection *applied_connection,
73 NMDevice *parent_device,
74 const char *vpn_iface,
75 NMIP4Config *vpn_ip4_config,
76 NMIP6Config *vpn_ip6_config);
78 void nm_dispatcher_call_cancel (guint call_id);
80 void nm_dispatcher_init (void);
82 #endif /* __NETWORKMANAGER_DISPATCHER_H__ */