// Path: bluez-dbus/src/main/java/org/bluez/Profile1.java
// public interface Profile1 extends DBusInterface {
// 
//     /**
//      * <b>From bluez documentation:</b><br>
//      * <br>
//      * This method gets called when the service daemon<br>
//      * unregisters the profile. A profile can use it to do<br>
//      * cleanup tasks. There is no need to unregister the<br>
//      * profile, because when this method gets called it has<br>
//      * already been unregistered.<br>
//      * <br>
//      */
//     void Release();
// 
//     /**
//      * <b>From bluez documentation:</b><br>
//      * <br>
//      * This method gets called when a new service level<br>
//      * connection has been made and authorized.<br>
//      * <br>
//      * Common fd_properties:<br>
//      * <br>
//      * uint16 Version		Profile version (optional)<br>
//      * uint16 Features		Profile features (optional)<br>
//      * <br>
//      * 
//      * @param _device device
//      * @param fd fd
//      * @param _fd_properties fd_properties
//      * 
//      * @throws BluezRejectedException when operation rejected
//      * @throws BluezCanceledException when operation canceled
//      */
//     void NewConnection(DBusPath _device, FileDescriptor fd, Map<String, Variant<?>> _fd_properties) throws BluezRejectedException, BluezCanceledException;
// 
//     /**
//      * <b>From bluez documentation:</b><br>
//      * <br>
//      * This method gets called when a profile gets<br>
//      * disconnected.<br>
//      * <br>
//      * The file descriptor is no longer owned by the service<br>
//      * daemon and the profile implementation needs to take<br>
//      * care of cleaning up all connections.<br>
//      * <br>
//      * If multiple file descriptors are indicated via<br>
//      * NewConnection, it is expected that all of them<br>
//      * are disconnected before returning from this<br>
//      * method call.<br>
//      * <br>
//      * 
//      * @param _device device
//      * 
//      * @throws BluezRejectedException when operation rejected
//      * @throws BluezCanceledException when operation canceled
//      */
//     void RequestDisconnection(DBusPath _device) throws BluezRejectedException, BluezCanceledException;
// 
// }
// 
// Path: bluez-dbus/src/main/java/org/bluez/exceptions/BluezCanceledException.java
// @SuppressWarnings("serial")
// public class BluezCanceledException extends DBusException {
// 
//     public BluezCanceledException(String _message) {
//         super(_message);
//     }
// 
// }
// 
// Path: bluez-dbus/src/main/java/org/bluez/exceptions/BluezRejectedException.java
// @SuppressWarnings("serial")
// public class BluezRejectedException extends DBusException {
// 
//     public BluezRejectedException(String _message) {
//         super(_message);
//     }
// 
// }


import java.util.Map;
import org.bluez.Profile1;
import org.bluez.exceptions.BluezCanceledException;
import org.bluez.exceptions.BluezRejectedException;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.FileDescriptor;
import org.freedesktop.dbus.types.Variant;
package com.github.hypfvieh.bluetooth.wrapper;



public final class ProfileHandler implements Profile1 {
    private final String objectPath;
    private final ProfileChangeListener profileChangeListener;

    public ProfileHandler(String _objectPath, ProfileChangeListener _profileChangeListener) {
        this.objectPath = _objectPath;
        this.profileChangeListener = _profileChangeListener;
    }

    @Override
// Path: bluez-dbus/src/main/java/org/bluez/Profile1.java
// public interface Profile1 extends DBusInterface {
// 
//     /**
//      * <b>From bluez documentation:</b><br>
//      * <br>
//      * This method gets called when the service daemon<br>
//      * unregisters the profile. A profile can use it to do<br>
//      * cleanup tasks. There is no need to unregister the<br>
//      * profile, because when this method gets called it has<br>
//      * already been unregistered.<br>
//      * <br>
//      */
//     void Release();
// 
//     /**
//      * <b>From bluez documentation:</b><br>
//      * <br>
//      * This method gets called when a new service level<br>
//      * connection has been made and authorized.<br>
//      * <br>
//      * Common fd_properties:<br>
//      * <br>
//      * uint16 Version		Profile version (optional)<br>
//      * uint16 Features		Profile features (optional)<br>
//      * <br>
//      * 
//      * @param _device device
//      * @param fd fd
//      * @param _fd_properties fd_properties
//      * 
//      * @throws BluezRejectedException when operation rejected
//      * @throws BluezCanceledException when operation canceled
//      */
//     void NewConnection(DBusPath _device, FileDescriptor fd, Map<String, Variant<?>> _fd_properties) throws BluezRejectedException, BluezCanceledException;
// 
//     /**
//      * <b>From bluez documentation:</b><br>
//      * <br>
//      * This method gets called when a profile gets<br>
//      * disconnected.<br>
//      * <br>
//      * The file descriptor is no longer owned by the service<br>
//      * daemon and the profile implementation needs to take<br>
//      * care of cleaning up all connections.<br>
//      * <br>
//      * If multiple file descriptors are indicated via<br>
//      * NewConnection, it is expected that all of them<br>
//      * are disconnected before returning from this<br>
//      * method call.<br>
//      * <br>
//      * 
//      * @param _device device
//      * 
//      * @throws BluezRejectedException when operation rejected
//      * @throws BluezCanceledException when operation canceled
//      */
//     void RequestDisconnection(DBusPath _device) throws BluezRejectedException, BluezCanceledException;
// 
// }
// 
// Path: bluez-dbus/src/main/java/org/bluez/exceptions/BluezCanceledException.java
// @SuppressWarnings("serial")
// public class BluezCanceledException extends DBusException {
// 
//     public BluezCanceledException(String _message) {
//         super(_message);
//     }
// 
// }
// 
// Path: bluez-dbus/src/main/java/org/bluez/exceptions/BluezRejectedException.java
// @SuppressWarnings("serial")
// public class BluezRejectedException extends DBusException {
// 
//     public BluezRejectedException(String _message) {
//         super(_message);
//     }
// 
// }


// Path: bluez-dbus/src/main/java/com/github/hypfvieh/bluetooth/wrapper/ProfileHandler.java
import java.util.Map;
import org.bluez.Profile1;
import org.bluez.exceptions.BluezCanceledException;
import org.bluez.exceptions.BluezRejectedException;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.FileDescriptor;
import org.freedesktop.dbus.types.Variant;

package com.github.hypfvieh.bluetooth.wrapper;



public final class ProfileHandler implements Profile1 {
    private final String objectPath;
    private final ProfileChangeListener profileChangeListener;

    public ProfileHandler(String _objectPath, ProfileChangeListener _profileChangeListener) {
        this.objectPath = _objectPath;
        this.profileChangeListener = _profileChangeListener;
    }

    @Override
    public void NewConnection(DBusPath _device, FileDescriptor _fd, Map<String, Variant<?>> _fdProperties) throws BluezRejectedException, BluezCanceledException {