Overview
There must be a way for a developer to switch between the "high-level API" (e.g. djinterop::database) and "low-level APIs" (e.g. djinterop::engine::v2::engine_library) when in possession of one or the other.
The engine_library class already has a method database(), which allows access to the high-level API. But there is no equivalent in the other direction.
Acceptance Criteria
- All handle-like type in the high-level API (e.g.
database, track, crate, playlist) must offer a way to cast to the equivalent in a low-level API.
- A failure to cast (e.g. wrong low-level database type) must result in an appropriately human-readable exception to the developer.
- All types in each low-level API which have an equivalent in the high-level API must offer a way to cast to that equivalent.