namespace Febe.Core.Domain; /// /// Kind of an entry (spec §4.3). The folder name and the {tipo} placeholder are the Italian names /// returned by . /// public enum EntryKind { /// Grid post, reels included («post»). Post, /// Active story («storie»). Story, /// Item of a highlight collection («evidenza»). Highlight, /// Someone else's post where the account appears («taggati»). Tagged, /// Profile picture, one copy per change («profilo»). ProfilePicture, } public static class EntryKindNames { /// Folder name and value of the {tipo} placeholder. public static string Folder(EntryKind kind) => kind switch { EntryKind.Post => "post", EntryKind.Story => "storie", EntryKind.Highlight => "evidenza", EntryKind.Tagged => "taggati", EntryKind.ProfilePicture => "profilo", _ => throw new ArgumentOutOfRangeException(nameof(kind), kind, null), }; public static EntryKind? FromFolder(string folder) => folder.ToLowerInvariant() switch { "post" => EntryKind.Post, "storie" => EntryKind.Story, "evidenza" => EntryKind.Highlight, "taggati" => EntryKind.Tagged, "profilo" => EntryKind.ProfilePicture, _ => null, }; } /// State of an entry (spec §8.3). public enum EntryState { /// da scaricare ToDownload, /// scaricato Downloaded, /// parziale: some files missing Partial, /// fallito Failed, /// saltato: excluded by a limit (e.g. video too large) Skipped, /// importato Imported, /// eliminato: kept in the database without files so it is not downloaded again Deleted, } /// State of a single file. public enum MediaState { ToDownload, Downloaded, Failed, Skipped, Imported, Deleted, /// The signed address expired: needs the Post singolo recipe (not possible for stories). Expired, } public enum MediaKind { Photo, Video, } /// Where an entry came from. public enum Provenance { Downloaded, Imported, } /// State of a followed account (spec §4.2). public enum AccountState { /// Aggiornato UpToDate, /// Storico in corso Backfilling, /// In pausa Paused, /// Solo archivio: never contacted ArchiveOnly, /// Non raggiungibile: private and not followed, missing, blocked, renamed Unreachable, } /// Check frequency of an account (spec §7.3). public enum Frequency { Low, Normal, High, /// Su misura: explicit hours for posts and maximum interval for stories. Custom, } /// The six per-account switches of «Cosa scaricare» (spec §4.3, §4.4). [Flags] public enum ContentTypes { None = 0, /// Foto dei post PostPhotos = 1, /// Video e reel PostVideos = 2, /// Storie Stories = 4, /// Storie in evidenza Highlights = 8, /// Post in cui è taggato Tagged = 16, /// Foto del profilo ProfilePicture = 32, All = PostPhotos | PostVideos | Stories | Highlights | Tagged | ProfilePicture, } /// Starting points when adding accounts (spec §4.2). public enum StartingPoint { /// Scarica tutto e tieni aggiornato EverythingAndKeepUpdated, /// Solo le novità da oggi OnlyNewFromToday, /// Solo le storie OnlyStories, } /// Caution profiles (spec §7.5). Prudent is the default. public enum CautionProfileKind { Prudent, Balanced, Fast, Custom, } /// «Ritmo dei gesti» slider (spec §7.7). public enum GesturePace { Slow, Natural, Brisk, }