55
55
// Disabling pending crashes
56
56
#define ENABLE_CONNECTIVITY_MONITORING 0
57
57
58
- #ifdef DEBUG
59
- #define MTR_REQUIRE_SUBCLASS_IMPL_PASTED (message ) \
60
- MTR_LOG_ERROR (message); \
61
- NSAssert (NO , @message)
62
- #else // DEBUG
63
- #debug MTR_REQUIRE_SUBCLASS_IMPL_PASTED (message) \
64
- MTR_LOG_ERROR(message)
65
- #endif // DEBUG
66
-
67
- #define MTR_REQUIRE_SUBCLASS_IMPL (selectorString ) \
68
- MTR_REQUIRE_SUBCLASS_IMPL_PASTED (" MTRDevice " selectorString " must be handled by subclasses" )
69
-
70
58
@implementation MTRDeviceDelegateInfo
71
59
- (instancetype )initWithDelegate : (id <MTRDeviceDelegate>)delegate queue : (dispatch_queue_t )queue interestedPathsForAttributes : (NSArray * _Nullable)interestedPathsForAttributes interestedPathsForEvents : (NSArray * _Nullable)interestedPathsForEvents
72
60
{
@@ -1260,7 +1248,7 @@ - (NSUInteger)unitTestNonnullDelegateCount
1260
1248
attributeID : (NSNumber *)attributeID
1261
1249
params : (MTRReadParams * _Nullable)params
1262
1250
{
1263
- MTR_REQUIRE_SUBCLASS_IMPL ( " readAttributeWithEndpointID:clusterID:attributeID:params: " );
1251
+ MTR_ABSTRACT_METHOD ( );
1264
1252
return nil ;
1265
1253
}
1266
1254
@@ -1271,12 +1259,12 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID
1271
1259
expectedValueInterval : (NSNumber *)expectedValueInterval
1272
1260
timedWriteTimeout : (NSNumber * _Nullable)timeout
1273
1261
{
1274
- MTR_REQUIRE_SUBCLASS_IMPL ( " writeAttributeWithEndpointID:clusterID:attributeID:value:expectedValueInterval:timedWriteTimeout: " );
1262
+ MTR_ABSTRACT_METHOD ( );
1275
1263
}
1276
1264
1277
1265
- (NSArray <NSDictionary<NSString *, id> *> *)readAttributePaths : (NSArray <MTRAttributeRequestPath *> *)attributePaths
1278
1266
{
1279
- MTR_REQUIRE_SUBCLASS_IMPL ( " readAttributePaths: " );
1267
+ MTR_ABSTRACT_METHOD ( );
1280
1268
return [NSArray array ];
1281
1269
}
1282
1270
@@ -1359,7 +1347,7 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID
1359
1347
queue : (dispatch_queue_t )queue
1360
1348
completion : (MTRDeviceResponseHandler)completion
1361
1349
{
1362
- MTR_REQUIRE_SUBCLASS_IMPL ( " _invokeCommandWithEndpointID:clusterID:commandID:commandFields:expectedValues:expectedValueInterval:timedInvokeTimeout:serverSideProcessingTimeout:queue:completion: " );
1350
+ MTR_ABSTRACT_METHOD ( );
1363
1351
}
1364
1352
1365
1353
- (void )_invokeKnownCommandWithEndpointID : (NSNumber *)endpointID
@@ -1468,7 +1456,7 @@ - (NSDictionary *)_dataValueWithoutDataVersion:(NSDictionary *)attributeValue
1468
1456
1469
1457
- (NSArray <NSDictionary<NSString *, id> *> *)getAllAttributesReport
1470
1458
{
1471
- MTR_REQUIRE_SUBCLASS_IMPL ( " getAllAttributesReport " );
1459
+ MTR_ABSTRACT_METHOD ( );
1472
1460
return nil ;
1473
1461
}
1474
1462
0 commit comments