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  CSeasonInfo() : CVideoInfo(MediaTypeSeason) {}
39 };
40 
42 {
43  CEpisodeInfo() : CVideoInfo(MediaTypeEpisode) {}
44 };
45 
47 {
48  CMusicVideoInfo() : CVideoInfo(MediaTypeMusicVideo) {}
49 };
50 
52 {
53  CMovieInfo() : CVideoInfo(MediaTypeMovie) {}
54 };
55 
57 {
58  CMovieSetInfo() : CVideoInfo(MediaTypeVideoCollection) {}
59 };
60 
62 {
64  bool IsVisible(const CFileItem& item) const override;
65  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
66 };
67 
69 {
71  bool IsVisible(const CFileItem& item) const override;
72  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
73 };
74 
76 {
78  bool IsVisible(const CFileItem& item) const override;
79  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
80 };
81 
83 {
84  CVideoBrowse() : CStaticContextMenuAction(37015) {} // Browse into
85  bool IsVisible(const CFileItem& item) const override;
86  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
87 };
88 
90 {
91  std::string GetLabel(const CFileItem& item) const override;
92  bool IsVisible(const CFileItem& item) const override;
93  bool Execute(const std::shared_ptr<CFileItem>& _item) const override;
94 };
95 
97 {
98  std::string GetLabel(const CFileItem& item) const override;
99  bool IsVisible(const CFileItem& item) const override;
100  bool Execute(const std::shared_ptr<CFileItem>& _item) const override;
101 };
102 
104 {
105  CVideoPlayUsing() : CStaticContextMenuAction(15213) {} // Play using...
106  bool IsVisible(const CFileItem& item) const override;
107  bool Execute(const std::shared_ptr<CFileItem>& _item) const override;
108 };
109 
111 {
112  CVideoQueue() : CStaticContextMenuAction(13347) {} // Queue item
113  bool IsVisible(const CFileItem& item) const override;
114  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
115 };
116 
118 {
119  CVideoPlayNext() : CStaticContextMenuAction(10008) {} // Play next
120  bool IsVisible(const CFileItem& item) const override;
121  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
122 };
123 
125 {
126  std::string GetLabel(const CFileItem& item) const override;
127  bool IsVisible(const CFileItem& item) const override;
128  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
129 };
130 
131 }
Definition: ContextMenus.h:110
Definition: ContextMenus.h:20
Definition: ContextMenus.h:31
Definition: ContextMenus.h:82
Definition: ContextMenus.h:124
Definition: ContextMenus.h:103
Definition: ContextMenus.cpp:21
Definition: ContextMenus.h:75
Definition: ContextMenus.h:117
Definition: ContextMenus.h:96
Definition: ContextMenuItem.h:28
Definition: ContextMenus.h:51
Definition: ContextMenus.h:41
Definition: ContextMenus.h:46
Definition: ContextMenus.h:56
Definition: ContextMenuItem.h:39
Definition: ContextMenus.h:36
Definition: ContextMenus.h:68
Definition: ContextMenus.h:89
Definition: ContextMenus.h:61
Represents a file on a share.
Definition: FileItem.h:102