Pulp
1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
descriptor_validation.hpp
Go to the documentation of this file.
1
#pragma once
2
3
// PluginDescriptor validation.
4
//
5
// Runs at plugin registration / test time — NEVER on the audio thread.
6
// Catches the common descriptor mistakes that otherwise surface as
7
// mysterious host-side "plugin did not appear" / "factory returned
8
// null" failures:
9
// - empty name / manufacturer / bundle_id / version
10
// - bundle_id that doesn't look like reverse-DNS
11
// - no output bus declared, or invalid main bus channel counts
12
// - instrument category with 0-channel output
13
// - accepts_midi / supports_mpe / supports_ump on effect category
14
// without any MIDI capability setup (legal but usually a mistake)
15
//
16
// Errors are returned as a vector — callers (test harnesses, registry
17
// loaders, `pulp validate`) format them. Pure function, no allocation
18
// beyond the result vector.
19
20
#include <
pulp/format/processor.hpp
>
21
22
#include <string>
23
#include <vector>
24
25
namespace
pulp::format
{
26
27
enum class
DescriptorIssueSeverity
{
28
Error
,
29
Warning
,
30
};
31
32
struct
DescriptorIssue
{
33
DescriptorIssueSeverity
severity
;
34
std::string
field
;
35
std::string
message
;
36
};
37
40
std::vector<DescriptorIssue>
validate_descriptor
(
const
PluginDescriptor
& d);
41
45
bool
descriptor_is_valid
(
const
std::vector<DescriptorIssue>& issues);
46
47
}
// namespace pulp::format
pulp::format
What the product grants a device: the quota table indexed by capability tier and live thermal state.
Definition
aax_editor.hpp:31
pulp::format::DescriptorIssueSeverity
DescriptorIssueSeverity
Definition
descriptor_validation.hpp:27
pulp::format::DescriptorIssueSeverity::Warning
@ Warning
Suspicious — plugin may behave unexpectedly.
Definition
descriptor_validation.hpp:29
pulp::format::DescriptorIssueSeverity::Error
@ Error
Invalid state — plugin will not load correctly.
Definition
descriptor_validation.hpp:28
pulp::format::descriptor_is_valid
bool descriptor_is_valid(const std::vector< DescriptorIssue > &issues)
True iff issues contains no Error severity entries.
pulp::format::validate_descriptor
std::vector< DescriptorIssue > validate_descriptor(const PluginDescriptor &d)
Run the validator.
processor.hpp
pulp::format::DescriptorIssue
Definition
descriptor_validation.hpp:32
pulp::format::DescriptorIssue::field
std::string field
"name", "bundle_id", "input_buses", ...
Definition
descriptor_validation.hpp:34
pulp::format::DescriptorIssue::message
std::string message
Definition
descriptor_validation.hpp:35
pulp::format::DescriptorIssue::severity
DescriptorIssueSeverity severity
Definition
descriptor_validation.hpp:33
pulp::format::PluginDescriptor
Plugin metadata — declared once, immutable.
Definition
plugin_descriptor.hpp:245
core
format
include
pulp
format
descriptor_validation.hpp
Generated by
1.15.0