2020-09-29 16:42:22 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2019-09-25 13:13:40 +02:00
|
|
|
/*
|
2011-10-07 15:58:08 +02:00
|
|
|
* Copyright (C) 2011 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#ifndef __NETWORKMANAGER_FIREWALL_MANAGER_H__
|
|
|
|
|
#define __NETWORKMANAGER_FIREWALL_MANAGER_H__
|
2011-10-07 15:58:08 +02:00
|
|
|
|
2016-09-29 13:49:01 +02:00
|
|
|
#define NM_TYPE_FIREWALL_MANAGER (nm_firewall_manager_get_type())
|
|
|
|
|
#define NM_FIREWALL_MANAGER(obj) \
|
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_FIREWALL_MANAGER, NMFirewallManager))
|
|
|
|
|
#define NM_FIREWALL_MANAGER_CLASS(klass) \
|
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_FIREWALL_MANAGER, NMFirewallManagerClass))
|
|
|
|
|
#define NM_IS_FIREWALL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_FIREWALL_MANAGER))
|
|
|
|
|
#define NM_IS_FIREWALL_MANAGER_CLASS(klass) \
|
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_FIREWALL_MANAGER))
|
|
|
|
|
#define NM_FIREWALL_MANAGER_GET_CLASS(obj) \
|
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_FIREWALL_MANAGER, NMFirewallManagerClass))
|
2011-10-07 15:58:08 +02:00
|
|
|
|
2017-04-20 18:30:01 +02:00
|
|
|
#define NM_FIREWALL_MANAGER_STATE_CHANGED "state-changed"
|
2016-04-04 16:03:13 +02:00
|
|
|
|
2019-08-03 14:20:40 +02:00
|
|
|
typedef struct _NMFirewallManagerCallId NMFirewallManagerCallId;
|
2014-11-12 15:27:35 +01:00
|
|
|
|
2016-09-29 13:49:01 +02:00
|
|
|
typedef struct _NMFirewallManager NMFirewallManager;
|
|
|
|
|
typedef struct _NMFirewallManagerClass NMFirewallManagerClass;
|
2011-10-07 15:58:08 +02:00
|
|
|
|
|
|
|
|
GType nm_firewall_manager_get_type(void);
|
|
|
|
|
|
|
|
|
|
NMFirewallManager *nm_firewall_manager_get(void);
|
|
|
|
|
|
2017-04-20 18:30:01 +02:00
|
|
|
gboolean nm_firewall_manager_get_running(NMFirewallManager *self);
|
|
|
|
|
|
2015-09-23 17:05:02 +02:00
|
|
|
typedef void (*NMFirewallManagerAddRemoveCallback)(NMFirewallManager * self,
|
2019-08-03 14:20:40 +02:00
|
|
|
NMFirewallManagerCallId *call_id,
|
2015-09-23 17:05:02 +02:00
|
|
|
GError * error,
|
|
|
|
|
gpointer user_data);
|
2011-10-07 15:58:08 +02:00
|
|
|
|
2019-08-03 14:20:40 +02:00
|
|
|
NMFirewallManagerCallId *
|
|
|
|
|
nm_firewall_manager_add_or_change_zone(NMFirewallManager * mgr,
|
|
|
|
|
const char * iface,
|
|
|
|
|
const char * zone,
|
|
|
|
|
gboolean add,
|
|
|
|
|
NMFirewallManagerAddRemoveCallback callback,
|
|
|
|
|
gpointer user_data);
|
|
|
|
|
NMFirewallManagerCallId *
|
|
|
|
|
nm_firewall_manager_remove_from_zone(NMFirewallManager * mgr,
|
|
|
|
|
const char * iface,
|
|
|
|
|
const char * zone,
|
|
|
|
|
NMFirewallManagerAddRemoveCallback callback,
|
|
|
|
|
gpointer user_data);
|
|
|
|
|
|
|
|
|
|
void nm_firewall_manager_cancel_call(NMFirewallManagerCallId *call_id);
|
2011-10-07 15:58:08 +02:00
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#endif /* __NETWORKMANAGER_FIREWALL_MANAGER_H__ */
|