@@ -32,20 +32,20 @@ typedef NS_ENUM(NSUInteger, MTRDeviceState) {
32
32
@protocol MTRDeviceDelegate;
33
33
34
34
MTR_AVAILABLE (ios(16.1 ), macos(13.0 ), watchos(9.1 ), tvos(16.1 ))
35
- @interface MTRDevice : NSObject
35
+ @interface MTRDeviceConcrete : NSObject
36
36
- (instancetype )init NS_UNAVAILABLE;
37
37
+ (instancetype )new NS_UNAVAILABLE;
38
38
39
39
/* *
40
40
* TODO: Document usage better
41
41
*
42
- * Directly instantiate a MTRDevice with a MTRDeviceController as a shim.
42
+ * Directly instantiate a MTRDeviceConcrete with a MTRDeviceController as a shim.
43
43
*
44
44
* All device-specific information would be stored on the device controller, and
45
45
* retrieved when performing actions using a combination of MTRBaseDevice
46
46
* and MTRAsyncCallbackQueue.
47
47
*/
48
- + (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID
48
+ + (MTRDeviceConcrete *)deviceWithNodeID:(NSNumber *)nodeID
49
49
controller:(MTRDeviceController *)controller MTR_AVAILABLE (ios(16.4 ), macos(13.3 ), watchos(9.4 ), tvos(16.4 ));
50
50
51
51
/* *
@@ -121,7 +121,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
121
121
*
122
122
* The delegate will be called on the provided queue, for attribute reports, event reports, and device state changes.
123
123
*
124
- * MTRDevice holds a weak reference to the delegate object.
124
+ * MTRDeviceConcrete holds a weak reference to the delegate object.
125
125
*/
126
126
- (void )addDelegate:(id <MTRDeviceDelegate>)delegate queue:(dispatch_queue_t )queue MTR_AVAILABLE (ios(18.0 ), macos(15.0 ), watchos(11.0 ), tvos(18.0 ));
127
127
@@ -136,7 +136,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1))
136
136
*
137
137
* Calling addDelegate: again with the same delegate object will update the interested paths for attributes and events for this delegate.
138
138
*
139
- * MTRDevice holds a weak reference to the delegate object.
139
+ * MTRDeviceConcrete holds a weak reference to the delegate object.
140
140
*/
141
141
- (void )addDelegate:(id <MTRDeviceDelegate>)delegate queue:(dispatch_queue_t )queue interestedPathsForAttributes:(NSArray * _Nullable)interestedPathsForAttributes interestedPathsForEvents:(NSArray * _Nullable)interestedPathsForEvents MTR_AVAILABLE (ios(18.0 ), macos(15.0 ), watchos(11.0 ), tvos(18.0 ));
142
142
@@ -405,10 +405,10 @@ MTR_EXTERN NSString * const MTRDataVersionKey MTR_AVAILABLE(ios(17.6), macos(14.
405
405
/* *
406
406
* @param state The current state of the device
407
407
*/
408
- - (void )device : (MTRDevice *)device stateChanged : (MTRDeviceState)state ;
408
+ - (void )device : (MTRDeviceConcrete *)device stateChanged : (MTRDeviceState)state ;
409
409
410
410
/* *
411
- * Notifies delegate of attribute reports from the MTRDevice
411
+ * Notifies delegate of attribute reports from the MTRDeviceConcrete
412
412
*
413
413
* @param attributeReport An array of response-value objects as described in MTRDeviceResponseHandler
414
414
*
@@ -420,10 +420,10 @@ MTR_EXTERN NSString * const MTRDataVersionKey MTR_AVAILABLE(ios(17.6), macos(14.
420
420
*
421
421
* MTRDataVersionKey : NSNumber-wrapped uin32_t.
422
422
*/
423
- - (void )device : (MTRDevice *)device receivedAttributeReport : (NSArray <NSDictionary<NSString *, id> *> *)attributeReport ;
423
+ - (void )device : (MTRDeviceConcrete *)device receivedAttributeReport : (NSArray <NSDictionary<NSString *, id> *> *)attributeReport ;
424
424
425
425
/* *
426
- * Notifies delegate of event reports from the MTRDevice
426
+ * Notifies delegate of event reports from the MTRDeviceConcrete
427
427
*
428
428
* @param eventReport An array of response-value objects as described in MTRDeviceResponseHandler
429
429
*
@@ -440,7 +440,7 @@ MTR_EXTERN NSString * const MTRDataVersionKey MTR_AVAILABLE(ios(17.6), macos(14.
440
440
* Only one of MTREventTimestampDateKey and MTREventSystemUpTimeKey will be present, depending on the value for
441
441
* MTREventTimeTypeKey.
442
442
*/
443
- - (void )device : (MTRDevice *)device receivedEventReport : (NSArray <NSDictionary<NSString *, id> *> *)eventReport ;
443
+ - (void )device : (MTRDeviceConcrete *)device receivedEventReport : (NSArray <NSDictionary<NSString *, id> *> *)eventReport ;
444
444
445
445
@optional
446
446
/* *
@@ -449,33 +449,33 @@ MTR_EXTERN NSString * const MTRDataVersionKey MTR_AVAILABLE(ios(17.6), macos(14.
449
449
* This can be used as a hint that now is a good time to send commands to the
450
450
* device, especially if the device is sleepy and might not be active very often.
451
451
*/
452
- - (void )deviceBecameActive : (MTRDevice *)device MTR_AVAILABLE(ios(16.4 ), macos(13.3 ), watchos(9.4 ), tvos(16.4 ));
452
+ - (void )deviceBecameActive : (MTRDeviceConcrete *)device MTR_AVAILABLE(ios(16.4 ), macos(13.3 ), watchos(9.4 ), tvos(16.4 ));
453
453
454
454
/* *
455
455
* Notifies delegate when the device attribute cache has been primed with initial configuration data of the device
456
456
*
457
- * This is called when the MTRDevice object goes from not knowing the device to having cached the first attribute reports that include basic mandatory information, e.g. Descriptor clusters.
457
+ * This is called when the MTRDeviceConcrete object goes from not knowing the device to having cached the first attribute reports that include basic mandatory information, e.g. Descriptor clusters.
458
458
*
459
459
* The intention is that after this is called, the client should be able to call read for mandatory attributes and likely expect non-nil values.
460
460
*/
461
- - (void )deviceCachePrimed : (MTRDevice *)device MTR_AVAILABLE(ios(17.6 ), macos(14.6 ), watchos(10.6 ), tvos(17.6 ));
461
+ - (void )deviceCachePrimed : (MTRDeviceConcrete *)device MTR_AVAILABLE(ios(17.6 ), macos(14.6 ), watchos(10.6 ), tvos(17.6 ));
462
462
463
463
/* *
464
- * This is called when the MTRDevice object detects a change in the device configuration.
464
+ * This is called when the MTRDeviceConcrete object detects a change in the device configuration.
465
465
*
466
466
* Device configuration is the set of functionality implemented by the device.
467
467
*
468
468
*/
469
- - (void )deviceConfigurationChanged : (MTRDevice *)device MTR_AVAILABLE(ios(17.6 ), macos(14.6 ), watchos(10.6 ), tvos(17.6 ));
469
+ - (void )deviceConfigurationChanged : (MTRDeviceConcrete *)device MTR_AVAILABLE(ios(17.6 ), macos(14.6 ), watchos(10.6 ), tvos(17.6 ));
470
470
471
471
@end
472
472
473
- @interface MTRDevice (Deprecated)
473
+ @interface MTRDeviceConcrete (Deprecated)
474
474
475
475
/* *
476
- * Deprecated MTRDevice APIs.
476
+ * Deprecated MTRDeviceConcrete APIs.
477
477
*/
478
- + (MTRDevice *)deviceWithNodeID : (uint64_t )nodeID
478
+ + (MTRDeviceConcrete *)deviceWithNodeID : (uint64_t )nodeID
479
479
deviceController : (MTRDeviceController *)deviceController
480
480
MTR_DEPRECATED(
481
481
" Please use deviceWithNodeID:controller:" , ios(16.1 , 16.4 ), macos(13.0 , 13.3 ), watchos(9.1 , 9.4 ), tvos(16.1 , 16.4 ));
0 commit comments