![]() |
![]() |
![]() |
gnome-bluetooth Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <bluetooth-client.h> #define BLUETOOTH_GET_CLIENT_CLASS (obj) struct BluetoothClient; BluetoothClient * bluetooth_client_new (void
); GtkTreeModel * bluetooth_client_get_model (BluetoothClient *client
); GtkTreeModel * bluetooth_client_get_filter_model (BluetoothClient *client
,GtkTreeModelFilterVisibleFunc func
,gpointer data
,GDestroyNotify destroy
); GtkTreeModel * bluetooth_client_get_adapter_model (BluetoothClient *client
); GtkTreeModel * bluetooth_client_get_device_model (BluetoothClient *client
); const gchar * bluetooth_type_to_string (guint type
); gboolean bluetooth_verify_address (const char *bdaddr
); const char * bluetooth_uuid_to_string (const char *uuid
);
The BluetoothClient object is used to query the state of Bluetooth devices and adapters.
BluetoothClient * bluetooth_client_new (void
);
Returns a reference to the BluetoothClient singleton. Use #g_object_unref()
the object when done.
Returns : |
a BluetoothClient object. [transfer full] |
GtkTreeModel * bluetooth_client_get_model (BluetoothClient *client
);
Returns an unfiltered GtkTreeModel representing the adapter and devices available on the system.
|
a BluetoothClient object |
Returns : |
a GtkTreeModel object. [transfer full] |
GtkTreeModel * bluetooth_client_get_filter_model (BluetoothClient *client
,GtkTreeModelFilterVisibleFunc func
,gpointer data
,GDestroyNotify destroy
);
Returns a GtkTreeModelFilter of devices filtered using the func
, data
and destroy
arguments to pass to gtk_tree_model_filter_set_visible_func()
.
|
a BluetoothClient object |
|
a GtkTreeModelFilterVisibleFunc |
|
user data to pass to gtk_tree_model_filter_set_visible_func()
|
|
a destroy function for gtk_tree_model_filter_set_visible_func()
|
Returns : |
a GtkTreeModel object. [transfer full] |
GtkTreeModel * bluetooth_client_get_adapter_model (BluetoothClient *client
);
Returns a GtkTreeModelFilter with only adapters present.
|
a BluetoothClient object |
Returns : |
a GtkTreeModel object. [transfer full] |
GtkTreeModel * bluetooth_client_get_device_model (BluetoothClient *client
);
Returns a GtkTreeModelFilter with only devices belonging to the default adapter listed. Note that the model will follow a specific adapter, and will not follow the default adapter. Also note that due to the way GtkTreeModelFilter works, you will probably want to monitor signals on the "child-model" GtkTreeModel to monitor for changes.
|
a BluetoothClient object |
Returns : |
a GtkTreeModel object. [transfer full] |
const gchar * bluetooth_type_to_string (guint type
);
Returns the string representation of the type
passed. Do not free the return value.
|
a BluetoothType |
Returns : |
a string. |
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.
|
a string representing a Bluetooth address |
Returns : |
TRUE if the address is valid, FALSE if not. |