unlock: add Unlocker::name() + report-only applies_to() for the matrix
Each unlocker now carries its own stable name() (the single source; apps never hardcode it) and a report-only applies_to() — phase-independent 'would this apply to this drive+disc', distinct from the dispatch-gated matches(). LibreDrive overrides applies_to to report on drive identity regardless of disc kind (its matches() is gated to the Unknown-kind init phase). Enables a registry-driven unlocker matrix.
This commit is contained in:
@@ -160,6 +160,10 @@ impl Default for CssUnlocker {
|
||||
}
|
||||
|
||||
impl crate::Unlocker for CssUnlocker {
|
||||
fn name(&self) -> &'static str {
|
||||
"CSS"
|
||||
}
|
||||
|
||||
fn matches(&self, ctx: &crate::UnlockCtx) -> bool {
|
||||
ctx.kind == crate::DiscKind::Css
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user