Implements directory browser dialog, part 1: file system treeview

This commit is contained in:
BinaryAlley committed 2024-09-15 13:07:53 +03:00
1 parent 4a53348013
commit 4e4ecbbfca
318 files changed
+6012 -1184

No files matched your search

@@ -0,0 +1,57 @@
namespace Lumina.Contracts.Enums.AudioLibrary;
/// <summary>
/// Enumeration for the types of audio content libraries.
/// </summary>
public enum AudioContentType
{
/// <summary>
/// A musical composition typically consisting of vocals and/or instruments.
/// </summary>
Music,
/// <summary>
/// A recording of a book or other written work being read aloud.
/// </summary>
AudioBook,
/// <summary>
/// An audio recording of a live musical or spoken word performance.
/// </summary>
LivePerformance,
/// <summary>
/// A recorded conversation where one person asks questions and another provides answers.
/// </summary>
Interview,
/// <summary>
/// A new performance or recording of a previously released song.
/// </summary>
Cover,
/// <summary>
/// An alternative version of a recorded song, typically with altered instrumentation or structure.
/// </summary>
Remix,
/// <summary>
/// An audio recording used to create a specific acoustic environment or impression.
/// </summary>
Soundeffect,
/// <summary>
/// A digital audio file made available on the internet for downloading to a computer or mobile device.
/// </summary>
Podcast,
/// <summary>
/// A regularly scheduled broadcast program consisting of music, talk, or other audio content.
/// </summary>
RadioShow,
/// <summary>
/// A collection of music used as background sound for a movie, TV show, video game, or other media.
/// </summary>
Soundtrack,
}
@@ -0,0 +1,27 @@
namespace Lumina.Contracts.Enums.AudioLibrary;
/// <summary>
/// Enumeration for the various sources of audio ratings.
/// </summary>
public enum AudioRatingSource
{
/// <summary>
/// Ratings provided by users of the Lumina media library.
/// </summary>
User,
/// <summary>
/// Ratings sourced from MusicBrainz, an open music encyclopedia that collects music metadata.
/// </summary>
MusicBrainz,
/// <summary>
/// Ratings obtained from Discogs, a database and marketplace for music recordings.
/// </summary>
Discogs,
/// <summary>
/// Ratings from Last.fm, a music website that provides music recommendations based on user listening habits.
/// </summary>
LastFm,
}
@@ -0,0 +1,67 @@
namespace Lumina.Contracts.Enums.BookLibrary;
/// <summary>
/// Enumeration for various book formats.
/// </summary>
public enum BookFormat
{
/// <summary>
/// A book bound with rigid protective covers (typically cardboard covered with cloth, heavy paper, or leather).
/// </summary>
Hardcover,
/// <summary>
/// A book with a flexible paper cover, typically less durable than a hardcover.
/// </summary>
Paperback,
/// <summary>
/// A small, usually non-illustrated, and inexpensive paperback book.
/// </summary>
MassMarketPaperback,
/// <summary>
/// A larger, often higher-quality paperback book, typically used for literary fiction and nonfiction.
/// </summary>
TradePaperback,
/// <summary>
/// A digital version of a book that can be read on electronic devices.
/// </summary>
eBook,
/// <summary>
/// A recorded audio version of a book, either on physical media or as a digital file.
/// </summary>
Audiobook,
/// <summary>
/// A book printed with larger text for easier reading, often used by those with visual impairments.
/// </summary>
LargePrint,
/// <summary>
/// A sturdy book with thick cardboard pages, typically designed for young children.
/// </summary>
BoardBook,
/// <summary>
/// A book bound with a spiral wire or plastic coil, allowing it to lay flat when open.
/// </summary>
SpiralBound,
/// <summary>
/// A reinforced binding designed for frequent use, often used in schools and public libraries.
/// </summary>
LibraryBinding,
/// <summary>
/// A book bound in leather, often used for luxury or collector's editions.
/// </summary>
LeatherBound,
/// <summary>
/// A book with three-dimensional paper engineering, creating pop-up or movable parts.
/// </summary>
PopupBook
}
@@ -0,0 +1,27 @@
namespace Lumina.Contracts.Enums.BookLibrary;
/// <summary>
/// Enumeration for the various sources of book ratings.
/// </summary>
public enum BookRatingSource
{
/// <summary>
/// Ratings provided by users of the Lumina system.
/// </summary>
User,
/// <summary>
/// Ratings sourced from Goodreads, a social network for book readers that provides book recommendations and reviews.
/// </summary>
Goodreads,
/// <summary>
/// Ratings obtained from Amazon, an e-commerce platform that includes customer reviews and ratings for books.
/// </summary>
Amazon,
/// <summary>
/// Ratings from Google Books, a service that searches the full text of books and magazines that Google has scanned and converted to text.
/// </summary>
GoogleBooks,
}
@@ -0,0 +1,19 @@
namespace Lumina.Contracts.Enums.BookLibrary;
/// <summary>
/// Enumeration for the different ISBN (International Standard Book Number) formats.
/// </summary>
public enum IsbnFormat
{
/// <summary>
/// The 10-digit ISBN format used for books published before 2007.
/// Example: 0-306-40615-2
/// </summary>
Isbn10,
/// <summary>
/// The 13-digit ISBN format introduced in 2007, now the standard for all new books.
/// Example: 978-0-306-40615-7
/// </summary>
Isbn13
}
@@ -0,0 +1,62 @@
namespace Lumina.Contracts.Enums.BookLibrary;
/// <summary>
/// Enumeration for the types of written content libraries.
/// </summary>
public enum WrittenContentType
{
/// <summary>
/// A printed or written literary work.
/// </summary>
Book,
/// <summary>
/// An electronic version of a printed book.
/// </summary>
EBook,
/// <summary>
/// A set of related books published in succession.
/// </summary>
BookSeries,
/// <summary>
/// A magazine or book containing sequential art in the form of a narrative.
/// </summary>
ComicBook,
/// <summary>
/// A set of related comic books published in succession.
/// </summary>
ComicSeries,
/// <summary>
/// A periodical publication containing articles, stories, and other content.
/// </summary>
Magazine,
/// <summary>
/// A style of Japanese comic books and graphic novels.
/// </summary>
Manga,
/// <summary>
/// A novel in comic-strip format, typically with sophisticated artwork and complex storylines.
/// </summary>
GraphicNovel,
/// <summary>
/// A scholarly article presenting original research or analysis.
/// </summary>
AcademicPaper,
/// <summary>
/// A handwritten or printed form of musical notation.
/// </summary>
SheetMusic,
/// <summary>
/// A script for a film, television program, or other visual media.
/// </summary>
Screenplay,
}
@@ -0,0 +1,37 @@
namespace Lumina.Contracts.Enums.FileSystem;
/// <summary>
/// Enumeration for file access mode types.
/// </summary>
public enum FileAccessMode
{
/// <summary>
/// Represents the ability to list the contents of a directory.
/// </summary>
ListDirectory,
/// <summary>
/// Represents the ability to read file or directory properties.
/// </summary>
ReadProperties,
/// <summary>
/// Represents the ability to read the contents of a file.
/// </summary>
ReadContents,
/// <summary>
/// Represents the ability to write to a file or directory.
/// </summary>
Write,
/// <summary>
/// Represents the ability to execute a file.
/// </summary>
Execute,
/// <summary>
/// Represents the ability to delete a file or directory.
/// </summary>
Delete,
}
@@ -0,0 +1,22 @@
namespace Lumina.Contracts.Enums.FileSystem;
/// <summary>
/// Enumeration for file system item statuses types.
/// </summary>
public enum FileSystemItemStatus
{
/// <summary>
/// Indicates that the file system item is accessible.
/// </summary>
Accessible,
/// <summary>
/// Indicates that the file system item is inaccessible due to permissions or other restrictions.
/// </summary>
Inaccessible,
/// <summary>
/// Indicates that the status of the file system item could not be determined due to an unknown error.
/// </summary>
UnknownError
}
@@ -0,0 +1,22 @@
namespace Lumina.Contracts.Enums.FileSystem;
/// <summary>
/// Enumeration for the types of file system elements.
/// </summary>
public enum FileSystemItemType
{
/// <summary>
/// Represents a file system root, which can be a drive on Windows, and a path separator on Unix.
/// </summary>
Root,
/// <summary>
/// Represents a directory, which is a directory that can contain other directories or files.
/// </summary>
Directory,
/// <summary>
/// Represents a file, which is a document, executable, or other data stored on the file system.
/// </summary>
File
}
@@ -0,0 +1,17 @@
namespace Lumina.Contracts.Enums.FileSystem;
/// <summary>
/// Enumeration for platform types.
/// </summary>
public enum PlatformType
{
/// <summary>
/// Represents Unix-based operating systems, including Linux and macOS.
/// </summary>
Unix,
/// <summary>
/// Represents Microsoft Windows operating systems.
/// </summary>
Windows,
}
@@ -0,0 +1,32 @@
namespace Lumina.Contracts.Enums.Library;
/// <summary>
/// Enumeration for the types of libraries.
/// </summary>
public enum LibraryType
{
/// <summary>
/// Content that is written, such as books, articles, or other written works.
/// </summary>
WrittenContent,
/// <summary>
/// Content that is video, such as movies, TV shows, or other video works.
/// </summary>
VideoContent,
/// <summary>
/// Content that is audio, such as podcasts, radio shows, or other audio works.
/// </summary>
AudioContent,
/// <summary>
/// Content that is visual, such as images, paintings, or other visual works.
/// </summary>
VisualContent,
/// <summary>
/// Content that is miscellaneous, such as lyrics, movie posters, or other miscellaneous works.
/// </summary>
MiscellaneousContent,
}
@@ -0,0 +1,12 @@
namespace Lumina.Contracts.Enums.Library;
/// <summary>
/// Enumeration for the types of miscellaneous content libraries.
/// </summary>
public enum MiscellaneousContentType
{
/// <summary>
/// A collection of media that does not fit into any other category.
/// </summary>
Other,
}
@@ -0,0 +1,24 @@
namespace Lumina.Contracts.Enums.PhotoLibrary;
/// <summary>
/// Enumeration for known image types.
/// </summary>
public enum ImageType
{
None,
BMP,
GIF,
PNG,
TIFF,
JPEG,
JPEG_CANON,
JPEG_UNKNOWN,
PICT,
ICO,
PSD,
JPEG2000,
AVIF,
WEBP,
TGA,
SVG,
}
@@ -0,0 +1,12 @@
namespace Lumina.Contracts.Enums.PhotoLibrary;
/// <summary>
/// Enumeration for the types of visual content libraries.
/// </summary>
public enum VisualContentType
{
/// <summary>
/// A collection of photographs organized together.
/// </summary>
PhotoAlbum,
}
@@ -0,0 +1,62 @@
namespace Lumina.Contracts.Enums.FileSystem.VideoLibrary;
/// <summary>
/// Enumeration for the types of video content libraries.
/// </summary>
public enum VideoContentType
{
/// <summary>
/// A series of related episodes broadcast on television or streaming platforms.
/// </summary>
TvShow,
/// <summary>
/// A feature-length film produced for cinema or home viewing.
/// </summary>
Movie,
/// <summary>
/// A collection of related films released in succession.
/// </summary>
FilmSeries,
/// <summary>
/// A collection of related films, TV shows, and other media sharing a fictional universe.
/// </summary>
FilmFranchise,
/// <summary>
/// A live musical performance recorded on video.
/// </summary>
Concert,
/// <summary>
/// A non-fictional film or TV program presenting facts and information about a specific subject.
/// </summary>
Documentary,
/// <summary>
/// An instructional video designed to teach a skill or provide information on a specific topic.
/// </summary>
Tutorial,
/// <summary>
/// Privately recorded videos, often for personal use or sharing with friends and family.
/// </summary>
Personal,
/// <summary>
/// Japanese animated productions, typically characterized by colorful graphics and vibrant characters.
/// </summary>
Anime,
/// <summary>
/// Videos hosted on or originating from the YouTube platform.
/// </summary>
Youtube,
/// <summary>
/// A short video, typically set to music, such as a music video or promotional clip.
/// </summary>
Videoclip,
}
@@ -0,0 +1,32 @@
namespace Lumina.Contracts.Enums.VideoLibrary;
/// <summary>
/// Enumeration for the various sources of video ratings.
/// </summary>
public enum VideoRatingSource
{
/// <summary>
/// Ratings provided by users of the Lumina media library.
/// </summary>
User,
/// <summary>
/// Ratings sourced from IMDb (Internet Movie Database), an online database of information related to films, TV programs, and video games.
/// </summary>
Imdb,
/// <summary>
/// Ratings obtained from TheTVDB, an open database for television shows, including episode information and user ratings.
/// </summary>
TheTvDb,
/// <summary>
/// Ratings from The Movie Database (TMDb), a community-built movie and TV database.
/// </summary>
TheMovieDb,
/// <summary>
/// Ratings from Rotten Tomatoes, a review-aggregation website for film and television.
/// </summary>
RottenTomatoes,
}
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>$(SolutionDir)..\bin\server\</BaseOutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\AssemblyInfo_Shared.cs" Link="Properties\AssemblyInfo_Shared.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Responses\WrittenContentLibrary\BookLibrary\" />
</ItemGroup>
</Project>
@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.Common;
/// <summary>
/// Represents a request to get genre information.
/// </summary>
/// <param name="Name">Gets the name of the genre.</param>
[DebuggerDisplay("{Name}")]
public record GenreModel(
string? Name
);
@@ -0,0 +1,28 @@
#region ========================================================================= USING =====================================================================================
using System;
#endregion
namespace Lumina.Contracts.Models.Common;
/// <summary>
/// Interface for storage models, enforces Id.
/// </summary>
public interface IStorageEntity
{
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets or sets the identifier of the entity.
/// </summary>
Guid Id { get; init; }
/// <summary>
/// The time and date when the entity was added.
/// </summary>
DateTime Created { get; set; }
/// <summary>
/// The time and date when the entity was updated.
/// </summary>
DateTime? Updated { get; set; }
#endregion
}
@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.Common;
/// <summary>
/// Represents a request to get language information.
/// </summary>
/// <param name="LanguageCode">Gets the ISO code of the language (e.g., "en" for English).</param>
/// <param name="LanguageName">Gets the name of the language in English.</param>
/// <param name="NativeName">Gets the native name of the language (e.g., "Español" for Spanish).</param>
[DebuggerDisplay("{LanguageName}")]
public record LanguageInfoModel(
string? LanguageCode,
string? LanguageName,
string? NativeName
);
@@ -0,0 +1,18 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.Common;
/// <summary>
/// Represents a rating.
/// </summary>
/// <param name="Value">Gets the rating value.</param>
/// <param name="MaxValue">Gets the maximum possible rating value.</param>
/// <param name="VoteCount">Gets the number of votes that contributed to the rating.</param>
[DebuggerDisplay("{Value}/{MaxValue}")]
public abstract record RatingModel(
decimal? Value,
decimal? MaxValue,
int? VoteCount
);
@@ -0,0 +1,25 @@
#region ========================================================================= USING =====================================================================================
using System;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.Common;
/// <summary>
/// Represents a request to get release information.
/// </summary>
/// <param name="OriginalReleaseDate">Gets the original release date of the content.</param>
/// <param name="OriginalReleaseYear">Gets the original release year of the content.</param>
/// <param name="ReReleaseDate">Gets the re-release date of the content, if applicable.</param>
/// <param name="ReReleaseYear">Gets the re-release year of the content, if applicable.</param>
/// <param name="ReleaseCountry">Gets the country where the content was released.</param>
/// <param name="ReleaseVersion">Gets the version or edition of the content's release.</param>
[DebuggerDisplay("{OriginalReleaseDate}")]
public record ReleaseInfoModel(
DateOnly? OriginalReleaseDate,
int? OriginalReleaseYear,
DateOnly? ReReleaseDate,
int? ReReleaseYear,
string? ReleaseCountry,
string? ReleaseVersion
);
@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.Common;
/// <summary>
/// Represents a request to get tag information.
/// </summary>
/// <param name="Name">Gets the name of the tag.</param>
[DebuggerDisplay("{Name}")]
public record TagModel(
string? Name
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.MediaContributors;
/// <summary>
/// Represents a media contributor.
/// </summary>
/// <param name="Name">Gets the name details of the media contributor, including display and legal names.</param>
/// <param name="Role">Gets the role details of the media contributor, including the role name and category.</param>
[DebuggerDisplay("{Name} {Role}")]
public record MediaContributorModel(
MediaContributorNameModel? Name,
MediaContributorRoleModel? Role
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.MediaContributors;
/// <summary>
/// Represents a media contributor name.
/// </summary>
/// <param name="DisplayName">Gets the display name of the media contributor.</param>
/// <param name="LegalName">Gets the legal name of the media contributor.</param>
[DebuggerDisplay("{DisplayName}")]
public record MediaContributorNameModel(
string? DisplayName,
string? LegalName
);
@@ -0,0 +1,16 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.MediaContributors;
/// <summary>
/// Represents a media contributor role.
/// </summary>
/// <param name="Name">Gets the name of the role assigned to the media contributor.</param>
/// <param name="Category">Gets the category of the role, which may describe the type or group of roles.</param>
[DebuggerDisplay("{Name} {Category}")]
public record MediaContributorRoleModel(
string? Name,
string? Category
);
@@ -0,0 +1,208 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Models.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Represents a book.
/// </summary>
[DebuggerDisplay("{Title}")]
public class BookModel : IStorageEntity
{
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the Id of the media item.
/// </summary>
public Guid Id { get; init; }
/// <summary>
/// Gets the title of the media item.
/// </summary>
public string Title { get; init; } = null!;
/// <summary>
/// Gets the original title of the media item.
/// </summary>
public string? OriginalTitle { get; init; }
/// <summary>
/// Gets the optional description of the media item.
/// </summary>
public string? Description { get; init; }
/// <summary>
/// Gets the optional original release date of the media item.
/// </summary>
public DateOnly? OriginalReleaseDate { get; init; }
/// <summary>
/// Gets the optional original release year of the media item.
/// This is useful when only the year of original release is known.
/// </summary>
public int? OriginalReleaseYear { get; init; }
/// <summary>
/// Gets the optional re-release or reissue date of the media item.
/// </summary>
public DateOnly? ReReleaseDate { get; init; }
/// <summary>
/// Gets the optional re-release or reissue year of the media item.
/// </summary>
public int? ReReleaseYear { get; init; }
/// <summary>
/// Gets the optional country or region of release.
/// </summary>
public string? ReleaseCountry { get; init; }
/// <summary>
/// Gets the optional release version or edition. (e.g. "Original", "Director's Cut", "2.0")
/// </summary>
public string? ReleaseVersion { get; init; }
/// <summary>
/// Gets the ISO 639-1 two-letter language code.
/// </summary>
public string? LanguageCode { get; init; }
/// <summary>
/// Gets the full name of the language in English.
/// </summary>
public string? LanguageName { get; init; }
/// <summary>
/// Gets an optional native name of the language.
/// </summary>
public string? LanguageNativeName { get; init; }
/// <summary>
/// Gets the optional ISO 639-1 two-letter original language code.
/// </summary>
public string? OriginalLanguageCode { get; init; }
/// <summary>
/// Gets the optional full name of the original language in English.
/// </summary>
public string? OriginalLanguageName { get; init; }
/// <summary>
/// Gets an optional native name of the original language.
/// </summary>
public string? OriginalLanguageNativeName { get; init; }
/// <summary>
/// Gets the list of tags associated with the media item.
/// </summary>
public HashSet<TagModel> Tags { get; set; } = [];
/// <summary>
/// Gets the list of genres associated with the media item.
/// </summary>
public HashSet<GenreModel> Genres { get; set; } = [];
/// <summary>
/// Gets the publisher of the written content.
/// </summary>
public string? Publisher { get; init; }
/// <summary>
/// Gets the number of pages in the written content.
/// </summary>
public int? PageCount { get; init; }
/// <summary>
/// Gets the format of the book (e.g., Hardcover, Paperback), if applicable.
/// </summary>
public string Format { get; init; } = null!;
/// <summary>
/// Gets the edition of the book, if applicable.
/// </summary>
public string? Edition { get; init; }
/// <summary>
/// Gets the volume or book number in the series, if applicable.
/// </summary>
public int? VolumeNumber { get; init; }
/// <summary>
/// Gets the series id, if the book is part of a series.
/// </summary>
//public Guid? BookSeriesId { get; init; } = null;
/// <summary>
/// Gets the ASIN (Amazon Standard Identification Number) of the book.
/// </summary>
public string? ASIN { get; init; } = null!;
/// <summary>
/// Gets the Goodreads ID of the book.
/// </summary>
public string? GoodreadsId { get; init; } = null!;
/// <summary>
/// Gets the Library of Congress Control Number (LCCN) of the book.
/// </summary>
public string? LCCN { get; init; } = null!;
/// <summary>
/// Gets the OCLC Number (WorldCat identifier) of the book.
/// </summary>
public string? OCLCNumber { get; init; } = null!;
/// <summary>
/// Gets the Open Library ID of the book.
/// </summary>
public string? OpenLibraryId { get; init; } = null!;
/// <summary>
/// Gets the LibraryThing ID of the book.
/// </summary>
public string? LibraryThingId { get; init; } = null!;
/// <summary>
/// Gets the Google Books ID of the book.
/// </summary>
public string? GoogleBooksId { get; init; } = null!;
/// <summary>
/// Gets the Barnes & Noble ID of the book.
/// </summary>
public string? BarnesAndNobleId { get; init; } = null!;
/// <summary>
/// Gets the Apple Books ID of the book.
/// </summary>
public string? AppleBooksId { get; init; } = null!;
/// <summary>
/// Gets the list of ISBN (International Standard Book Number) of the book.
/// </summary>
public List<IsbnModel> ISBNs { get; set; } = [];
/// <summary>
/// Gets the list of media contributors (actors, directors, etc) starring in this book.
/// </summary>
//public List<ContributorIdModel> ContributorIds { get; init; } = [];
/// <summary>
/// Gets the list of ratings for this book.
/// </summary>
public List<BookRatingModel> Ratings { get; init; } = [];
/// <summary>
/// Gets the time and date when the entity was added.
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// Gets the optional time and date when the entity was updated.
/// </summary>
public DateTime? Updated { get; set; }
#endregion
}
@@ -0,0 +1,22 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Enums.BookLibrary;
using Lumina.Contracts.Models.Common;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Represents a book rating.
/// </summary>
/// <param name="Value">Gets the rating value for the book.</param>
/// <param name="MaxValue">Gets the maximum possible rating value for the book.</param>
/// <param name="Source">Gets the source of the book rating (e.g., a specific website or platform).</param>
/// <param name="VoteCount">Gets the number of votes that contributed to the book rating.</param>
[DebuggerDisplay("{Value}/{MaxValue}")]
public record BookRatingModel(
decimal? Value,
decimal? MaxValue,
BookRatingSource? Source,
int? VoteCount
) : RatingModel(Value, MaxValue, VoteCount);
@@ -0,0 +1,14 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Represents a request to get book series information.
/// </summary>
/// <param name="Title">Gets the title of the book series.</param>
[DebuggerDisplay("{Title}")]
public record BookSeriesModel(
string? Title
);
@@ -0,0 +1,17 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Enums.BookLibrary;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Represents a request to get ISBN information.
/// </summary>
/// <param name="Value">Gets the ISBN value.</param>
/// <param name="Format">Gets the format of the ISBN (e.g., ISBN-10 or ISBN-13).</param>
[DebuggerDisplay("{Value} ({Format})")]
public record IsbnModel(
string? Value,
IsbnFormat? Format
);
@@ -0,0 +1,34 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Models.Common;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Models.WrittenContentLibrary;
/// <summary>
/// Represents written content metadata.
/// </summary>
/// <param name="Title">Gets the title of the written content.</param>
/// <param name="OriginalTitle">Gets the original title of the written content, if different from the current title.</param>
/// <param name="Description">Gets a brief description or summary of the written content.</param>
/// <param name="ReleaseInfo">Gets the release information, including release date and other relevant details.</param>
/// <param name="Genres">Gets the list of genres associated with the written content.</param>
/// <param name="Tags">Gets the list of tags that further describe or categorize the written content.</param>
/// <param name="Language">Gets the language in which the written content is written.</param>
/// <param name="OriginalLanguage">Gets the original language of the written content, if it has been translated.</param>
/// <param name="Publisher">Gets the name of the publisher of the written content.</param>
/// <param name="PageCount">Gets the number of pages in the written content.</param>
[DebuggerDisplay("{Title}")]
public record WrittenContentMetadataModel(
string? Title,
string? OriginalTitle,
string? Description,
ReleaseInfoModel? ReleaseInfo,
List<GenreModel>? Genres,
List<TagModel>? Tags,
LanguageInfoModel? Language,
LanguageInfoModel? OriginalLanguage,
string? Publisher,
int? PageCount
);
@@ -0,0 +1,49 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Enums.BookLibrary;
using Lumina.Contracts.Models.MediaContributors;
using Lumina.Contracts.Models.WrittenContentLibrary;
using Lumina.Contracts.Models.WrittenContentLibrary.BookLibrary;
using System.Collections.Generic;
#endregion
namespace Lumina.Contracts.Requests.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Represents a request to add a book.
/// </summary>
/// <param name="Metadata">Written content metadata of the book.</param>
/// <param name="Format">The format of the book (e.g., Hardcover, Paperback), if applicable.</param>
/// <param name="Edition">The edition of the book, if applicable.</param>
/// <param name="VolumeNumber">The volume or book number in the series, if applicable.</param>
/// <param name="Series">The series name, if the book is part of a series.</param>
/// <param name="ASIN">The ASIN (Amazon Standard Identification Number) of the book, if applicable.</param>
/// <param name="GoodreadsId">The Goodreads ID of the book, if applicable.</param>
/// <param name="LCCN">The Library of Congress Control Number (LCCN) of the book, if applicable.</param>
/// <param name="OCLCNumber">The OCLC Number (WorldCat identifier) of the book, if applicable.</param>
/// <param name="OpenLibraryId">The Open Library ID of the book, if applicable.</param>
/// <param name="LibraryThingId">The LibraryThing ID of the book, if applicable.</param>
/// <param name="GoogleBooksId">The Google Books ID of the book, if applicable.</param>
/// <param name="BarnesAndNobleId">The Barnes & Noble ID of the book, if applicable.</param>
/// <param name="AppleBooksId">The Apple Books ID of the book, if applicable.</param>
/// <param name="ISBNs">The list of ISBN (International Standard Book Number) of the book.</param>
/// <param name="Contributors">The list of media contributors (actors, directors, etc) starring in this book.</param>
/// <param name="Ratings">The list of ratings for this book.</param>
public record AddBookRequest(
WrittenContentMetadataModel? Metadata,
BookFormat? Format,
string? Edition,
int? VolumeNumber,
BookSeriesModel? Series,
string? ASIN,
string? GoodreadsId,
string? LCCN,
string? OCLCNumber,
string? OpenLibraryId,
string? LibraryThingId,
string? GoogleBooksId,
string? BarnesAndNobleId,
string? AppleBooksId,
List<IsbnModel>? ISBNs,
List<MediaContributorModel>? Contributors,
List<BookRatingModel>? Ratings
);
@@ -0,0 +1,46 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Enums.FileSystem;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Contracts.Responses.FileManagement;
/// <summary>
/// Generic file system node.
/// </summary>
[DebuggerDisplay("{Path}")]
public class FileSystemTreeNodeResponse
{
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets or sets the full path of the file or directory.
/// </summary>
public string Path { get; set; } = null!;
/// <summary>
/// Gets or sets the name of the file or directory.
/// </summary>
public string Name { get; set; } = null!;
/// <summary>
/// Gets or sets the type of the item, indicating whether it is a file, directory, or drive.
/// </summary>
public FileSystemItemType ItemType { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the node is expanded.
/// </summary>
public bool IsExpanded { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the child nodes have been loaded.
/// </summary>
public bool ChildrenLoaded { get; set; }
/// <summary>
/// Gets or sets the list of child nodes.
/// </summary>
public List<FileSystemTreeNodeResponse> Children { get; set; } = [];
#endregion
}
@@ -0,0 +1,13 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Contracts.Enums.FileSystem;
#endregion
namespace Lumina.Contracts.Responses.FileManagement;
/// <summary>
/// Represents a response containing the file system platform type.
/// </summary>
/// <param name="PlatformType">The returned file system platform type.</param>
public record FileSystemTypeResponse(
PlatformType PlatformType
);
@@ -0,0 +1,9 @@
namespace Lumina.Contracts.Responses.FileManagement;
/// <summary>
/// Represents a response containing a file system path.
/// </summary>
/// <param name="Path">The returned path.</param>
public record PathSegmentResponse(
string Path
);
@@ -0,0 +1,9 @@
namespace Lumina.Contracts.Responses.FileManagement;
/// <summary>
/// Represents a response to the inquiry about the system's path separator.
/// </summary>
/// <param name="Separator">The system's path separator.</param>
public record PathSeparatorResponse(
string Separator
);
@@ -0,0 +1,9 @@
namespace Lumina.Contracts.Responses.FileManagement;
/// <summary>
/// Represents a response containing the result of splitting a file system path.
/// </summary>
/// <param name="PathSegments">The returned path segments.</param>
public record SplitPathResponse(
string[] PathSegments
);