| 1 |
/* |
| 2 |
* Copyright (C) 2023 Team Kodi |
| 3 |
* This file is part of Kodi - https://kodi.tv |
| 4 |
* |
| 5 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
* See LICENSES/README.md for more information. |
| 7 |
*/ |
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "utils/SortUtils.h" |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
class CFileItem; |
| 16 |
class CFileItemList; |
| 17 |
|
| 18 |
class ISlideShowDelegate |
| 19 |
{ |
| 20 |
public: |
| 21 |
ISlideShowDelegate() = default; |
| 22 |
virtual ~ISlideShowDelegate() = default; |
| 23 |
|
| 24 |
virtual void Add(const CFileItem* picture) = 0; |
| 25 |
virtual bool IsPlaying() const = 0; |
| 26 |
virtual void Select(const std::string& picture) = 0; |
| 27 |
virtual void GetSlideShowContents(CFileItemList& list) = 0; |
| 28 |
virtual std::shared_ptr<const CFileItem> GetCurrentSlide() = 0; |
| 29 |
virtual void StartSlideShow() = 0; |
| 30 |
virtual void PlayPicture() = 0; |
| 31 |
virtual bool InSlideShow() const = 0; |
| 32 |
virtual int NumSlides() const = 0; |
| 33 |
virtual int CurrentSlide() const = 0; |
| 34 |
virtual bool IsPaused() const = 0; |
| 35 |
virtual bool IsShuffled() const = 0; |
| 36 |
virtual void Reset() = 0; |
| 37 |
virtual void Shuffle() = 0; |
| 38 |
virtual int GetDirection() const = 0; |
| 39 |
//! @todo - refactor to use an options struct. Methods with so many arguments are a sign of a bad design... |
| 40 |
virtual void RunSlideShow(const std::string& strPath, |
| 41 |
bool bRecursive = false, |
| 42 |
bool bRandom = false, |
| 43 |
bool bNotRandom = false, |
| 44 |
const std::string& beginSlidePath = "", |
| 45 |
bool startSlideShow = true, |
| 46 |
SortBy method = SortByLabel, |
| 47 |
SortOrder order = SortOrderAscending, |
| 48 |
SortAttribute sortAttributes = SortAttributeNone, |
| 49 |
const std::string& strExtensions = "") = 0; |
| 50 |
//! @todo - refactor to use an options struct. Methods with so many arguments are a sign of a bad design... |
| 51 |
virtual void AddFromPath(const std::string& strPath, |
| 52 |
bool bRecursive, |
| 53 |
SortBy method = SortByLabel, |
| 54 |
SortOrder order = SortOrderAscending, |
| 55 |
SortAttribute sortAttributes = SortAttributeNone, |
| 56 |
const std::string& strExtensions = "") = 0; |
| 57 |
}; |