Tuya iOS Smart Life App SDK 5.15.0
ThingSmartRoom Class Reference

#import <ThingSmartRoom.h>

Inheritance diagram for ThingSmartRoom:

Instance Methods

(instancetype) - initWithRoomId:homeId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - updateRoomName:success:failure:
 
(void) - updateIcon:success:failure:
 
(void) - addDeviceWithDeviceId:success:failure:
 
(void) - removeDeviceWithDeviceId:success:failure:
 
(void) - addGroupWithGroupId:success:failure:
 
(void) - removeGroupWithGroupId:success:failure:
 
(void) - saveBatchRoomRelationWithDeviceGroupList:success:failure:
 
(void) - sortDeviceRelationWithList:success:failure:
 
(void) - increaseRoomRelationWithDeviceGroupList:success:failure:
 
(instancetype) - initWithRoomId:homeId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - updateRoomName:success:failure:
 
(void) - updateIcon:success:failure:
 
(void) - addDeviceWithDeviceId:success:failure:
 
(void) - removeDeviceWithDeviceId:success:failure:
 
(void) - addGroupWithGroupId:success:failure:
 
(void) - removeGroupWithGroupId:success:failure:
 
(void) - saveBatchRoomRelationWithDeviceGroupList:success:failure:
 
(void) - sortDeviceRelationWithList:success:failure:
 
(void) - increaseRoomRelationWithDeviceGroupList:success:failure:
 
(instancetype) - initWithRoomId:homeId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - updateRoomName:success:failure:
 
(void) - updateIcon:success:failure:
 
(void) - addDeviceWithDeviceId:success:failure:
 
(void) - removeDeviceWithDeviceId:success:failure:
 
(void) - addGroupWithGroupId:success:failure:
 
(void) - removeGroupWithGroupId:success:failure:
 
(void) - saveBatchRoomRelationWithDeviceGroupList:success:failure:
 
(void) - sortDeviceRelationWithList:success:failure:
 
(void) - increaseRoomRelationWithDeviceGroupList:success:failure:
 
(instancetype) - initWithRoomId:homeId:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - updateRoomName:success:failure:
 
(void) - updateIcon:success:failure:
 
(void) - addDeviceWithDeviceId:success:failure:
 
(void) - removeDeviceWithDeviceId:success:failure:
 
(void) - addGroupWithGroupId:success:failure:
 
(void) - removeGroupWithGroupId:success:failure:
 
(void) - saveBatchRoomRelationWithDeviceGroupList:success:failure:
 
(void) - sortDeviceRelationWithList:success:failure:
 
(void) - increaseRoomRelationWithDeviceGroupList:success:failure:
 

Class Methods

(instancetype) + roomWithRoomId:homeId:
 
(instancetype) + roomWithRoomId:homeId:
 
(instancetype) + roomWithRoomId:homeId:
 
(instancetype) + roomWithRoomId:homeId:
 

Properties

ThingSmartRoomModelroomModel
 The room model. More...
 
NSArray< ThingSmartDeviceModel * > * deviceList
 The device list. More...
 
NSArray< ThingSmartGroupModel * > * groupList
 The group list. More...
 

Detailed Description

Definition at line 12 of file ThingSmartRoom.h.

Method Documentation

◆ addDeviceWithDeviceId:success:failure: [1/4]

- (void) addDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a device to the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addDeviceWithDeviceId:success:failure: [2/4]

- (void) addDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a device to the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addDeviceWithDeviceId:success:failure: [3/4]

- (void) addDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a device to the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addDeviceWithDeviceId:success:failure: [4/4]

- (void) addDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a device to the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addGroupWithGroupId:success:failure: [1/4]

- (void) addGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a group to the room.

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addGroupWithGroupId:success:failure: [2/4]

- (void) addGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a group to the room.

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addGroupWithGroupId:success:failure: [3/4]

- (void) addGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a group to the room.

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ addGroupWithGroupId:success:failure: [4/4]

- (void) addGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds a group to the room.

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ increaseRoomRelationWithDeviceGroupList:success:failure: [1/4]

- (void) increaseRoomRelationWithDeviceGroupList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Incremental batch add devices and groups belonging room

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ increaseRoomRelationWithDeviceGroupList:success:failure: [2/4]

- (void) increaseRoomRelationWithDeviceGroupList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Incremental batch add devices and groups belonging room

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ increaseRoomRelationWithDeviceGroupList:success:failure: [3/4]

- (void) increaseRoomRelationWithDeviceGroupList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Incremental batch add devices and groups belonging room

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ increaseRoomRelationWithDeviceGroupList:success:failure: [4/4]

- (void) increaseRoomRelationWithDeviceGroupList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Incremental batch add devices and groups belonging room

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ initWithRoomId:homeId: [1/4]

- (instancetype) initWithRoomId: (long long)  roomId
homeId: (long long)  NS_DESIGNATED_INITIALIZER 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ initWithRoomId:homeId: [2/4]

- (instancetype) initWithRoomId: (long long)  roomId
homeId: (long long)  NS_DESIGNATED_INITIALIZER 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ initWithRoomId:homeId: [3/4]

- (instancetype) initWithRoomId: (long long)  roomId
homeId: (long long)  NS_DESIGNATED_INITIALIZER 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ initWithRoomId:homeId: [4/4]

- (instancetype) initWithRoomId: (long long)  roomId
homeId: (long long)  NS_DESIGNATED_INITIALIZER 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ NS_UNAVAILABLE [1/4]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/4]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [3/4]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [4/4]

- (instancetype) NS_UNAVAILABLE

◆ removeDeviceWithDeviceId:success:failure: [1/4]

- (void) removeDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a device from the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeDeviceWithDeviceId:success:failure: [2/4]

- (void) removeDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a device from the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeDeviceWithDeviceId:success:failure: [3/4]

- (void) removeDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a device from the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeDeviceWithDeviceId:success:failure: [4/4]

- (void) removeDeviceWithDeviceId: (NSString *)  deviceId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a device from the room.

Parameters
deviceIdThe device ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeGroupWithGroupId:success:failure: [1/4]

- (void) removeGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a group from the room

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeGroupWithGroupId:success:failure: [2/4]

- (void) removeGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a group from the room

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeGroupWithGroupId:success:failure: [3/4]

- (void) removeGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a group from the room

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ removeGroupWithGroupId:success:failure: [4/4]

- (void) removeGroupWithGroupId: (NSString *)  groupId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Removes a group from the room

Parameters
groupIdThe group ID.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ roomWithRoomId:homeId: [1/4]

+ (instancetype) roomWithRoomId: (long long)  roomId
homeId: (long long)  homeId 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ roomWithRoomId:homeId: [2/4]

+ (instancetype) roomWithRoomId: (long long)  roomId
homeId: (long long)  homeId 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ roomWithRoomId:homeId: [3/4]

+ (instancetype) roomWithRoomId: (long long)  roomId
homeId: (long long)  homeId 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ roomWithRoomId:homeId: [4/4]

+ (instancetype) roomWithRoomId: (long long)  roomId
homeId: (long long)  homeId 

Returns the room instance.

Parameters
roomIdThe room ID.
homeIdThe home ID.
Returns
The instance.

◆ saveBatchRoomRelationWithDeviceGroupList:success:failure: [1/4]

- (void) saveBatchRoomRelationWithDeviceGroupList: (NSArray< NSString * > *)  deviceGroupList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the relationships between rooms, groups, and devices in a call.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ saveBatchRoomRelationWithDeviceGroupList:success:failure: [2/4]

- (void) saveBatchRoomRelationWithDeviceGroupList: (NSArray< NSString * > *)  deviceGroupList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the relationships between rooms, groups, and devices in a call.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ saveBatchRoomRelationWithDeviceGroupList:success:failure: [3/4]

- (void) saveBatchRoomRelationWithDeviceGroupList: (NSArray< NSString * > *)  deviceGroupList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the relationships between rooms, groups, and devices in a call.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ saveBatchRoomRelationWithDeviceGroupList:success:failure: [4/4]

- (void) saveBatchRoomRelationWithDeviceGroupList: (NSArray< NSString * > *)  deviceGroupList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Modifies the relationships between rooms, groups, and devices in a call.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ sortDeviceRelationWithList:success:failure: [1/4]

- (void) sortDeviceRelationWithList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Sort groups and devices in the room.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ sortDeviceRelationWithList:success:failure: [2/4]

- (void) sortDeviceRelationWithList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Sort groups and devices in the room.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ sortDeviceRelationWithList:success:failure: [3/4]

- (void) sortDeviceRelationWithList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Sort groups and devices in the room.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ sortDeviceRelationWithList:success:failure: [4/4]

- (void) sortDeviceRelationWithList: (nonnull NSArray< NSString * > *)  deviceGroupList
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Sort groups and devices in the room.

Parameters
deviceGroupListA list of devices or groups.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateIcon:success:failure: [1/4]

- (void) updateIcon: (UIImage *)  icon
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Edits the room icon.

Parameters
iconThe room icon.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateIcon:success:failure: [2/4]

- (void) updateIcon: (UIImage *)  icon
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Edits the room icon.

Parameters
iconThe room icon.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateIcon:success:failure: [3/4]

- (void) updateIcon: (UIImage *)  icon
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Edits the room icon.

Parameters
iconThe room icon.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateIcon:success:failure: [4/4]

- (void) updateIcon: (UIImage *)  icon
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Edits the room icon.

Parameters
iconThe room icon.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateRoomName:success:failure: [1/4]

- (void) updateRoomName: (NSString *)  roomName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Renames the room.

Parameters
roomNameThe room name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateRoomName:success:failure: [2/4]

- (void) updateRoomName: (NSString *)  roomName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Renames the room.

Parameters
roomNameThe room name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateRoomName:success:failure: [3/4]

- (void) updateRoomName: (NSString *)  roomName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Renames the room.

Parameters
roomNameThe room name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ updateRoomName:success:failure: [4/4]

- (void) updateRoomName: (NSString *)  roomName
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Renames the room.

Parameters
roomNameThe room name.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Property Documentation

◆ deviceList

- (NSArray< ThingSmartDeviceModel * > *) deviceList
readnonatomicstrong

The device list.

Definition at line 18 of file ThingSmartRoom.h.

◆ groupList

- (NSArray< ThingSmartGroupModel * > *) groupList
readnonatomicstrong

The group list.

Definition at line 21 of file ThingSmartRoom.h.

◆ roomModel

- (ThingSmartRoomModel *) roomModel
readnonatomicstrong

The room model.

Definition at line 15 of file ThingSmartRoom.h.


The documentation for this class was generated from the following files: