3
* BlueZ - Bluetooth protocol stack for Linux
5
* Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>
6
* Copyright (C) 2006-2009 Bastien Nocera <hadess@hadess.net>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
#ifndef __BLUETOOTH_KILLSWITCH_H
26
#define __BLUETOOTH_KILLSWITCH_H
28
#include <glib-object.h>
33
KILLSWITCH_STATE_UNKNOWN = -1,
34
KILLSWITCH_STATE_SOFT_BLOCKED = 0,
35
KILLSWITCH_STATE_UNBLOCKED,
36
KILLSWITCH_STATE_MIXED,
39
#define BLUETOOTH_TYPE_KILLSWITCH (bluetooth_killswitch_get_type())
40
#define BLUETOOTH_KILLSWITCH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
41
BLUETOOTH_TYPE_KILLSWITCH, BluetoothKillswitch))
42
#define BLUETOOTH_KILLSWITCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
43
BLUETOOTH_TYPE_KILLSWITCH, BluetoothKillswitchClass))
44
#define BLUETOOTH_IS_KILLSWITCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
45
BLUETOOTH_TYPE_KILLSWITCH))
46
#define BLUETOOTH_IS_KILLSWITCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
47
BLUETOOTH_TYPE_KILLSWITCH))
48
#define BLUETOOTH_GET_KILLSWITCH_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
49
BLUETOOTH_TYPE_KILLSWITCH, BluetoothKillswitchClass))
51
typedef struct _BluetoothKillswitch BluetoothKillswitch;
52
typedef struct _BluetoothKillswitchClass BluetoothKillswitchClass;
54
struct _BluetoothKillswitch {
58
struct _BluetoothKillswitchClass {
59
GObjectClass parent_class;
61
void (*state_changed) (BluetoothKillswitch *killswitch, KillswitchState state);
64
GType bluetooth_killswitch_get_type(void);
66
BluetoothKillswitch * bluetooth_killswitch_new (void);
68
gboolean bluetooth_killswitch_has_killswitches (BluetoothKillswitch *killswitch);
70
void bluetooth_killswitch_update_state (BluetoothKillswitch *killswitch);
71
void bluetooth_killswitch_set_state (BluetoothKillswitch *killswitch, KillswitchState state);
72
KillswitchState bluetooth_killswitch_get_state (BluetoothKillswitch *killswitch);
76
#endif /* __BLUETOOTH_KILLSWITCH_H */