From c47fba460a878542abf19131a388096bc4b5fe57 Mon Sep 17 00:00:00 2001 From: MFransen69 <39826971+MFransen69@users.noreply.github.com> Date: Thu, 14 Mar 2024 20:55:04 +0100 Subject: [PATCH] [Subsystem] add Installation subsystem (#1547) Co-authored-by: Pierre Wielders --- Source/WPEFramework/PluginHost.cpp | 4 ++++ Source/WPEFramework/SystemInfo.h | 10 ++++++++++ Source/plugins/ISubSystem.h | 4 +++- docs/plugin/subsystems.md | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/WPEFramework/PluginHost.cpp b/Source/WPEFramework/PluginHost.cpp index 29239e95f..6ca04ffb4 100644 --- a/Source/WPEFramework/PluginHost.cpp +++ b/Source/WPEFramework/PluginHost.cpp @@ -855,6 +855,10 @@ POP_WARNING() printf("Cryptography: %s\n", (status->IsActive(PluginHost::ISubSystem::CRYPTOGRAPHY) == true) ? "Available" : "Unavailable"); + printf("Installation: %s\n", + (status->IsActive(PluginHost::ISubSystem::INSTALLATION) == true) ? "Available" + : "Unavailable"); + printf("------------------------------------------------------------\n"); if (status->IsActive(PluginHost::ISubSystem::INTERNET) == true) { printf("Network Type: %s\n", diff --git a/Source/WPEFramework/SystemInfo.h b/Source/WPEFramework/SystemInfo.h index cbab73587..d63bbe10e 100644 --- a/Source/WPEFramework/SystemInfo.h +++ b/Source/WPEFramework/SystemInfo.h @@ -544,6 +544,11 @@ namespace PluginHost { SYSLOG(Logging::Startup, (_T("EVENT: Cryptography"))); break; } + case INSTALLATION: { + /* No information to set yet */ + SYSLOG(Logging::Startup, (_T("EVENT: Installation"))); + break; + } case SECURITY: { PluginHost::ISubSystem::ISecurity* info = (information != nullptr ? information->QueryInterface() : nullptr); @@ -651,6 +656,10 @@ namespace PluginHost { SYSLOG(Logging::Shutdown, (_T("EVENT: Cryptography"))); break; } + case INSTALLATION: { + SYSLOG(Logging::Shutdown, (_T("EVENT: Installation"))); + break; + } case BLUETOOTH: { SYSLOG(Logging::Shutdown, (_T("EVENT: Bluetooth"))); break; @@ -724,6 +733,7 @@ namespace PluginHost { case WEBSOURCE: case STREAMING: case CRYPTOGRAPHY: + case INSTALLATION: case SECURITY: case BLUETOOTH: { /* No information to get yet */ diff --git a/Source/plugins/ISubSystem.h b/Source/plugins/ISubSystem.h index 4cfec3167..bcb716b30 100644 --- a/Source/plugins/ISubSystem.h +++ b/Source/plugins/ISubSystem.h @@ -58,6 +58,7 @@ namespace PluginHost { STREAMING, // Content can be streamed. BLUETOOTH, // The bluetooth subsystem is up and running. CRYPTOGRAPHY, // Cryptographic functionality is available. + INSTALLATION, // (Package) Installation functionality is available. END_LIST /* @end */, // Also define a "negative" value. @@ -75,7 +76,8 @@ namespace PluginHost { NOT_WEBSOURCE /* @text !WebSource */, // Content exposed via a local web server is NOT available. NOT_STREAMING /* @text !Streaming */, // Content can NOT be streamed. NOT_BLUETOOTH /* @text !Bluetooth */, // The Bluetooth communication system is NOT available. - NOT_CRYPTOGRAPHY /* @text !Cryptography */ // Cryptographic functionality is NOT available. + NOT_CRYPTOGRAPHY /* @text !Cryptography */, // Cryptographic functionality is NOT available. + NOT_INSTALLATION /* @text !Installation */ // (Package) Installation is NOT available. }; struct EXTERNAL INotification : virtual public Core::IUnknown { diff --git a/docs/plugin/subsystems.md b/docs/plugin/subsystems.md index 5d1ed0bbc..ab30ac555 100644 --- a/docs/plugin/subsystems.md +++ b/docs/plugin/subsystems.md @@ -24,6 +24,7 @@ Thunder supports the following subsystems (enumerated in `Source/plugins/ISubSys | WEBSOURCE | Content exposed via a local web server is available. | | STREAMING | Content can be streamed. | | BLUETOOTH | The Bluetooth subsystem is up and running. | +| INSTALLATION | The Installation (e.g. Pakager) subsystem is up and running. | All subsystems have a negated equivalent - e.g. `NOT_PLATFORM` and `NOT_SECURITY` that indicates the absence of those subsystems.