CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
PluginManager.h File Reference

Discovers, loads, runs and unloads WASM plugins on the badge. More...

#include "plugin_manager/Plugin.h"
#include "plugin_manager/PluginManifest.h"
#include "plugin_manager/PluginStorage.h"
#include <atomic>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  cdc::plugin_manager::PluginManager
struct  cdc::plugin_manager::PluginManager::LockscreenItem

Namespaces

namespace  cdc
namespace  cdc::plugin_manager

Enumerations

enum class  cdc::plugin_manager::StartResult {
  cdc::plugin_manager::Ok , cdc::plugin_manager::PluginAlreadyRunning , cdc::plugin_manager::ManifestMissing , cdc::plugin_manager::ManifestInvalid ,
  cdc::plugin_manager::CapabilityRejected , cdc::plugin_manager::WamrLoadFailed , cdc::plugin_manager::WamrInstantiateFailed , cdc::plugin_manager::PluginInitFailed ,
  cdc::plugin_manager::PrerequisiteFailed , cdc::plugin_manager::PluginOnEnterFailed , cdc::plugin_manager::Busy , cdc::plugin_manager::PluginDisabled
}

Detailed Description

Discovers, loads, runs and unloads WASM plugins on the badge.

One PluginManager instance, registered as a cdc_core service. At most one foreground plugin (the one the user is currently looking at) runs at any given time. A plugin declaring capabilities.background = true keeps running (and ticking in parallel with the foreground) after the user leaves its view, instead of being unloaded. A plugin declaring capabilities.autoload = true is loaded into the background at boot unless the user has disabled it.

Definition in file PluginManager.h.