@@ -364,12 +364,10 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate
364
364
uint16_t productId;
365
365
chip::NodeId nodeId;
366
366
367
- CallbackContext (uint16_t vId, uint16_t pId, chip::NodeId nId)
368
- : vendorId(vId), productId(pId), nodeId(nId) {}
367
+ CallbackContext (uint16_t vId, uint16_t pId, chip::NodeId nId) : vendorId(vId), productId(pId), nodeId(nId) {}
369
368
};
370
369
DevicePairedCommand (uint16_t vendorId, uint16_t productId, chip::NodeId nodeId) :
371
- mOnDeviceConnectedCallback (OnDeviceConnectedFn, this ),
372
- mOnDeviceConnectionFailureCallback (OnDeviceConnectionFailureFn, this )
370
+ mOnDeviceConnectedCallback (OnDeviceConnectedFn, this ), mOnDeviceConnectionFailureCallback (OnDeviceConnectionFailureFn, this )
373
371
{
374
372
mContext = std::make_shared<CallbackContext>(vendorId, productId, nodeId);
375
373
}
@@ -378,25 +376,29 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate
378
376
const chip::SessionHandle & sessionHandle)
379
377
{
380
378
auto * pairingCommand = static_cast <DevicePairedCommand *>(context);
381
- auto cbContext = pairingCommand->mContext ;
379
+ auto cbContext = pairingCommand->mContext ;
382
380
383
381
if (pairingCommand)
384
382
{
385
- ChipLogProgress (DeviceLayer, " OnDeviceConnectedFn - Updating ACL for node id: %llu and vendor id: %d and product id: %d" , cbContext->nodeId , cbContext->vendorId , cbContext->productId );
383
+ ChipLogProgress (DeviceLayer,
384
+ " OnDeviceConnectedFn - Updating ACL for node id: %llu and vendor id: %d and product id: %d" ,
385
+ cbContext->nodeId , cbContext->vendorId , cbContext->productId );
386
386
387
- GetCommissionerDiscoveryController ()->CommissioningSucceeded (cbContext->vendorId , cbContext->productId , cbContext->nodeId , exchangeMgr, sessionHandle);
387
+ GetCommissionerDiscoveryController ()->CommissioningSucceeded (cbContext->vendorId , cbContext->productId ,
388
+ cbContext->nodeId , exchangeMgr, sessionHandle);
388
389
}
389
390
}
390
391
391
-
392
392
static void OnDeviceConnectionFailureFn (void * context, const ScopedNodeId & peerId, CHIP_ERROR error)
393
393
{
394
394
auto * pairingCommand = static_cast <DevicePairedCommand *>(context);
395
- auto cbContext = pairingCommand->mContext ;
395
+ auto cbContext = pairingCommand->mContext ;
396
396
397
397
if (pairingCommand)
398
398
{
399
- ChipLogProgress (DeviceLayer, " OnDeviceConnectionFailureFn - Not updating ACL for node id: %llu and vendor id: %d and product id: %d" , cbContext->nodeId , cbContext->vendorId , cbContext->productId );
399
+ ChipLogProgress (DeviceLayer,
400
+ " OnDeviceConnectionFailureFn - Not updating ACL for node id: %llu and vendor id: %d and product id: %d" ,
401
+ cbContext->nodeId , cbContext->vendorId , cbContext->productId );
400
402
// TODO: Remove Node Id
401
403
}
402
404
}
@@ -406,8 +408,6 @@ class DevicePairedCommand : public Controller::DevicePairingDelegate
406
408
std::shared_ptr<CallbackContext> mContext ;
407
409
};
408
410
409
-
410
-
411
411
EndpointId ContentAppFactoryImpl::AddContentApp (const char * szVendorName, uint16_t vendorId, const char * szApplicationName,
412
412
uint16_t productId, const char * szApplicationVersion,
413
413
std::vector<SupportedCluster> supportedClusters, jobject manager)
@@ -425,13 +425,16 @@ EndpointId ContentAppFactoryImpl::AddContentApp(const char * szVendorName, uint1
425
425
426
426
std::set<NodeId> nodeIds = ContentAppPlatform::GetInstance ().GetNodeIdsForContentApp (vendorId, productId);
427
427
428
- for (const auto & nodeId : nodeIds) {
428
+ for (const auto & nodeId : nodeIds)
429
+ {
429
430
430
- ChipLogProgress (DeviceLayer, " Creating Pairing Command with node id: %llu and vendor id: %d and product id: %d" , nodeId, vendorId, productId);
431
+ ChipLogProgress (DeviceLayer, " Creating Pairing Command with node id: %llu and vendor id: %d and product id: %d" , nodeId,
432
+ vendorId, productId);
431
433
432
434
std::shared_ptr<DevicePairedCommand> pairingCommand = std::make_shared<DevicePairedCommand>(vendorId, productId, nodeId);
433
435
434
- GetDeviceCommissioner ()->GetConnectedDevice (nodeId, &pairingCommand->mOnDeviceConnectedCallback , &pairingCommand->mOnDeviceConnectionFailureCallback );
436
+ GetDeviceCommissioner ()->GetConnectedDevice (nodeId, &pairingCommand->mOnDeviceConnectedCallback ,
437
+ &pairingCommand->mOnDeviceConnectionFailureCallback );
435
438
}
436
439
return epId;
437
440
}
@@ -454,13 +457,16 @@ EndpointId ContentAppFactoryImpl::AddContentApp(const char * szVendorName, uint1
454
457
455
458
std::set<NodeId> nodeIds = ContentAppPlatform::GetInstance ().GetNodeIdsForContentApp (vendorId, productId);
456
459
457
- for (const auto & nodeId : nodeIds) {
460
+ for (const auto & nodeId : nodeIds)
461
+ {
458
462
459
- ChipLogProgress (DeviceLayer, " Creating Pairing Command with node id: %llu and vendor id: %d and product id: %d" , nodeId, vendorId, productId);
463
+ ChipLogProgress (DeviceLayer, " Creating Pairing Command with node id: %llu and vendor id: %d and product id: %d" , nodeId,
464
+ vendorId, productId);
460
465
461
466
std::shared_ptr<DevicePairedCommand> pairingCommand = std::make_shared<DevicePairedCommand>(vendorId, productId, nodeId);
462
467
463
- GetDeviceCommissioner ()->GetConnectedDevice (nodeId, &pairingCommand->mOnDeviceConnectedCallback , &pairingCommand->mOnDeviceConnectionFailureCallback );
468
+ GetDeviceCommissioner ()->GetConnectedDevice (nodeId, &pairingCommand->mOnDeviceConnectedCallback ,
469
+ &pairingCommand->mOnDeviceConnectionFailureCallback );
464
470
}
465
471
466
472
return epId;
0 commit comments