Interface InputSourceAccessory

    • Method Detail

      • getConfiguredName

        java.util.concurrent.CompletableFuture<java.lang.String> getConfiguredName()
        Retrieves configured name of input source.
        Returns:
        configured name of input source
      • setConfiguredName

        java.util.concurrent.CompletableFuture<java.lang.Void> setConfiguredName​(java.lang.String name)
                                                                          throws java.lang.Exception
        Sets the configured name.
        Parameters:
        name - configured name
        Returns:
        a future that completes when the change is made
        Throws:
        java.lang.Exception - when the change cannot be made
      • subscribeConfiguredName

        void subscribeConfiguredName​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in configured name.
        Parameters:
        callback - the function to call when the configured name changes.
      • unsubscribeConfiguredName

        void unsubscribeConfiguredName()
        Unsubscribes from changes in the configured name.
      • isConfigured

        java.util.concurrent.CompletableFuture<IsConfiguredEnum> isConfigured()
        Retrieves the flag whether input source is configured.
        Returns:
        a future that will contain the flag .
      • setIsConfigured

        java.util.concurrent.CompletableFuture<java.lang.Void> setIsConfigured​(IsConfiguredEnum state)
        set the flag whether input source is configured.
        Parameters:
        state - is configured state
        Returns:
        a future that completes when the change is made
      • subscribeIsConfigured

        void subscribeIsConfigured​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in isConfigured.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeIsConfigured

        void unsubscribeIsConfigured()
        Unsubscribes from changes in isConfigured.
      • getInputSourceType

        java.util.concurrent.CompletableFuture<InputSourceTypeEnum> getInputSourceType()
        Retrieves the input source type.
        Returns:
        a future that will contain the input source type.
      • subscribeInputSourceType

        void subscribeInputSourceType​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in input source type.
        Parameters:
        callback - the function to call when the type changes.
      • unsubscribeInputSourceType

        void unsubscribeInputSourceType()
        Unsubscribes from changes in the input source type.
      • getCurrentVisibilityState

        java.util.concurrent.CompletableFuture<CurrentVisibilityStateEnum> getCurrentVisibilityState()
        Retrieves the current visibility state.
        Returns:
        a future that will contain the current visibility state.
      • subscribeCurrentVisibilityState

        void subscribeCurrentVisibilityState​(HomekitCharacteristicChangeCallback callback)
        Subscribes to changes in current visibility state.
        Parameters:
        callback - the function to call when the state changes.
      • unsubscribeCurrentVisibilityState

        void unsubscribeCurrentVisibilityState()
        Unsubscribes from changes in the current visibility state.
      • getServices

        default java.util.Collection<Service> getServices()
        Description copied from interface: HomekitAccessory
        The collection of Services this accessory supports. Services are the primary way to interact with the accessory via HomeKit. Besides the Services offered here, the accessory will automatically include the required information service.

        This method will only be useful if you're implementing your own accessory type. For the standard accessories, use the default implementation provided by the interfaces in io.github.hapjava.accessories.

        Specified by:
        getServices in interface HomekitAccessory
        Returns:
        the collection of services.