kodi
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 "media/MediaType.h"
13 
14 #include <memory>
15 
16 class CFileItem;
17 
18 namespace CONTEXTMENU
19 {
20 
22 {
23  explicit CMusicInfo(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  CAlbumInfo() : CMusicInfo(MediaTypeAlbum) {}
34 };
35 
37 {
38  CArtistInfo() : CMusicInfo(MediaTypeArtist) {}
39 };
40 
42 {
43  CSongInfo() : CMusicInfo(MediaTypeSong) {}
44 };
45 
47 {
48  CMusicBrowse() : CStaticContextMenuAction(37015) {} // Browse into
49  bool IsVisible(const CFileItem& item) const override;
50  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
51 };
52 
54 {
55  CMusicPlay() : CStaticContextMenuAction(208) {} // Play
56  bool IsVisible(const CFileItem& item) const override;
57  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
58 };
59 
61 {
62  CMusicPlayUsing() : CStaticContextMenuAction(15213) {} // Play using...
63  bool IsVisible(const CFileItem& item) const override;
64  bool Execute(const std::shared_ptr<CFileItem>& _item) const override;
65 };
66 
68 {
69  CMusicPlayNext() : CStaticContextMenuAction(10008) {} // Play next
70  bool IsVisible(const CFileItem& item) const override;
71  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
72 };
73 
75 {
76  CMusicQueue() : CStaticContextMenuAction(13347) {} // Queue item
77  bool IsVisible(const CFileItem& item) const override;
78  bool Execute(const std::shared_ptr<CFileItem>& item) const override;
79 };
80 
81 } // namespace CONTEXTMENU
Definition: ContextMenus.h:67
Definition: ContextMenus.h:31
Definition: ContextMenus.cpp:21
Definition: ContextMenus.h:53
Definition: ContextMenus.h:74
Definition: ContextMenus.h:60
Definition: ContextMenuItem.h:40
Definition: ContextMenus.h:46
Definition: ContextMenus.h:21
Definition: ContextMenus.h:41
Definition: ContextMenus.h:36
Represents a file on a share.
Definition: FileItem.h:102