Class ProfileHandler

java.lang.Object
com.github.hypfvieh.bluetooth.wrapper.ProfileHandler
All Implemented Interfaces:
Profile1, org.freedesktop.dbus.interfaces.DBusInterface

public final class ProfileHandler extends Object implements Profile1
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProfileHandler(String _objectPath, ProfileChangeListener _profileChangeListener)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    void
    NewConnection(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)

    void
    From bluez documentation:

    This method gets called when the service daemon
    unregisters the profile.
    void
    RequestDisconnection(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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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, BluezCanceledException
      Description copied from interface: Profile1
      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)

      Specified by:
      NewConnection in interface Profile1
      Parameters:
      _device - device
      _fd - fd
      _fdProperties - fd_properties
      Throws:
      BluezRejectedException - when operation rejected
      BluezCanceledException - when operation canceled
    • Release

      public void Release()
      Description copied from interface: Profile1
      From 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.

      Specified by:
      Release in interface Profile1
    • RequestDisconnection

      public void RequestDisconnection(org.freedesktop.dbus.DBusPath _device) throws BluezRejectedException, BluezCanceledException
      Description copied from interface: Profile1
      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.

      Specified by:
      RequestDisconnection in interface Profile1
      Parameters:
      _device - device
      Throws:
      BluezRejectedException - when operation rejected
      BluezCanceledException - when operation canceled
    • getObjectPath

      public String getObjectPath()
      Specified by:
      getObjectPath in interface org.freedesktop.dbus.interfaces.DBusInterface
    • isRemote

      public boolean isRemote()
      Specified by:
      isRemote in interface org.freedesktop.dbus.interfaces.DBusInterface