CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
PluginManifest.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <cstdint>
9#include <string>
10#include <vector>
11#include <map>
12
13namespace cdc::plugin_manager {
14
16 std::string name;
17 std::map<std::string, std::string> params;
18 std::string on_fail;
19};
20
22 bool wifi = false;
23 bool ble = false;
24 bool http = false;
25 bool socket = false;
26 bool ui_exclusive = false;
27 bool display_lowlevel = false;
28 bool sao = false;
29 bool grove = false;
30 bool pixel_strip = false;
36 bool background = false;
37 bool usb_cdc = false;
38 bool prevent_sleep = false;
44 bool vfat = false;
51 bool autoload = false;
52
53 std::vector<std::string> rmem;
54 std::vector<std::string> ecc;
55 std::vector<std::string> ble_service_uuids;
58 std::vector<std::string> message_types;
59 std::vector<uint8_t> gpio_pins;
60 std::vector<uint8_t> pwm_pins;
61 std::vector<uint8_t> adc_pins;
62 std::vector<uint8_t> i2c_bus;
63 std::string nvs_namespace;
64};
65
67 std::map<std::string, std::string> by_lang;
68};
69
71 std::string id;
72 std::string version;
73 std::string author;
74 std::string icon;
75 std::string host_api_level_min;
76 uint16_t api_level_major = 0;
77 uint16_t api_level_minor = 0;
78 uint32_t linear_memory_kb = 64;
79 std::string default_language;
80 std::map<std::string, LocalizedString> i18n_meta;
81 std::map<std::string, LocalizedString> i18n_strings;
83 std::vector<PrerequisiteSpec> prerequisites;
84
88 [[nodiscard]] static bool parse(const char* json, size_t len, PluginManifest& out);
89};
90
91} // namespace cdc::plugin_manager
std::map< std::string, std::string > by_lang
bool vfat
Allow sandboxed file access on the plugins FAT partition via the host_fs_* API. The plugin can only t...
bool autoload
Start this plugin as a resident background instance at badge boot. Plugins without this flag stay unl...
std::vector< std::string > ble_service_uuids
std::vector< std::string > message_types
bool background
Keep running and ticking in the background after the user leaves the plugin's view,...
std::vector< PrerequisiteSpec > prerequisites
std::map< std::string, LocalizedString > i18n_meta
static bool parse(const char *json, size_t len, PluginManifest &out)
Parse meta.json content. Returns false on schema errors.
std::map< std::string, LocalizedString > i18n_strings
std::map< std::string, std::string > params