|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include <PluginStorage.h>
Static Public Member Functions | |
| static bool | mount () |
| Mount the plugins partition. Auto-formats if empty. | |
| static void | unmount () |
| Unmount the plugins partition (rarely used; mostly tests). | |
| static const char * | basePath () |
| Returns the VFS path prefix, e.g. "/plugins". | |
| static std::vector< std::string > | listPluginIds () |
| Discover all installed plugin ids. A plugin is recognised by the presence of both <id>.wasm and <id>.meta files. | |
| static std::string | binaryPath (const std::string &id) |
| Returns the path that should be loaded for <id>: <id>.aot if it exists on disk, otherwise <id>.wasm. | |
| static std::string | wasmPath (const std::string &id) |
| Returns the full VFS path of <id>.wasm. | |
| static std::string | aotPath (const std::string &id) |
| Returns the full VFS path of <id>.aot. | |
| static std::string | metaPath (const std::string &id) |
| Returns the full VFS path of <id>.meta. | |
| static std::string | langPath (const std::string &id) |
| Returns the full VFS path of <id>.lang (translation overlay). | |
| static std::string | disabledPath (const std::string &id) |
| Returns the full VFS path of <id>.disabled. | |
| static bool | isDisabled (const std::string &id) |
| True when the plugin has a persistent disabled marker. | |
| static bool | setDisabled (const std::string &id, bool disabled) |
| Create or remove the persistent disabled marker for a plugin. | |
| static bool | stats (uint64_t &free_bytes, uint64_t &total_bytes) |
| Returns the free and total bytes on the plugins partition. | |
Definition at line 19 of file PluginStorage.h.
|
static |
Returns the full VFS path of <id>.aot.
Definition at line 120 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT.
Referenced by binaryPath().
|
static |
Returns the VFS path prefix, e.g. "/plugins".
Definition at line 58 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT.
|
static |
Returns the path that should be loaded for <id>: <id>.aot if it exists on disk, otherwise <id>.wasm.
Definition at line 103 of file PluginStorage.cpp.
References aotPath(), and wasmPath().
Referenced by cdc::plugin_manager::Plugin::load().
|
static |
Returns the full VFS path of <id>.disabled.
Definition at line 135 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT.
Referenced by isDisabled(), and setDisabled().
|
static |
True when the plugin has a persistent disabled marker.
Definition at line 140 of file PluginStorage.cpp.
References disabledPath().
Referenced by cdc::plugin_manager::PluginManager::isPluginDisabled().
|
static |
Returns the full VFS path of <id>.lang (translation overlay).
Definition at line 130 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT.
Referenced by cdc::plugin_manager::Plugin::loadLangOverlay().
|
static |
Discover all installed plugin ids. A plugin is recognised by the presence of both <id>.wasm and <id>.meta files.
Definition at line 68 of file PluginStorage.cpp.
References cdc::plugin_manager::ends_with(), LOG_W, metaPath(), cdc::plugin_manager::MOUNT_POINT, name, cdc::plugin_manager::s_mounted, and cdc::plugin_manager::TAG.
Referenced by cdc::plugin_manager::PluginManager::init(), and cdc::plugin_manager::PluginManager::listInstalledIds().
|
static |
Returns the full VFS path of <id>.meta.
Definition at line 125 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT.
Referenced by cdc::plugin_manager::PluginManager::getManifest(), and listPluginIds().
|
static |
Mount the plugins partition. Auto-formats if empty.
Definition at line 26 of file PluginStorage.cpp.
References LOG_E, LOG_I, cdc::plugin_manager::MOUNT_POINT, cdc::plugin_manager::PARTITION_LABEL, cdc::plugin_manager::s_mounted, cdc::plugin_manager::s_wl_handle, and cdc::plugin_manager::TAG.
Referenced by cdc::plugin_manager::PluginManager::init().
|
static |
Create or remove the persistent disabled marker for a plugin.
Definition at line 147 of file PluginStorage.cpp.
References disabledPath(), and cdc::core::openFile().
Referenced by cdc::plugin_manager::PluginManager::setPluginDisabled().
|
static |
Returns the free and total bytes on the plugins partition.
Definition at line 161 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT, and cdc::plugin_manager::s_mounted.
|
static |
Unmount the plugins partition (rarely used; mostly tests).
Definition at line 50 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT, cdc::plugin_manager::s_mounted, and cdc::plugin_manager::s_wl_handle.
Referenced by cdc::plugin_manager::PluginManager::deinit().
|
static |
Returns the full VFS path of <id>.wasm.
Definition at line 115 of file PluginStorage.cpp.
References cdc::plugin_manager::MOUNT_POINT.
Referenced by binaryPath(), and cdc::plugin_manager::PluginInfoView::loadForPluginId().