[Windows] Remove redundant DirectSound error codes
[xbmc.git] / xbmc / video / guilib / VideoPlayActionProcessor.h
blob5ae9c79aee5a3c8532259770898dbc3c96bbbfaf
1 /*
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.
7 */
9 #pragma once
11 #include "video/guilib/VideoAction.h"
13 #include <memory>
15 class CFileItem;
17 namespace KODI::VIDEO::GUILIB
19 class CVideoPlayActionProcessorBase
21 public:
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);
32 protected:
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};
42 private:
43 CVideoPlayActionProcessorBase() = delete;
45 } // namespace KODI::VIDEO::GUILIB