xbmc
ContextMenus.h
1 /*
2  * Copyright (C) 2016-2018 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 "ContextMenuItem.h"
12 #include "VideoLibraryQueue.h"
13 #include "media/MediaType.h"
14 
15 #include <memory>
16 
17 namespace CONTEXTMENU
18 {
19 
21 {
22 public:
23  explicit CVideoInfo(MediaType mediaType);
24  bool IsVisible(const CFileItem& item) const override;
25  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
26 
27 private:
28  const MediaType m_mediaType;
29 };
30 
32 {
33  CTVShowInfo() : CVideoInfo(MediaTypeTvShow) {}
34 };
35 
37 {
38  CEpisodeInfo() : CVideoInfo(MediaTypeEpisode) {}
39 };
40 
42 {
43  CMusicVideoInfo() : CVideoInfo(MediaTypeMusicVideo) {}
44 };
45 
47 {
48  CMovieInfo() : CVideoInfo(MediaTypeMovie) {}
49 };
50 
52 {
54  bool IsVisible(const CFileItem& item) const override;
55  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
56 };
57 
59 {
61  bool IsVisible(const CFileItem& item) const override;
62  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
63 };
64 
66 {
68  bool IsVisible(const CFileItem& item) const override;
69  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
70 };
71 
73 {
74  CVideoBrowse() : CStaticContextMenuAction(37015) {} // Browse into
75  bool IsVisible(const CFileItem& item) const override;
76  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
77 };
78 
80 {
81  std::string GetLabel(const CFileItem& item) const override;
82  bool IsVisible(const CFileItem& item) const override;
83  bool Execute(const std::shared_ptr<CFileItem>& _item) const override;
84 };
85 
87 {
88  std::string GetLabel(const CFileItem& item) const override;
89  bool IsVisible(const CFileItem& item) const override;
90  bool Execute(const std::shared_ptr<CFileItem>& _item) const override;
91 };
92 
94 {
95  CVideoQueue() : CStaticContextMenuAction(13347) {} // Queue item
96  bool IsVisible(const CFileItem& item) const override;
97  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
98 };
99 
101 {
102  CVideoPlayNext() : CStaticContextMenuAction(10008) {} // Play next
103  bool IsVisible(const CFileItem& item) const override;
104  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
105 };
106 
108 {
109  CVideoPlayAndQueue() : CStaticContextMenuAction(13412) {} // Play from here
110  bool IsVisible(const CFileItem& item) const override;
111  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
112 };
113 
114 }
Definition: ContextMenus.h:93
Definition: ContextMenus.h:20
Definition: ContextMenus.h:31
Definition: ContextMenus.h:72
Definition: ContextMenus.h:107
Definition: ContextMenus.cpp:21
Definition: ContextMenus.h:65
Definition: ContextMenus.h:100
Definition: ContextMenus.h:86
Definition: ContextMenuItem.h:28
Definition: ContextMenus.h:46
Definition: ContextMenus.h:36
Definition: ContextMenus.h:41
Definition: ContextMenuItem.h:39
Definition: ContextMenus.h:58
Definition: ContextMenus.h:79
Definition: ContextMenus.h:51
Represents a file on a share.
Definition: FileItem.h:102