xbmc
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 OnContextButton(int itemNumber, CONTEXT_BUTTON button) override;
34  bool Update(const std::string& strDirectory, bool updateFilterPath = true) override;
35  void UpdateButtons() override;
36 
37 protected:
38  std::string GetDirectoryPath() override;
39  void OnPrepareFileItems(CFileItemList& items) override;
40  bool GetFilteredItems(const std::string& filter, CFileItemList& items) override;
41 
42  bool m_bShowDeletedRecordings{false};
43 
44 private:
45  bool OnContextButtonDeleteAll(CFileItem* item, CONTEXT_BUTTON button);
46 
47  CVideoThumbLoader m_thumbLoader;
48  CVideoDatabase m_database;
49  CPVRSettings m_settings;
50 };
51 
53 {
54 public:
56  : CGUIWindowPVRRecordingsBase(false, WINDOW_TV_RECORDINGS, "MyPVRRecordings.xml")
57  {
58  }
59  std::string GetRootPath() const override;
60 };
61 
63 {
64 public:
66  : CGUIWindowPVRRecordingsBase(true, WINDOW_RADIO_RECORDINGS, "MyPVRRecordings.xml")
67  {
68  }
69  std::string GetRootPath() const override;
70 };
71 } // 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:135
Definition: GUIWindowPVRBase.h:54
Definition: ContextMenuManager.h:24
Definition: VideoThumbLoader.h:59
Represents a list of files.
Definition: FileItem.h:713
Definition: GUIWindowPVRRecordings.h:23
Definition: VideoDatabase.h:393
Definition: GUIWindowPVRRecordings.h:62
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUIWindowPVRRecordings.h:52
Definition: GUIMessage.h:365
void OnPrepareFileItems(CFileItemList &items) override
On prepare file items.
Definition: GUIWindowPVRRecordings.cpp:372
void UpdateButtons() override
Updates the states.
Definition: GUIWindowPVRRecordings.cpp:175
Definition: GUIDialogContextMenu.h:95
Definition: PVRSettings.h:27
Represents a file on a share.
Definition: FileItem.h:102