CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
cdc::plugin_manager::Prerequisites Class Reference

#include <Prerequisites.h>

Static Public Member Functions

static PrereqResult walk (Plugin &plugin, std::string &out_failed_name, std::string &out_on_fail)
 Walk the plugin's prerequisite list in order. Marks acquired resources on the Plugin so release() can undo them later.
static void release (Plugin &plugin)
 Release every resource the plugin acquired during walk(), in reverse order of acquisition.

Detailed Description

Definition at line 24 of file Prerequisites.h.

Member Function Documentation

◆ release()

void cdc::plugin_manager::Prerequisites::release ( Plugin & plugin)
static

Release every resource the plugin acquired during walk(), in reverse order of acquisition.

Definition at line 130 of file Prerequisites.cpp.

References cdc::plugin_manager::Plugin::acquired_prereqs.

◆ walk()

PrereqResult cdc::plugin_manager::Prerequisites::walk ( Plugin & plugin,
std::string & out_failed_name,
std::string & out_on_fail )
staticnodiscard

Walk the plugin's prerequisite list in order. Marks acquired resources on the Plugin so release() can undo them later.

Parameters
out_failed_nameSet to the failing prerequisite name if !=Ok.
out_on_failFilled with the on_fail string for caller dispatch.

Definition at line 110 of file Prerequisites.cpp.

References cdc::plugin_manager::Plugin::acquired_prereqs, cdc::plugin_manager::HardFailed, cdc::plugin_manager::Plugin::id(), LOG_W, cdc::plugin_manager::Plugin::manifest(), cdc::plugin_manager::Ok, cdc::plugin_manager::PluginManifest::prerequisites, cdc::plugin_manager::SoftFailed, and cdc::plugin_manager::TAG.

Referenced by cdc::plugin_manager::PluginManager::startPlugin().


The documentation for this class was generated from the following files: