bluetooth-utils: gnome-bluetooth Reference Manual

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

## Stability Level

Stable, unless otherwise indicated

## Functions

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

## Types and Values

#define | BDADDR_STR_LEN

## 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_appearance_to_type ()

    BluetoothType
    bluetooth_appearance_to_type (guint16 appearance);

Returns the type of device corresponding to the given `appearance` value, as usually found in the GAP service.

#### Parameters

appearance | a Bluetooth device appearance |

#### Returns

a BluetoothType.

### 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_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.

### 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_send_to_address ()

    gboolean
    bluetooth_send_to_address (const char *address,
                               const char *alias,
                               GError **error);

Start a GUI application for transferring files over Bluetooth.

#### Parameters

address | Remote device to use |
alias | Remote device's name |
error | a GError |

#### Returns

`TRUE` on success, `FALSE` on error.

## Types and Values

### BDADDR_STR_LEN

    #define BDADDR_STR_LEN                         17