File tree 3 files changed +32
-14
lines changed
3 files changed +32
-14
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,29 @@ void ApplicationInit()
45
45
ChipLogDetail (DeviceLayer, " TV Linux App: Warning - Fixed Content App Endpoint Not Disabled" );
46
46
// Can't disable this without breaking CI unit tests that act upon account login cluster (only available on ep3)
47
47
// emberAfEndpointEnableDisable(3, false);
48
+
49
+ // Install Content Apps
50
+ ContentAppFactoryImpl * factory = GetContentAppFactoryImpl ();
51
+
52
+ // Content App 1
53
+ constexpr uint16_t kApp1VendorId = 65521 ;
54
+ constexpr uint16_t kApp1ProductId = 32769 ;
55
+ factory->InstallContentApp (kApp1VendorId , kApp1ProductId );
56
+
57
+ // Content App 2
58
+ constexpr uint16_t kApp2VendorId = 1 ;
59
+ constexpr uint16_t kApp2ProductId = 11 ;
60
+ factory->InstallContentApp (kApp2VendorId , kApp2ProductId );
61
+
62
+ // Content App 3
63
+ constexpr uint16_t kApp3VendorId = 9050 ;
64
+ constexpr uint16_t kApp3ProductId = 22 ;
65
+ factory->InstallContentApp (kApp3VendorId , kApp3ProductId );
66
+
67
+ // Content App 4
68
+ constexpr uint16_t kApp4VendorId = 1111 ;
69
+ constexpr uint16_t kApp4ProductId = 22 ;
70
+ factory->InstallContentApp (kApp4VendorId , kApp4ProductId );
48
71
}
49
72
50
73
void ApplicationShutdown () {}
Original file line number Diff line number Diff line change @@ -209,6 +209,8 @@ static CHIP_ERROR PrintAllCommands()
209
209
#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE
210
210
streamer_printf (sout, " print-app-access Print all ACLs for app platform fabric. Usage: app print-app-access\r\n " );
211
211
streamer_printf (sout, " remove-app-access Remove all ACLs for app platform fabric. Usage: app remove-app-access\r\n " );
212
+ streamer_printf (sout, " print-installed-apps Print all installed content apps with their endpoints. Usage: app print-installed-apps\r\n " );
213
+
212
214
streamer_printf (sout,
213
215
" commission <udc-entry> Commission given udc-entry using given pincode from corresponding app. Usage: "
214
216
" app commission 0\r\n " );
@@ -436,6 +438,13 @@ static CHIP_ERROR AppPlatformHandler(int argc, char ** argv)
436
438
Access::GetAccessControl ().DeleteAllEntriesForFabric (GetDeviceCommissioner ()->GetFabricIndex ());
437
439
return CHIP_NO_ERROR;
438
440
}
441
+ else if (strcmp (argv[0 ], " print-installed-apps" ) == 0 )
442
+ {
443
+ ContentAppFactoryImpl * factory = GetContentAppFactoryImpl ();
444
+ factory->LogInstalledApps ();
445
+
446
+ return CHIP_NO_ERROR;
447
+ }
439
448
else if (strcmp (argv[0 ], " commission" ) == 0 )
440
449
{
441
450
if (argc < 2 )
Original file line number Diff line number Diff line change @@ -801,22 +801,8 @@ std::list<ClusterId> ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi
801
801
CHIP_ERROR AppTvInit ()
802
802
{
803
803
#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED
804
- // test data for apps
805
- constexpr uint16_t kApp1VendorId = 1 ;
806
- constexpr uint16_t kApp1ProductId = 11 ;
807
- constexpr uint16_t kApp2VendorId = 65521 ;
808
- constexpr uint16_t kApp2ProductId = 32769 ;
809
- constexpr uint16_t kApp3VendorId = 9050 ;
810
- constexpr uint16_t kApp3ProductId = 22 ;
811
- constexpr uint16_t kApp4VendorId = 1111 ;
812
- constexpr uint16_t kApp4ProductId = 22 ;
813
-
814
804
ContentAppPlatform::GetInstance ().SetupAppPlatform ();
815
805
ContentAppPlatform::GetInstance ().SetContentAppFactory (&gFactory );
816
- gFactory .InstallContentApp (kApp1VendorId , kApp1ProductId );
817
- gFactory .InstallContentApp (kApp2VendorId , kApp2ProductId );
818
- gFactory .InstallContentApp (kApp3VendorId , kApp3ProductId );
819
- gFactory .InstallContentApp (kApp4VendorId , kApp4ProductId );
820
806
uint16_t value;
821
807
if (DeviceLayer::GetDeviceInstanceInfoProvider ()->GetVendorId (value) != CHIP_NO_ERROR)
822
808
{
You can’t perform that action at this time.
0 commit comments