Interface InputSourceAccessory

    • Method Detail

      • getConfiguredName

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

        CompletableFuture<Void> setConfiguredName​(String name)
                                           throws Exception
        Sets the configured name.
        Parameters:
        name - configured name
        Returns:
        a future that completes when the change is made
        Throws:
        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

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

        CompletableFuture<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.
      • 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.
      • 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 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.