License acquisition flow
Short description of the architecture used by Licensecc::acquire_license
after the cursor/parser refactor.
Components
Component |
Responsibility |
|---|---|
|
Orchestrates the whole flow; owns the |
|
Builds the list of active |
|
Iterates over the strategies and their locations, yielding |
|
Parses one |
|
Verifies (signature and limits) one |
|
Picks the best valid license (no-input, or latest expiry) and fills
|
Sequence diagram
sequenceDiagram
participant C as C API
participant F as Licensecc
participant LF as LocatorFactory
participant P as LicenseParser
participant V as LicenseVerifier
C->>+F: acquire_license(callerInfo, <br> licenseLocation, license_out)
F->>LF: get_active_strategies(strategies, licenseLocation)
LF-->>F: vector <LocatorStrategy>
loop each strategy and location (FoundLicenseCursor)
F->>+P: parseLicense(RawLicenseData)
P-->>-F: vector <FullLicenseInfo>
loop each FullLicenseInfo
F->>+V: verify_limit(fullLicenseInfo, er, LicenseInfoEx)
V-->>-F: LicenseInfoEx (return_code + LicenseInfo)
end
end
F->>F: mergeLicenses(all_results, er, license_out)
F-->>-C: result
Notes
Strategies that return no locations are skipped by the cursor.
Events (found/not found/malformed) are recorded in the shared
EventRegistryand exported toLicenseInfo::statusat the end.mergeLicenseschooses the license with no expiry, else the one with the latestdays_left/expiry among the valid ones.