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) 2007 - 2008 Novell, Inc.
19 * Copyright (C) 2007 - 2013 Red Hat, Inc.
23 #include "nm-default.h"
25 #ifndef __NETWORKMANAGER_RFKILL_MANAGER_H__
26 #define __NETWORKMANAGER_RFKILL_MANAGER_H__
28 typedef enum { /*< skip >*/
30 RFKILL_SOFT_BLOCKED = 1,
31 RFKILL_HARD_BLOCKED = 2
34 typedef enum { /*< skip >*/
38 /* UNKNOWN and MAX should always be 1 more than
39 * the last rfkill type since RFKILL_TYPE_MAX is
40 * used as an array size.
42 RFKILL_TYPE_UNKNOWN, /* KEEP LAST */
43 RFKILL_TYPE_MAX = RFKILL_TYPE_UNKNOWN
47 #define NM_TYPE_RFKILL_MANAGER (nm_rfkill_manager_get_type ())
48 #define NM_RFKILL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_RFKILL_MANAGER, NMRfkillManager))
49 #define NM_RFKILL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_RFKILL_MANAGER, NMRfkillManagerClass))
50 #define NM_IS_RFKILL_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_RFKILL_MANAGER))
51 #define NM_IS_RFKILL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_RFKILL_MANAGER))
52 #define NM_RFKILL_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_RFKILL_MANAGER, NMRfkillManagerClass))
54 struct _NMRfkillManager {
62 void (*rfkill_changed) (NMRfkillManager *manager, RfKillType rtype, RfKillState state);
63 } NMRfkillManagerClass;
65 GType nm_rfkill_manager_get_type (void);
67 NMRfkillManager *nm_rfkill_manager_new (void);
69 RfKillState nm_rfkill_manager_get_rfkill_state (NMRfkillManager *manager, RfKillType rtype);
71 #endif /* NM_RFKILL_MANAGER_H */