Esempio n. 1
0
static void
pan_button_toggled (GtkToggleButton *button, gpointer user_data)
{
	PluginInfo *info = user_data;

	if (gtk_toggle_button_get_active (button) == FALSE) {
		bm_settings_connection_interface_delete (info->pan_connection, delete_cb, NULL);
		info->pan_connection = NULL;
	} else
		info->pan_connection = add_pan_connection (info);
}
void
nma_bt_device_set_pan_enabled (NmaBtDevice *device, gboolean enabled)
{
	NmaBtDevicePrivate *priv = NMA_BT_DEVICE_GET_PRIVATE (device);

	_set_pan_enabled (device, enabled);

	if (enabled) {
		_set_busy (device, TRUE);
		add_pan_connection (device);
	} else
		delete_connections_of_type (priv->settings, priv->bdaddr_array, TRUE);
}