public class HMHome extends NSObject
This class represents a home and is the entry point to communicate and configure different accessories in the home. This is also used to manage all the rooms, zones, service groups, users, triggers, and action sets in the home.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
HMHome(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
NSArray<? extends HMAccessory> |
accessories()
Array of HMAccessory objects that represents all accessories added to the home.
|
NSArray<? extends HMActionSet> |
actionSets()
Array of HMActionSet objects that represents all the action sets in the home.
|
void |
addAccessoryCompletionHandler(HMAccessory accessory,
HMHome.Block_addAccessoryCompletionHandler completion)
Adds a new accessory to the home.
|
void |
addActionSetWithNameCompletionHandler(java.lang.String actionSetName,
HMHome.Block_addActionSetWithNameCompletionHandler completion)
Adds a new action set to the home.
|
void |
addAndSetupAccessoriesWithCompletionHandler(HMHome.Block_addAndSetupAccessoriesWithCompletionHandler completion)
Find nearby accessories and add them to the home.
|
void |
addAndSetupAccessoriesWithPayloadCompletionHandler(HMAccessorySetupPayload payload,
HMHome.Block_addAndSetupAccessoriesWithPayloadCompletionHandler completion)
Add accessory with the given setup payload to the home.
|
void |
addRoomWithNameCompletionHandler(java.lang.String roomName,
HMHome.Block_addRoomWithNameCompletionHandler completion)
Adds a room to the home.
|
void |
addServiceGroupWithNameCompletionHandler(java.lang.String serviceGroupName,
HMHome.Block_addServiceGroupWithNameCompletionHandler completion)
Adds a service group to the home.
|
void |
addTriggerCompletionHandler(HMTrigger trigger,
HMHome.Block_addTriggerCompletionHandler completion)
Adds a trigger to the home.
|
void |
addUserWithCompletionHandler(HMHome.Block_addUserWithCompletionHandler completion)
Deprecated.
|
void |
addZoneWithNameCompletionHandler(java.lang.String zoneName,
HMHome.Block_addZoneWithNameCompletionHandler completion)
Adds a zone to the home.
|
static HMHome |
alloc() |
static HMHome |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
void |
assignAccessoryToRoomCompletionHandler(HMAccessory accessory,
HMRoom room,
HMHome.Block_assignAccessoryToRoomCompletionHandler completion)
Assigns a new room for the accessory.
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
HMActionSet |
builtinActionSetOfType(java.lang.String actionSetType)
Retrieve a built-in action set for the home.
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
HMUser |
currentUser()
HMUser object representing the current user of the home.
|
static java.lang.String |
debugDescription_static() |
HMHomeDelegate |
delegate()
Delegate that receives updates on the state of the home.
|
static java.lang.String |
description_static() |
void |
executeActionSetCompletionHandler(HMActionSet actionSet,
HMHome.Block_executeActionSetCompletionHandler completion)
Executes all the actions within an action set.
|
static long |
hash_static() |
HMHomeAccessControl |
homeAccessControlForUser(HMUser user)
Retrieve the access level of the user associated with the home.
|
long |
homeHubState()
Specifies the state of the home hub.
|
HMHome |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isPrimary()
Specifies whether this home is the primary home.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
void |
manageUsersWithCompletionHandler(HMHome.Block_manageUsersWithCompletionHandler completion)
Presents a view controller to manage users of the home.
|
java.lang.String |
name()
The name of the home.
|
static HMHome |
new_objc() |
void |
removeAccessoryCompletionHandler(HMAccessory accessory,
HMHome.Block_removeAccessoryCompletionHandler completion)
Removes an accessory from the home.
|
void |
removeActionSetCompletionHandler(HMActionSet actionSet,
HMHome.Block_removeActionSetCompletionHandler completion)
Removes an existing action set from the home.
|
void |
removeRoomCompletionHandler(HMRoom room,
HMHome.Block_removeRoomCompletionHandler completion)
Removes a room from the home.
|
void |
removeServiceGroupCompletionHandler(HMServiceGroup group,
HMHome.Block_removeServiceGroupCompletionHandler completion)
Removes a service group from the home.
|
void |
removeTriggerCompletionHandler(HMTrigger trigger,
HMHome.Block_removeTriggerCompletionHandler completion)
Removes a trigger from the home.
|
void |
removeUserCompletionHandler(HMUser user,
HMHome.Block_removeUserCompletionHandler completion)
Deprecated.
|
void |
removeZoneCompletionHandler(HMZone zone,
HMHome.Block_removeZoneCompletionHandler completion)
Removes a zone from the home.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
HMRoom |
roomForEntireHome()
This method returns a room that represents the entire home.
|
NSArray<? extends HMRoom> |
rooms()
Array of HMRoom objects that represents all rooms in the home.
|
NSArray<? extends HMServiceGroup> |
serviceGroups()
Array of HMServiceGroup objects that represents all service groups in the home.
|
NSArray<? extends HMService> |
servicesWithTypes(NSArray<java.lang.String> serviceTypes)
Queries all services that match the specified types.
|
void |
setDelegate_unsafe(HMHomeDelegate value)
Delegate that receives updates on the state of the home.
|
void |
setDelegate(HMHomeDelegate value)
Delegate that receives updates on the state of the home.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
boolean |
supportsAddingNetworkRouter()
True if this home supports all of the requirements for adding a network router.
|
NSArray<? extends HMTrigger> |
triggers()
Array of HMTrigger objects that represents all the triggers in the home.
|
void |
unblockAccessoryCompletionHandler(HMAccessory accessory,
HMHome.Block_unblockAccessoryCompletionHandler completion)
unblock a blocked accessory.
|
NSUUID |
uniqueIdentifier()
A unique identifier for the home.
|
void |
updateNameCompletionHandler(java.lang.String name,
HMHome.Block_updateNameCompletionHandler completion)
This method is used to change the name of the home.
|
NSArray<? extends HMUser> |
users()
Deprecated.
|
static long |
version_static() |
NSArray<? extends HMZone> |
zones()
Array of HMZone objects that represents all the zones in the home.
|
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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static HMHome alloc()
public static HMHome allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static HMHome new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public NSArray<? extends HMAccessory> accessories()
public NSArray<? extends HMActionSet> actionSets()
public void addAccessoryCompletionHandler(HMAccessory accessory, HMHome.Block_addAccessoryCompletionHandler completion)
accessory - Accessory to add to the home.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.public void addActionSetWithNameCompletionHandler(java.lang.String actionSetName,
HMHome.Block_addActionSetWithNameCompletionHandler completion)
actionSetName - Name of the action set to add to the home.completion - Block that is invoked once the request is processed.
The HMActionSet parameter is the new action set added to the home.
The NSError provides more information on the status of the request, error
will be nil on success.public void addAndSetupAccessoriesWithCompletionHandler(HMHome.Block_addAndSetupAccessoriesWithCompletionHandler completion)
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.public void addRoomWithNameCompletionHandler(java.lang.String roomName,
HMHome.Block_addRoomWithNameCompletionHandler completion)
roomName - Name of the room to add to the home.completion - Block that is invoked once the request is processed.
The HMRoom is the new room added to the home.
The NSError provides more information on the status of the request, error
will be nil on success.public void addServiceGroupWithNameCompletionHandler(java.lang.String serviceGroupName,
HMHome.Block_addServiceGroupWithNameCompletionHandler completion)
serviceGroupName - Name of the service group to add to the home.completion - Block that is invoked once the request is processed.
The HMServiceGroup is the new service group added to the home.
The NSError provides more information on the status of the request, error
will be nil on success.public void addTriggerCompletionHandler(HMTrigger trigger, HMHome.Block_addTriggerCompletionHandler completion)
Triggers are specific to an iOS device and are not synced across multiple devices to ensure that the action sets are executed only once.
trigger - Trigger to add to the home.completion - Block that is invoked once the request is processed.
The HMTrigger parameter is the new trigger added to the home.
The NSError provides more information on the status of the request, error
will be nil on success.@Deprecated public void addUserWithCompletionHandler(HMHome.Block_addUserWithCompletionHandler completion)
completion - Block that is invoked once the request is processed.
The HMUser object provides a reference to the user that was added to the home.
The NSError provides more information on the status of the request, error
will be nil on success. The userInfo dictionary will contain the HMUserFailedAccessoriesKey which provides
more details on the accessories that failed to add the user.public void addZoneWithNameCompletionHandler(java.lang.String zoneName,
HMHome.Block_addZoneWithNameCompletionHandler completion)
zoneName - Name of the zone to add to the home.completion - Block that is invoked once the request is processed.
The HMZone is the new zone added to the home.
The NSError provides more information on the status of the request, error
will be nil on success.public void assignAccessoryToRoomCompletionHandler(HMAccessory accessory, HMRoom room, HMHome.Block_assignAccessoryToRoomCompletionHandler completion)
When an accessory is added to a home, it is automatically assigned the room corresponding to + [HMHome roomForEntireHome]. This method is used to change the room assigned to an accessory.
accessory - Accessory whose rooms needs to modifiedroom - New room 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.public HMActionSet builtinActionSetOfType(java.lang.String actionSetType)
actionSetType - Type of the builtin action set. Supported action set types are HMActionSetTypeWakeUp,
HMActionSetTypeSleep, HMActionSetTypeHomeDeparture and HMActionSetTypeHomeArrival.public HMUser currentUser()
public HMHomeDelegate delegate()
public void executeActionSetCompletionHandler(HMActionSet actionSet, HMHome.Block_executeActionSetCompletionHandler completion)
actionSet - Action set to execute.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.public HMHomeAccessControl homeAccessControlForUser(HMUser user)
public boolean isPrimary()
public void manageUsersWithCompletionHandler(HMHome.Block_manageUsersWithCompletionHandler completion)
This API is available only for users that have administrator access to the home.
completion - Block that is invoked once user management is completed.
The completion block is fired to allow clients to know when the user has dismissed the view.
The NSError provides more information on the status of the request, error
will be nil on success. If the user does not have administrator privileges the error code will be set to
HMErrorCodeInsufficientPrivileges.public java.lang.String name()
public void removeAccessoryCompletionHandler(HMAccessory accessory, HMHome.Block_removeAccessoryCompletionHandler completion)
accessory - Accessory to remove from the home.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.public void removeActionSetCompletionHandler(HMActionSet actionSet, HMHome.Block_removeActionSetCompletionHandler completion)
actionSet - Action set to remove from the home. A builtin action set cannot be removed.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.public void removeRoomCompletionHandler(HMRoom room, HMHome.Block_removeRoomCompletionHandler completion)
Any references to this room will be removed from all properties of the home. For example, the room will be removed from the zone. Any accessories associated contained by this room will be moved to the room provided by - [HMHome roomForEntireHome].
room - Room to remove from the home.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.public void removeServiceGroupCompletionHandler(HMServiceGroup group, HMHome.Block_removeServiceGroupCompletionHandler completion)
group - Service group to remove from the home.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.public void removeTriggerCompletionHandler(HMTrigger trigger, HMHome.Block_removeTriggerCompletionHandler completion)
trigger - Trigger to remove from the home.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.@Deprecated public void removeUserCompletionHandler(HMUser user, HMHome.Block_removeUserCompletionHandler completion)
user - HMUser whose access is being revoked.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. The userInfo dictionary will contain the HMUserFailedAccessoriesKey which provides
more details on the accessories that failed to remove the user.public void removeZoneCompletionHandler(HMZone zone, HMHome.Block_removeZoneCompletionHandler completion)
zone - Zone to remove from the home.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.public HMRoom roomForEntireHome()
public NSArray<? extends HMRoom> rooms()
public NSArray<? extends HMServiceGroup> serviceGroups()
public NSArray<? extends HMService> servicesWithTypes(NSArray<java.lang.String> serviceTypes)
serviceTypes - Array of NSString objects that specifies the service types to match.public void setDelegate_unsafe(HMHomeDelegate value)
public void setDelegate(HMHomeDelegate value)
public NSArray<? extends HMTrigger> triggers()
public void unblockAccessoryCompletionHandler(HMAccessory accessory, HMHome.Block_unblockAccessoryCompletionHandler completion)
A misbehaving accessory will automatically be blocked. After that all requests to the accessory will fail. This API must be used to explicitly unblock the accessory
accessory - accessory to be unblockedcompletion - 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.public NSUUID uniqueIdentifier()
public void updateNameCompletionHandler(java.lang.String name,
HMHome.Block_updateNameCompletionHandler completion)
name - New name for the home.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.@Deprecated public NSArray<? extends HMUser> users()
public NSArray<? extends HMZone> zones()
public long homeHubState()
public void addAndSetupAccessoriesWithPayloadCompletionHandler(HMAccessorySetupPayload payload, HMHome.Block_addAndSetupAccessoriesWithPayloadCompletionHandler completion)
completion - Block that is invoked once the request is processed.
Accessories provides the list of added accessories.
The NSError provides more information on the status of the request, error
will be nil on success.public boolean supportsAddingNetworkRouter()