[gnome-shell/wip/hadess/import-gnome-bluetooth: 7/7] bluetooth: Remove unused shell_bluetooth_type_to_filter_string()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/hadess/import-gnome-bluetooth: 7/7] bluetooth: Remove unused shell_bluetooth_type_to_filter_string()
- Date: Tue, 2 Nov 2021 14:26:04 +0000 (UTC)
commit b1056726ed2b7d2a6970750bf6fc28c669f4fda7
Author: Bastien Nocera <hadess hadess net>
Date: Tue Nov 2 15:25:12 2021 +0100
bluetooth: Remove unused shell_bluetooth_type_to_filter_string()
src/shell-bluetooth-utils.c | 54 ---------------------------------------------
src/shell-bluetooth-utils.h | 2 --
2 files changed, 56 deletions(-)
---
diff --git a/src/shell-bluetooth-utils.c b/src/shell-bluetooth-utils.c
index 7d3d40b787..7bd2417180 100644
--- a/src/shell-bluetooth-utils.c
+++ b/src/shell-bluetooth-utils.c
@@ -97,60 +97,6 @@ shell_bluetooth_type_to_string (ShellBluetoothType type)
return _("Unknown");
}
-/**
- * shell_bluetooth_type_to_filter_string:
- * @type: a #ShellBluetoothType
- *
- * Returns a human-readable string representation of @type usable for display to users,
- * when type filters are displayed. Do not free the return value.
- * The returned string is already translated with gettext().
- *
- * Return value: a string.
- **/
-const gchar *
-shell_bluetooth_type_to_filter_string (ShellBluetoothType type)
-{
- switch (type) {
- case SHELL_BLUETOOTH_TYPE_ANY:
- return _("All types");
- default:
- return shell_bluetooth_type_to_string (type);
- }
-
- g_assert_not_reached ();
-}
-
-/**
- * shell_bluetooth_verify_address:
- * @bdaddr: a string representing a ShellBluetooth address
- *
- * Returns whether the string is a valid ShellBluetooth address. This does not contact the device in any way.
- *
- * Return value: %TRUE if the address is valid, %FALSE if not.
- **/
-gboolean
-shell_bluetooth_verify_address (const char *bdaddr)
-{
- guint i;
-
- g_return_val_if_fail (bdaddr != NULL, FALSE);
-
- if (strlen (bdaddr) != 17)
- return FALSE;
-
- for (i = 0; i < 17; i++) {
- if (((i + 1) % 3) == 0) {
- if (bdaddr[i] != ':')
- return FALSE;
- continue;
- }
- if (g_ascii_isxdigit (bdaddr[i]) == FALSE)
- return FALSE;
- }
-
- return TRUE;
-}
-
/**
* shell_bluetooth_class_to_type:
* @class: a ShellBluetooth device class
diff --git a/src/shell-bluetooth-utils.h b/src/shell-bluetooth-utils.h
index 5a81c2a554..4c9d6ac193 100644
--- a/src/shell-bluetooth-utils.h
+++ b/src/shell-bluetooth-utils.h
@@ -60,6 +60,4 @@
ShellBluetoothType shell_bluetooth_class_to_type (guint32 class);
ShellBluetoothType shell_bluetooth_appearance_to_type (guint16 appearance);
const gchar *shell_bluetooth_type_to_string (guint type);
-const gchar *shell_bluetooth_type_to_filter_string (guint type);
-gboolean shell_bluetooth_verify_address (const char *bdaddr);
const char *shell_bluetooth_uuid_to_string (const char *uuid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]