Package io.github.hapjava.accessories
Interface InputSourceAccessory
-
- All Superinterfaces:
HomekitAccessory
public interface InputSourceAccessory extends HomekitAccessory
Input Source accessory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.String>getConfiguredName()Retrieves configured name of input source.java.util.concurrent.CompletableFuture<CurrentVisibilityStateEnum>getCurrentVisibilityState()Retrieves the current visibility state.java.util.concurrent.CompletableFuture<InputSourceTypeEnum>getInputSourceType()Retrieves the input source type.default java.util.Collection<Service>getServices()The collection of Services this accessory supports.java.util.concurrent.CompletableFuture<IsConfiguredEnum>isConfigured()Retrieves the flag whether input source is configured.java.util.concurrent.CompletableFuture<java.lang.Void>setConfiguredName(java.lang.String name)Sets the configured name.java.util.concurrent.CompletableFuture<java.lang.Void>setIsConfigured(IsConfiguredEnum state)set the flag whether input source is configured.voidsubscribeConfiguredName(HomekitCharacteristicChangeCallback callback)Subscribes to changes in configured name.voidsubscribeCurrentVisibilityState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in current visibility state.voidsubscribeInputSourceType(HomekitCharacteristicChangeCallback callback)Subscribes to changes in input source type.voidsubscribeIsConfigured(HomekitCharacteristicChangeCallback callback)Subscribes to changes in isConfigured.voidunsubscribeConfiguredName()Unsubscribes from changes in the configured name.voidunsubscribeCurrentVisibilityState()Unsubscribes from changes in the current visibility state.voidunsubscribeInputSourceType()Unsubscribes from changes in the input source type.voidunsubscribeIsConfigured()Unsubscribes from changes in isConfigured.-
Methods inherited from interface io.github.hapjava.accessories.HomekitAccessory
getFirmwareRevision, getId, getManufacturer, getModel, getName, getPrimaryService, getSerialNumber, identify
-
-
-
-
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.ExceptionSets 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:HomekitAccessoryThe 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:
getServicesin interfaceHomekitAccessory- Returns:
- the collection of services.
-
-