Package io.github.hapjava.services.impl
Class SmartSpeakerService
- java.lang.Object
-
- io.github.hapjava.services.impl.SmartSpeakerService
-
- All Implemented Interfaces:
Service
public class SmartSpeakerService extends java.lang.Object
A smart speaker service can be used to control the audio output settings on a speaker device.
-
-
Constructor Summary
Constructors Constructor Description SmartSpeakerService(SmartSpeakerAccessory accessory)
SmartSpeakerService(CurrentMediaStateCharacteristic currentMediaStateCharacteristic, TargetMediaStateCharacteristic targetMediaStateCharacteristic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCharacteristic(Characteristic characteristic)
void
addLinkedService(Service service)
Add linked servicesvoid
addOptionalCharacteristic(MuteCharacteristic muteCharacteristic)
void
addOptionalCharacteristic(VolumeCharacteristic volume)
void
addOptionalCharacteristic(AirPlayEnableCharacteristic airPlayEnableCharacteristic)
void
addOptionalCharacteristic(ConfiguredNameCharacteristic configuredNameCharacteristic)
void
addOptionalCharacteristic(NameCharacteristic name)
java.util.List<Characteristic>
getCharacteristics()
Characteristics are the variables offered for reading, updating, and eventing by the Service over the HomeKit protocol.java.util.List<Service>
getLinkedServices()
List of all the services to which the service linksjava.lang.String
getType()
The type is a UUID that uniquely identifies the type of Service offered.
-
-
-
Constructor Detail
-
SmartSpeakerService
public SmartSpeakerService(CurrentMediaStateCharacteristic currentMediaStateCharacteristic, TargetMediaStateCharacteristic targetMediaStateCharacteristic)
-
SmartSpeakerService
public SmartSpeakerService(SmartSpeakerAccessory accessory)
-
-
Method Detail
-
addOptionalCharacteristic
public void addOptionalCharacteristic(NameCharacteristic name)
-
addOptionalCharacteristic
public void addOptionalCharacteristic(VolumeCharacteristic volume)
-
addOptionalCharacteristic
public void addOptionalCharacteristic(ConfiguredNameCharacteristic configuredNameCharacteristic)
-
addOptionalCharacteristic
public void addOptionalCharacteristic(MuteCharacteristic muteCharacteristic)
-
addOptionalCharacteristic
public void addOptionalCharacteristic(AirPlayEnableCharacteristic airPlayEnableCharacteristic)
-
getCharacteristics
public java.util.List<Characteristic> getCharacteristics()
Description copied from interface:Service
Characteristics are the variables offered for reading, updating, and eventing by the Service over the HomeKit protocol.It is important to maintain the order of this list and not change its contents between invocations, or a pairing error will result.
- Specified by:
getCharacteristics
in interfaceService
- Returns:
- the list of Characteristics.
-
getType
public java.lang.String getType()
Description copied from interface:Service
The type is a UUID that uniquely identifies the type of Service offered. Apple defines several types for standard Services, however UUIDs outside this range are allowed for custom Services.
-
getLinkedServices
public java.util.List<Service> getLinkedServices()
Description copied from interface:Service
List of all the services to which the service links- Specified by:
getLinkedServices
in interfaceService
- Returns:
- the list of linked services.
-
addCharacteristic
public void addCharacteristic(Characteristic characteristic)
-
addLinkedService
public void addLinkedService(Service service)
Description copied from interface:Service
Add linked services- Specified by:
addLinkedService
in interfaceService
- Parameters:
service
- linked service
-
-