Skip to content

Commit

Permalink
[Subsystem] add Installation subsystem (#1547)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Wielders <[email protected]>
  • Loading branch information
MFransen69 and pwielders authored Mar 14, 2024
1 parent 9723f99 commit c47fba4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Source/WPEFramework/PluginHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions Source/WPEFramework/SystemInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<PluginHost::ISubSystem::ISecurity>() : nullptr);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -724,6 +733,7 @@ namespace PluginHost {
case WEBSOURCE:
case STREAMING:
case CRYPTOGRAPHY:
case INSTALLATION:
case SECURITY:
case BLUETOOTH: {
/* No information to get yet */
Expand Down
4 changes: 3 additions & 1 deletion Source/plugins/ISubSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions docs/plugin/subsystems.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit c47fba4

Please sign in to comment.