Skip to main content

spoolframe_types/
lib.rs

1//! The types every Spoolframe client sees: the media model and its
2//! identifiers.
3//!
4//! These are Spoolframe's own models, not Plex's. Plex is a source of
5//! metadata behind the server; these types do not depend on it.
6//!
7//! Permissively licensed (MIT OR Apache-2.0) so that any client, open or
8//! proprietary, can link it. It never depends on an AGPL server crate.
9
10pub mod browse;
11pub mod capabilities;
12pub mod codec;
13pub mod codec_string;
14pub mod date;
15pub mod id;
16pub mod language;
17pub mod media;
18pub mod model;
19pub mod platform;
20pub mod preferences;
21pub mod rating;
22pub mod required;
23pub mod role;
24pub mod search;
25pub mod serde_time;
26#[cfg(test)]
27mod test_support;
28#[cfg(feature = "uniffi")]
29mod uniffi_methods;
30#[cfg(feature = "uniffi")]
31mod uniffi_types;
32pub mod wire;
33
34#[cfg(feature = "uniffi")]
35uniffi::setup_scaffolding!();
36
37pub use browse::{
38    Counted, DynamicRange, FilterPart, FilterValue, ItemFilter, ItemFilterValues, ItemQuery,
39    ItemSort, Resolution, SortKey, WatchedState,
40};
41pub use capabilities::{CodecProbe, Decoders, candidate_codec_strings};
42pub use codec::{
43    AudioCodec, ClientCapabilities, Container, Delivery, DisplayCapabilities, HdrFormat,
44    SubtitleFormat, VideoCodec, VideoLimits,
45};
46pub use codec_string::{CodecString, CodecStringError, Tier};
47pub use date::{CalendarDate, DateError};
48pub use id::{ArtworkId, IdError, LibraryId, MediaId, MediaKind, Namespace, PersonId};
49pub use media::{
50    AudioRole, AudioTrack, MediaTracks, QuotaOf, SubtitleDownload, SubtitleDownloaded,
51    SubtitleOrigin, SubtitleResult, SubtitleRole, SubtitleSearch, SubtitleSource,
52    SubtitleSourceState, SubtitleSourceStatus, SubtitleSync, SubtitleTiming, SubtitleTrack,
53    VideoTrack,
54};
55pub use model::{
56    Album, Artist, Artwork, ArtworkKind, Caption, CastMember, Episode, Item, Library, LibraryKind,
57    LibraryServer, Marker, MarkerKind, Markers, MergeFacts, Movie, PlaybackState, Progress, Season,
58    Show, Track, YearsAired,
59};
60pub use platform::Platform;
61pub use preferences::{
62    AudioPreferences, BitmapPreference, ForcedPreference, RecentMoviesMode, RecentMusicMode,
63    RecentShowsMode, RecentlyPlayedPreferences, SdhPreference, SubtitleMode, SubtitlePreferences,
64    TrackPreferences,
65};
66pub use rating::{RATING_SOURCE_FIELDS, RatingProvider, RatingScale, RatingSource, RatingState};
67pub use role::Role;
68pub use search::{Person, PersonRole, SearchKind, SearchScope};
69
70pub mod pin;
71
72/// Password syntax shared by clients and servers.
73pub mod password {
74    /// The fewest characters a new password may have.
75    pub const MIN_CHARS: usize = 8;
76}
77
78/// The domain every server's app passkeys are made under: a server's
79/// relying party is `<server id>.spoolframe.app`. Every client and the
80/// admin API use this one value.
81pub const APP_RP_DOMAIN: &str = "spoolframe.app";