Package apple.homekit

Class HMAccessory

  • All Implemented Interfaces:
    NSObject

    public class HMAccessory
    extends NSObject
    Represent an accessory in the home. This class represents an accessory in the home. There is a one to one relationship between a physical accessory and an object of this class. An accessory is composed of one or more services.
    • Constructor Detail

      • HMAccessory

        protected HMAccessory​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • cameraProfiles

        public NSArray<? extends HMCameraProfile> cameraProfiles()
        Returns array of camera profiles implemented by the accessory. An accessory can contain one or more cameras. Each camera is represented as a an HMCameraProfile object. If the accessory does not contain a camera, this property will be nil.
      • delegate

        public HMAccessoryDelegate delegate()
        Delegate object that receives updates on the state of the accessory.
      • identifier

        @Deprecated
        public NSUUID identifier()
        Deprecated.
        A unique identifier for the accessory. Use uniqueIdentifier to obtain the identifier for this object.
      • identifiersForBridgedAccessories

        @Deprecated
        public NSArray<? extends NSUUID> identifiersForBridgedAccessories()
        Deprecated.
        If this accessory is a bridge, this property is an array of NSUUID objects that, each of which represents the 'uniqueIdentifier' of the accessory vended by the bridge. Use uniqueIdentifiersForBridgedAccessories to obtain the identifiers for the bridged accessories.
      • identifyWithCompletionHandler

        public void identifyWithCompletionHandler​(HMAccessory.Block_identifyWithCompletionHandler completion)
        This method is used to have an accessory identify itself.
        Parameters:
        completion - Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
      • isBlocked

        public boolean isBlocked()
        TRUE if the accessory is blocked, FALSE otherwise.
      • isBridged

        public boolean isBridged()
        This property indicates whether this accessory is behind a bridge. If it is TRUE, the accessory cannot be removed from the home directly. Only the bridge that owns this accessory can be removed and removing the bridge will remove this accessory from the home.
      • isReachable

        public boolean isReachable()
        TRUE if the accessory is currently reachable, FALSE otherwise.
      • name

        public java.lang.String name()
        The name of the accessory. Returns the accessory's name that is associated with HomeKit. The initial value is the name provided by the accessory information service of the accessory.
      • room

        public HMRoom room()
        Room containing the accessory.
      • services

        public NSArray<? extends HMService> services()
        Array of HMService objects that represent all the services provided by the accessory.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(HMAccessoryDelegate value)
        Delegate object that receives updates on the state of the accessory.
      • setDelegate

        public void setDelegate​(HMAccessoryDelegate value)
        Delegate object that receives updates on the state of the accessory.
      • uniqueIdentifier

        public NSUUID uniqueIdentifier()
        A unique identifier for the accessory.
      • uniqueIdentifiersForBridgedAccessories

        public NSArray<? extends NSUUID> uniqueIdentifiersForBridgedAccessories()
        If this accessory is a bridge, this property is an array of NSUUID objects that, each of which represents the 'uniqueIdentifier' of the accessory vended by the bridge. An accessory can be standalone, a bridge, or hosted behind a bridge. - A standalone accessory would have its 'bridged' property set to FALSE and its 'uniqueIdentifiersForBridgedAccessories' property set to nil. - An accessory that is a bridge would have its 'bridged' property set to FALSE, but have a non-empty 'uniqueIdentifiersForBridgedAccessories' property. - An accessory behind a bridge would have its 'bridged' property set to TRUE and its 'uniqueIdentifiersForBridgedAccessories' property set to nil.
      • updateNameCompletionHandler

        public void updateNameCompletionHandler​(java.lang.String name,
                                                HMAccessory.Block_updateNameCompletionHandler completion)
        This method is used to change the name of the accessory. The new name is stored in HomeKit and not on the accessory.
        Parameters:
        name - New name for the accessory.
        completion - Block that is invoked once the request is processed. The NSError provides more information on the status of the request, error will be nil on success.
      • firmwareVersion

        public java.lang.String firmwareVersion()
        Accessory's firmware version.
      • manufacturer

        public java.lang.String manufacturer()
        Manufacturer of the accessory.
      • model

        public java.lang.String model()
        Model of the accessory.
      • supportsIdentify

        public boolean supportsIdentify()
        Indicates if the accessory supports the identify action.