Package io.github.hapjava.accessories
Interface SpeakerAccessory
-
- All Superinterfaces:
HomekitAccessory
public interface SpeakerAccessory extends HomekitAccessory
Speaker accessory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Collection<Service>
getServices()
The collection of Services this accessory supports.java.util.concurrent.CompletableFuture<java.lang.Boolean>
isMuted()
Retrieves mute status.java.util.concurrent.CompletableFuture<java.lang.Void>
setMute(boolean mute)
Sets the mute statusvoid
subscribeMuteState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in mute state.void
unsubscribeMuteState()
Unsubscribes from changes in the mute state.-
Methods inherited from interface io.github.hapjava.accessories.HomekitAccessory
getFirmwareRevision, getId, getManufacturer, getModel, getName, getPrimaryService, getSerialNumber, identify
-
-
-
-
Method Detail
-
isMuted
java.util.concurrent.CompletableFuture<java.lang.Boolean> isMuted()
Retrieves mute status.- Returns:
- true if accessory is muted
-
setMute
java.util.concurrent.CompletableFuture<java.lang.Void> setMute(boolean mute) throws java.lang.Exception
Sets the mute status- Parameters:
mute
- true if accessory should be muted- Returns:
- a future that completes when the change is made
- Throws:
java.lang.Exception
- when the change cannot be made
-
subscribeMuteState
void subscribeMuteState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in mute state.- Parameters:
callback
- the function to call when the state changes.
-
unsubscribeMuteState
void unsubscribeMuteState()
Unsubscribes from changes in the mute 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 interfaceHomekitAccessory
- Returns:
- the collection of services.
-
-