mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-28 23:25:52 +01:00
Add crates/desktop (mornye-desktop), a cdylib for dart:ffi that implements the desktop FFI contract: mornye_init, mornye_call, mornye_cancel, mornye_subscribe, mornye_unsubscribe and mornye_free. - Port the mobile host dispatcher once into a single method table: every CoreBackend.swift application method plus the Rust-backed AppDelegate osMethods, with plain filesystem paths. Other methods answer unimplemented. - Run calls on an elastic worker pool; restore the $bytes_key binary argument; acquire native data job leases synchronously. - Push download progress (kind 10), library scan progress (kind 11), inbound calls (kind 12) and log records (kind 13). - Drain the backend FFmpeg command queue by spawning the configured ffmpeg executable, keeping staging then rename and cancellation. - Re-export the mobile types the desktop crate dispatches to.
55 lines
1.6 KiB
Rust
55 lines
1.6 KiB
Rust
//! UniFFI mobile API. This crate is the only backend and routes the app on
|
|
//! Android and iOS.
|
|
//!
|
|
//! Comments that mention "Go" describe the retired Go backend, whose observable
|
|
//! behavior (wire formats, parsing quirks, file layouts) remains a compatibility
|
|
//! contract.
|
|
|
|
mod cancellation;
|
|
mod data_jobs;
|
|
mod extensions;
|
|
mod ffmpeg;
|
|
mod filename;
|
|
mod hires;
|
|
mod library_metadata;
|
|
mod logging;
|
|
mod lyrics;
|
|
mod manager;
|
|
mod metadata;
|
|
mod native_backup;
|
|
mod native_cache;
|
|
mod native_collections;
|
|
mod native_id3;
|
|
mod native_library;
|
|
mod native_listing;
|
|
mod native_lyrics;
|
|
mod native_playlist_write;
|
|
mod native_playlists;
|
|
mod network_tags;
|
|
mod progress;
|
|
mod repository;
|
|
mod tags;
|
|
mod usb_audio;
|
|
|
|
uniffi::setup_scaffolding!();
|
|
|
|
// Plain Rust surface for the desktop C ABI crate (`crates/desktop`), which
|
|
// dispatches the same calls without a UniFFI foreign binding.
|
|
pub use cancellation::{CancellationDomain, CancellationError, CancellationRegistry, RequestLease};
|
|
pub use data_jobs::run_native_data_job;
|
|
pub use extensions::{DownloadDirectoryScope, ExtensionEnvironment, JsExtensionError};
|
|
pub use ffmpeg::FfmpegCommands;
|
|
pub use filename::build_filename;
|
|
pub use hires::check_hires_authenticity;
|
|
pub use logging::LogBuffer;
|
|
pub use lyrics::LyricsRequest;
|
|
pub use manager::{ExtensionManager, ExtensionManagerError};
|
|
pub use progress::{DownloadProgressSubscription, DownloadState};
|
|
pub use repository::ExtensionRepository;
|
|
pub use tags::read_file_metadata;
|
|
|
|
#[uniffi::export]
|
|
pub fn sanitize_filename(filename: String) -> String {
|
|
mornye_core::filename::sanitize_filename(&filename)
|
|
}
|