kodi
GUIWindowPVRRecordings.h
1 /*
2  * Copyright (C) 2012-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 "dialogs/GUIDialogContextMenu.h"
12 #include "pvr/settings/PVRSettings.h"
13 #include "pvr/windows/GUIWindowPVRBase.h"
14 #include "video/VideoDatabase.h"
15 #include "video/VideoThumbLoader.h"
16 
17 #include <string>
18 
19 class CFileItem;
20 
21 namespace PVR
22 {
24 {
25 public:
26  CGUIWindowPVRRecordingsBase(bool bRadio, int id, const std::string& xmlFile);
27  ~CGUIWindowPVRRecordingsBase() override;
28 
29  void OnWindowLoaded() override;
30  bool OnMessage(CGUIMessage& message) override;
31  bool OnAction(const CAction& action) override;
32  void GetContextButtons(int itemNumber, CContextButtons& buttons) override;
33  bool OnPopupMenu(int iItem) override;
34  bool OnContextButton(int itemNumber, CONTEXT_BUTTON button) override;
35  bool Update(const std::string& strDirectory, bool updateFilterPath = true) override;
36  void UpdateButtons() override;
37 
38 protected:
39  std::string GetDirectoryPath() override;
40  void OnPrepareFileItems(CFileItemList& items) override;
41  bool GetFilteredItems(const std::string& filter, CFileItemList& items) override;
42 
43  bool m_bShowDeletedRecordings{false};
44 
45 private:
46  bool OnContextButtonDeleteAll(CFileItem* item, CONTEXT_BUTTON button);
47 
48  CVideoThumbLoader m_thumbLoader;
49  CVideoDatabase m_database;
50  CPVRSettings m_settings;
51 };
52 
54 {
55 public:
57  : CGUIWindowPVRRecordingsBase(false, WINDOW_TV_RECORDINGS, "MyPVRRecordings.xml")
58  {
59  }
60  std::string GetRootPath() const override;
61 };
62 
64 {
65 public:
67  : CGUIWindowPVRRecordingsBase(true, WINDOW_RADIO_RECORDINGS, "MyPVRRecordings.xml")
68  {
69  }
70  std::string GetRootPath() const override;
71 };
72 } // namespace PVR
bool Update(const std::string &strDirectory, bool updateFilterPath=true) override
Retrieves the items from the given path and updates the list.
Definition: GUIWindowPVRRecordings.cpp:148
Definition: GUIWindowPVRBase.h:54
Definition: ContextMenuManager.h:24
Definition: VideoThumbLoader.h:24
Represents a list of files.
Definition: FileItem.h:702
Definition: GUIWindowPVRRecordings.h:23
Definition: VideoDatabase.h:419
Definition: GUIWindowPVRRecordings.h:63
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: GUIWindowPVRRecordings.h:53
Definition: GUIMessage.h:365
void OnPrepareFileItems(CFileItemList &items) override
On prepare file items.
Definition: GUIWindowPVRRecordings.cpp:453
void UpdateButtons() override
Updates the states.
Definition: GUIWindowPVRRecordings.cpp:188
Definition: GUIDialogContextMenu.h:93
Definition: PVRSettings.h:27
Represents a file on a share.
Definition: FileItem.h:102