@@ -154,9 +154,7 @@ MyPasscodeService gMyPasscodeService;
154
154
155
155
class MyAppInstallationService : public AppInstallationService
156
156
{
157
- // TODO: rename the method
158
- // intentionally ambigiously named, need to find a better method name
159
- bool HasContentApp (uint16_t vendorId, uint16_t productId) override
157
+ bool LookupTargetContentApp (uint16_t vendorId, uint16_t productId) override
160
158
{
161
159
return ContentAppPlatform::GetInstance ().LoadContentAppByClient (vendorId, productId) != nullptr ;
162
160
}
@@ -573,6 +571,8 @@ void ContentAppFactoryImpl::AddAdminVendorId(uint16_t vendorId)
573
571
574
572
void ContentAppFactoryImpl::InstallContentApp (uint16_t vendorId, uint16_t productId)
575
573
{
574
+ ChipLogProgress (DeviceLayer, " ContentAppFactoryImpl: InstallContentApp vendorId=%d productId=%d " ,
575
+ vendorId, productId);
576
576
if (vendorId == 1 && productId == 11 ) {
577
577
mContentApps .emplace_back (std::make_unique<ContentAppImpl>(" Vendor1" , vendorId, " exampleid" , productId, " Version1" , " 34567890" ));
578
578
} else if (vendorId == 65521 && productId == 32768 ) {
@@ -586,9 +586,9 @@ void ContentAppFactoryImpl::InstallContentApp(uint16_t vendorId, uint16_t produc
586
586
}
587
587
}
588
588
589
- void ContentAppFactoryImpl::UninstallContentApp (uint16_t vendorId, uint16_t productId)
589
+ bool ContentAppFactoryImpl::UninstallContentApp (uint16_t vendorId, uint16_t productId)
590
590
{
591
- ChipLogProgress (DeviceLayer, " ContentAppFactoryImpl: RemoveContentApp vendorId=%d productId=%d " ,
591
+ ChipLogProgress (DeviceLayer, " ContentAppFactoryImpl: UninstallContentApp vendorId=%d productId=%d " ,
592
592
vendorId, productId);
593
593
594
594
int index = 0 ;
@@ -599,13 +599,14 @@ void ContentAppFactoryImpl::UninstallContentApp(uint16_t vendorId, uint16_t prod
599
599
ChipLogProgress (DeviceLayer, " Looking next vid=%d pid=%d" , app->GetApplicationBasicDelegate ()->HandleGetVendorId (), app->GetApplicationBasicDelegate ()->HandleGetProductId ());
600
600
601
601
if (app->MatchesPidVid (productId, vendorId)) {
602
- ChipLogProgress (DeviceLayer, " Found an app. vid=%d pid=%d. Uninstalling it." , app->GetApplicationBasicDelegate ()->HandleGetVendorId (), app->GetApplicationBasicDelegate ()->HandleGetProductId ());
602
+ ChipLogProgress (DeviceLayer, " Found an app vid=%d pid=%d. Uninstalling it." , app->GetApplicationBasicDelegate ()->HandleGetVendorId (), app->GetApplicationBasicDelegate ()->HandleGetProductId ());
603
603
mContentApps .erase (mContentApps .begin () + index );
604
- return ;
604
+ return true ;
605
605
}
606
606
607
607
index ++;
608
608
}
609
+ return false ;
609
610
}
610
611
611
612
Access::Privilege ContentAppFactoryImpl::GetVendorPrivilege (uint16_t vendorId)
0 commit comments