bluetooth-utils

bluetooth-utils — Bluetooth utility functions

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <bluetooth-utils.h>

BluetoothType       bluetooth_class_to_type             (guint32 class);
void                bluetooth_send_to_address           (const char *address,
                                                         const char *alias);
const gchar *       bluetooth_type_to_string            (guint type);
const char *        bluetooth_uuid_to_string            (const char *uuid);
gboolean            bluetooth_verify_address            (const char *bdaddr);

Description

Those helper functions are used throughout the Bluetooth management utilities.

Details

bluetooth_class_to_type ()

BluetoothType       bluetooth_class_to_type             (guint32 class);

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

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.

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().

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.

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.

bdaddr :

a string representing a Bluetooth address

Returns :

TRUE if the address is valid, FALSE if not.