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 CVideoPlayActionProcessorBase
22 explicit CVideoPlayActionProcessorBase(const std::shared_ptr
<CFileItem
>& item
) : m_item(item
) {}
23 virtual ~CVideoPlayActionProcessorBase() = default;
25 bool ProcessDefaultAction();
26 bool ProcessAction(Action action
);
28 bool UserCancelled() const { return m_userCancelled
; }
30 static Action
ChoosePlayOrResume(const CFileItem
& item
);
33 virtual Action
GetDefaultAction();
34 virtual bool Process(Action action
);
36 virtual bool OnResumeSelected() = 0;
37 virtual bool OnPlaySelected() = 0;
39 std::shared_ptr
<CFileItem
> m_item
;
40 bool m_userCancelled
{false};
43 CVideoPlayActionProcessorBase() = delete;
45 } // namespace KODI::VIDEO::GUILIB