org.bluez.HealthDevice1 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluez-dbus Show documentation
Show all versions of bluez-dbus Show documentation
Java native bluetooth library which uses bluez via dbus (linux only)
package org.bluez;
import org.bluez.exceptions.BluezHealthErrorException;
import org.bluez.exceptions.BluezInvalidArgumentsException;
import org.bluez.exceptions.BluezNotAllowedException;
import org.bluez.exceptions.BluezNotFoundException;
import org.bluez.exceptions.BluezOutOfRangeException;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.interfaces.DBusInterface;
import org.freedesktop.dbus.interfaces.Properties;
import org.freedesktop.dbus.messages.DBusSignal;
/**
* File generated - 2018-07-25.
* Based on bluez Documentation: health-api.txt.
*
* Service: org.bluez
* Interface: org.bluez.HealthDevice1
*
* Object path:
* [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
*
* Supported properties:
*
* object MainChannel [readonly]
*
* The first reliable channel opened. It is needed by
* upper applications in order to send specific protocol
* data units. The first reliable can change after a
* reconnection.
*
*
*
*/
public interface HealthDevice1 extends DBusInterface, Properties {
/**
* From bluez documentation:
*
* Sends an echo petition to the remote service. Returns
* True if response matches with the buffer sent. If some
* error is detected False value is returned.
*
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezOutOfRangeException when value is out of range
*/
boolean Echo() throws BluezInvalidArgumentsException, BluezOutOfRangeException;
/**
* From bluez documentation:
*
* Creates a new data channel. The configuration should
* indicate the channel quality of service using one of
* this values "reliable", "streaming", "any".
*
* Returns the object path that identifies the data
* channel that is already connected.
*
*
* @param _application
* @param _configuration
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezHealthErrorException when operation fails
*/
DBusPath CreateChannel(DBusPath _application, String _configuration) throws BluezInvalidArgumentsException, BluezHealthErrorException;
/**
* From bluez documentation:
*
* Destroys the data channel object. Only the creator of
* the channel or the creator of the HealthApplication
* that received the data channel will be able to destroy
* it.
*
*
* @param _channel
*
* @throws BluezInvalidArgumentsException when argument is invalid
* @throws BluezNotFoundException when item not found
* @throws BluezNotAllowedException when operation not allowed
*/
void DestroyChannel(DBusPath _channel) throws BluezInvalidArgumentsException, BluezNotFoundException, BluezNotAllowedException;
/**
* This signal is launched when a new data channel is
* created or when a known data channel is reconnected.
*/
public class ChannelConnected extends DBusSignal {
private DBusPath channel;
public ChannelConnected(String _path, DBusPath _channel) throws DBusException {
super(_path, _channel);
this.channel = _channel;
}
public DBusPath getChannel() {
return channel;
}
}
/**
* This signal is launched when a data channel is deleted.
* After this signal the data channel path will not be
* valid and its path can be reused for future data
* channels.
*/
public class ChannelDeleted extends DBusSignal {
private DBusPath channel;
public ChannelDeleted(String _path, DBusPath _channel) throws DBusException {
super(_path, _channel);
this.channel = _channel;
}
public DBusPath getChannel() {
return channel;
}
}
}