## bluetooth-utils bluetooth-utils — Bluetooth utility functions |

## Stability Level

Stable, unless otherwise indicated

## Functions

BluetoothType | bluetooth_class_to_type ()
void | bluetooth_send_to_address ()
const gchar * | bluetooth_type_to_string ()
const char * | bluetooth_uuid_to_string ()
gboolean | bluetooth_verify_address ()

## Includes

    #include <bluetooth-utils.h>

## Description

Those helper functions are used throughout the Bluetooth management utilities.

## Functions

### bluetooth_class_to_type ()

    BluetoothType
    bluetooth_class_to_type (guint32 class);

Returns the type of device corresponding to the given `class` value.

#### Parameters

class | a Bluetooth device class |

#### Returns

a BluetoothType.

### bluetooth_send_to_address ()

    void
    bluetooth_send_to_address (const char *address,
                               const char *alias);

Start a GUI application for transfering files over Bluetooth.

#### Parameters

address | Remote device to use |
alias | Remote device's name |

### bluetooth_type_to_string ()

    const gchar *
    bluetooth_type_to_string (guint type);

Returns a human-readable string representation of `type` usable for display to users. Do not free the return value. The returned string is already translated with `gettext()`.

#### Parameters

type | a BluetoothType |

#### Returns

a string.

### bluetooth_uuid_to_string ()

    const char *
    bluetooth_uuid_to_string (const char *uuid);

Returns a string representing a human-readable (but not usable for display to users) version of the `uuid` . Do not free the return value.

#### Parameters

uuid | a string representing a Bluetooth UUID |

#### Returns

a string.

### bluetooth_verify_address ()

    gboolean
    bluetooth_verify_address (const char *bdaddr);

Returns whether the string is a valid Bluetooth address. This does not contact the device in any way.

#### Parameters

bdaddr | a string representing a Bluetooth address |

#### Returns

`TRUE` if the address is valid, `FALSE` if not.

## Types and Values