IChapterRepository.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using MediaBrowser.Model.Entities;
  4. namespace MediaBrowser.Controller.Persistence;
  5. /// <summary>
  6. /// Interface IChapterRepository.
  7. /// </summary>
  8. public interface IChapterRepository
  9. {
  10. /// <summary>
  11. /// Deletes the chapters.
  12. /// </summary>
  13. /// <param name="itemId">The item.</param>
  14. void DeleteChapters(Guid itemId);
  15. /// <summary>
  16. /// Saves the chapters.
  17. /// </summary>
  18. /// <param name="itemId">The item.</param>
  19. /// <param name="chapters">The set of chapters.</param>
  20. void SaveChapters(Guid itemId, IReadOnlyList<ChapterInfo> chapters);
  21. /// <summary>
  22. /// Gets all chapters associated with the baseItem.
  23. /// </summary>
  24. /// <param name="baseItemId">The BaseItems id.</param>
  25. /// <returns>A readonly list of chapter instances.</returns>
  26. IReadOnlyList<ChapterInfo> GetChapters(Guid baseItemId);
  27. /// <summary>
  28. /// Gets a single chapter of a BaseItem on a specific index.
  29. /// </summary>
  30. /// <param name="baseItemId">The BaseItems id.</param>
  31. /// <param name="index">The index of that chapter.</param>
  32. /// <returns>A chapter instance.</returns>
  33. ChapterInfo? GetChapter(Guid baseItemId, int index);
  34. }