~ubuntu-branches/ubuntu/precise/gnome-bluetooth/precise-updates

« back to all changes in this revision

Viewing changes to common/bluetooth-killswitch.h

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-08-05 13:34:38 UTC
  • mto: (2.2.1 experimental) (1.4.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090805133438-791u4ywsppj71d9y
Tags: upstream-2.27.8
ImportĀ upstreamĀ versionĀ 2.27.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *
3
 
 *  BlueZ - Bluetooth protocol stack for Linux
4
 
 *
5
 
 *  Copyright (C) 2005-2008  Marcel Holtmann <marcel@holtmann.org>
6
 
 *  Copyright (C) 2006-2009  Bastien Nocera <hadess@hadess.net>
7
 
 *
8
 
 *
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.
13
 
 *
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.
18
 
 *
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
22
 
 *
23
 
 */
24
 
 
25
 
#ifndef __BLUETOOTH_KILLSWITCH_H
26
 
#define __BLUETOOTH_KILLSWITCH_H
27
 
 
28
 
#include <glib-object.h>
29
 
 
30
 
G_BEGIN_DECLS
31
 
 
32
 
typedef enum {
33
 
        KILLSWITCH_STATE_UNKNOWN = -1,
34
 
        KILLSWITCH_STATE_SOFT_BLOCKED = 0,
35
 
        KILLSWITCH_STATE_UNBLOCKED,
36
 
        KILLSWITCH_STATE_MIXED,
37
 
} KillswitchState;
38
 
 
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))
50
 
 
51
 
typedef struct _BluetoothKillswitch BluetoothKillswitch;
52
 
typedef struct _BluetoothKillswitchClass BluetoothKillswitchClass;
53
 
 
54
 
struct _BluetoothKillswitch {
55
 
        GObject parent;
56
 
};
57
 
 
58
 
struct _BluetoothKillswitchClass {
59
 
        GObjectClass parent_class;
60
 
 
61
 
        void (*state_changed) (BluetoothKillswitch *killswitch, KillswitchState state);
62
 
};
63
 
 
64
 
GType bluetooth_killswitch_get_type(void);
65
 
 
66
 
BluetoothKillswitch * bluetooth_killswitch_new (void);
67
 
 
68
 
gboolean bluetooth_killswitch_has_killswitches (BluetoothKillswitch *killswitch);
69
 
 
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);
73
 
 
74
 
G_END_DECLS
75
 
 
76
 
#endif /* __BLUETOOTH_KILLSWITCH_H */