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 - 2010 Red Hat, Inc.
19 * Copyright (C) 2007 - 2008 Novell, Inc.
22 #ifndef __NETWORKMANAGER_POLICY_H__
23 #define __NETWORKMANAGER_POLICY_H__
25 #include "nm-default.h"
27 #define NM_TYPE_POLICY (nm_policy_get_type ())
28 #define NM_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_POLICY, NMPolicy))
29 #define NM_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_POLICY, NMPolicyClass))
30 #define NM_IS_POLICY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_POLICY))
31 #define NM_IS_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_POLICY))
32 #define NM_POLICY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_POLICY, NMPolicyClass))
34 #define NM_POLICY_MANAGER "manager"
35 #define NM_POLICY_SETTINGS "settings"
36 #define NM_POLICY_DEFAULT_IP4_DEVICE "default-ip4-device"
37 #define NM_POLICY_DEFAULT_IP6_DEVICE "default-ip6-device"
38 #define NM_POLICY_ACTIVATING_IP4_DEVICE "activating-ip4-device"
39 #define NM_POLICY_ACTIVATING_IP6_DEVICE "activating-ip6-device"
50 GType nm_policy_get_type (void);
52 NMPolicy *nm_policy_new (NMManager *manager, NMSettings *settings);
54 NMDevice *nm_policy_get_default_ip4_device (NMPolicy *policy);
55 NMDevice *nm_policy_get_default_ip6_device (NMPolicy *policy);
56 NMDevice *nm_policy_get_activating_ip4_device (NMPolicy *policy);
57 NMDevice *nm_policy_get_activating_ip6_device (NMPolicy *policy);
59 #endif /* __NETWORKMANAGER_POLICY_H__ */