Package apple.homekit
Class HMAccessory
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.homekit.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHMAccessory.Block_identifyWithCompletionHandlerstatic interfaceHMAccessory.Block_updateNameCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHMAccessory(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static HMAccessoryalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)NSArray<? extends HMCameraProfile>cameraProfiles()Returns array of camera profiles implemented by the accessory.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)HMAccessoryCategorycategory()Category information for the accessory.static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()HMAccessoryDelegatedelegate()Delegate object that receives updates on the state of the accessory.static java.lang.Stringdescription_static()java.lang.StringfirmwareVersion()Accessory's firmware version.static longhash_static()NSUUIDidentifier()Deprecated.NSArray<? extends NSUUID>identifiersForBridgedAccessories()Deprecated.voididentifyWithCompletionHandler(HMAccessory.Block_identifyWithCompletionHandler completion)This method is used to have an accessory identify itself.HMAccessoryinit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisBlocked()TRUE if the accessory is blocked, FALSE otherwise.booleanisBridged()This property indicates whether this accessory is behind a bridge.booleanisReachable()TRUE if the accessory is currently reachable, FALSE otherwise.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)java.lang.Stringmanufacturer()Manufacturer of the accessory.java.lang.Stringmodel()Model of the accessory.java.lang.Stringname()The name of the accessory.static java.lang.Objectnew_objc()NSArray<? extends HMAccessoryProfile>profiles()Accessory profiles of the receiver.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)HMRoomroom()Room containing the accessory.NSArray<? extends HMService>services()Array of HMService objects that represent all the services provided by the accessory.voidsetDelegate(HMAccessoryDelegate value)Delegate object that receives updates on the state of the accessory.voidsetDelegate_unsafe(HMAccessoryDelegate value)Delegate object that receives updates on the state of the accessory.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()booleansupportsIdentify()Indicates if the accessory supports the identify action.NSUUIDuniqueIdentifier()A unique identifier for the accessory.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.voidupdateNameCompletionHandler(java.lang.String name, HMAccessory.Block_updateNameCompletionHandler completion)This method is used to change the name of the accessory.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static HMAccessory alloc()
-
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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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.
-
category
public HMAccessoryCategory category()
Category information for the accessory.
-
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.
-
init
public HMAccessory init()
-
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.
-
profiles
public NSArray<? extends HMAccessoryProfile> profiles()
Accessory profiles of the receiver.
-
supportsIdentify
public boolean supportsIdentify()
Indicates if the accessory supports the identify action.
-
-