[gnome-bluetooth] lib: Add helper function for killswitch state to string
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Add helper function for killswitch state to string
- Date: Fri, 4 Mar 2011 14:14:19 +0000 (UTC)
commit 668f1a6a4bac56e134a097d4c8c678960f475b88
Author: Bastien Nocera <hadess hadess net>
Date: Fri Mar 4 14:09:54 2011 +0000
lib: Add helper function for killswitch state to string
lib/bluetooth-killswitch.c | 9 +++++++++
lib/bluetooth-killswitch.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/lib/bluetooth-killswitch.c b/lib/bluetooth-killswitch.c
index 6e9b584..1229271 100644
--- a/lib/bluetooth-killswitch.c
+++ b/lib/bluetooth-killswitch.c
@@ -106,6 +106,15 @@ state_to_string (KillswitchState state)
}
}
+const char *
+bluetooth_killswitch_state_to_string (KillswitchState state)
+{
+ g_return_val_if_fail (state >= KILLSWITCH_STATE_NO_ADAPTER, NULL);
+ g_return_val_if_fail (state <= KILLSWITCH_STATE_HARD_BLOCKED, NULL);
+
+ return state_to_string (state);
+}
+
static void
update_killswitch (BluetoothKillswitch *killswitch,
guint index, guint soft, guint hard)
diff --git a/lib/bluetooth-killswitch.h b/lib/bluetooth-killswitch.h
index e97e011..d718fbf 100644
--- a/lib/bluetooth-killswitch.h
+++ b/lib/bluetooth-killswitch.h
@@ -70,6 +70,7 @@ BluetoothKillswitch * bluetooth_killswitch_new (void);
gboolean bluetooth_killswitch_has_killswitches (BluetoothKillswitch *killswitch);
void bluetooth_killswitch_set_state (BluetoothKillswitch *killswitch, KillswitchState state);
KillswitchState bluetooth_killswitch_get_state (BluetoothKillswitch *killswitch);
+const char *bluetooth_killswitch_state_to_string (KillswitchState state);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]