Class ProfileHandler
java.lang.Object
com.github.hypfvieh.bluetooth.wrapper.ProfileHandler
- All Implemented Interfaces:
Profile1,org.freedesktop.dbus.interfaces.DBusInterface
-
Constructor Summary
ConstructorsConstructorDescriptionProfileHandler(String _objectPath, ProfileChangeListener _profileChangeListener) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisRemote()voidNewConnection(org.freedesktop.dbus.DBusPath _device, org.freedesktop.dbus.FileDescriptor _fd, Map<String, org.freedesktop.dbus.types.Variant<?>> _fdProperties) From bluez documentation:
This method gets called when a new service level
connection has been made and authorized.
Common fd_properties:
uint16 Version Profile version (optional)
uint16 Features Profile features (optional)
voidRelease()From bluez documentation:
This method gets called when the service daemon
unregisters the profile.voidRequestDisconnection(org.freedesktop.dbus.DBusPath _device) From bluez documentation:
This method gets called when a profile gets
disconnected.
The file descriptor is no longer owned by the service
daemon and the profile implementation needs to take
care of cleaning up all connections.
If multiple file descriptors are indicated via
NewConnection, it is expected that all of them
are disconnected before returning from this
method call.
-
Constructor Details
-
ProfileHandler
-
-
Method Details
-
NewConnection
public void NewConnection(org.freedesktop.dbus.DBusPath _device, org.freedesktop.dbus.FileDescriptor _fd, Map<String, org.freedesktop.dbus.types.Variant<?>> _fdProperties) throws BluezRejectedException, BluezCanceledExceptionDescription copied from interface:Profile1From bluez documentation:
This method gets called when a new service level
connection has been made and authorized.
Common fd_properties:
uint16 Version Profile version (optional)
uint16 Features Profile features (optional)
- Specified by:
NewConnectionin interfaceProfile1- Parameters:
_device- device_fd- fd_fdProperties- fd_properties- Throws:
BluezRejectedException- when operation rejectedBluezCanceledException- when operation canceled
-
Release
public void Release()Description copied from interface:Profile1From bluez documentation:
This method gets called when the service daemon
unregisters the profile. A profile can use it to do
cleanup tasks. There is no need to unregister the
profile, because when this method gets called it has
already been unregistered.
-
RequestDisconnection
public void RequestDisconnection(org.freedesktop.dbus.DBusPath _device) throws BluezRejectedException, BluezCanceledException Description copied from interface:Profile1From bluez documentation:
This method gets called when a profile gets
disconnected.
The file descriptor is no longer owned by the service
daemon and the profile implementation needs to take
care of cleaning up all connections.
If multiple file descriptors are indicated via
NewConnection, it is expected that all of them
are disconnected before returning from this
method call.
- Specified by:
RequestDisconnectionin interfaceProfile1- Parameters:
_device- device- Throws:
BluezRejectedException- when operation rejectedBluezCanceledException- when operation canceled
-
getObjectPath
- Specified by:
getObjectPathin interfaceorg.freedesktop.dbus.interfaces.DBusInterface
-
isRemote
public boolean isRemote()- Specified by:
isRemotein interfaceorg.freedesktop.dbus.interfaces.DBusInterface
-