All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.hapjava.characteristics.EventableCharacteristic Maven / Gradle / Ivy

There is a newer version: 2.0.7
Show newest version
package io.github.hapjava.characteristics;

/**
 * A characteristic that can be listened to by the connected iOS device.
 *
 * @author Andy Lintner
 */
public interface EventableCharacteristic extends Characteristic {

  /**
   * Begin listening to changes to this characteristic. When a change is made, call the provided
   * function.
   *
   * @param callback a function to call when a change is made to the characteristic value.
   */
  void subscribe(HomekitCharacteristicChangeCallback callback);

  /** Stop listening to changes to this characteristic. */
  void unsubscribe();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy