2 * Copyright (C) 2023 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "video/guilib/VideoAction.h"
17 namespace KODI::VIDEO::GUILIB
19 class CVideoPlayActionProcessor
22 explicit CVideoPlayActionProcessor(const std::shared_ptr
<CFileItem
>& item
) : m_item(item
) {}
23 virtual ~CVideoPlayActionProcessor() = default;
25 bool ProcessDefaultAction();
26 bool ProcessAction(Action action
);
28 void SetChoosePlayer() { m_choosePlayer
= true; }
29 void SetChooseStackPart() { m_chooseStackPart
= true; }
31 bool UserCancelled() const { return m_userCancelled
; }
33 static Action
ChoosePlayOrResume(const CFileItem
& item
);
36 virtual Action
GetDefaultAction();
37 virtual bool Process(Action action
);
39 virtual bool OnResumeSelected();
40 virtual bool OnPlaySelected();
42 void Play(const std::string
& player
);
44 std::shared_ptr
<CFileItem
> m_item
;
45 bool m_userCancelled
{false};
46 bool m_choosePlayer
{false};
47 bool m_chooseStackPart
{false};
48 unsigned int m_chosenStackPart
{0};
51 CVideoPlayActionProcessor() = delete;
52 unsigned int ChooseStackPart() const;
53 Action
ChoosePlayOrResume() const;
54 static Action
ChoosePlayOrResume(const std::string
& resumeString
);
58 } // namespace KODI::VIDEO::GUILIB