[Windows] Fix driver version detection of AMD RDNA+ GPU on Windows 10
[xbmc.git] / xbmc / pvr / windows / GUIWindowPVRSearch.h
blobde807994dbdd5fcdf61b79d4ce9bee1547a7b9e6
1 /*
2 * Copyright (C) 2012-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "dialogs/GUIDialogContextMenu.h"
12 #include "pvr/dialogs/GUIDialogPVRGuideSearch.h"
13 #include "pvr/windows/GUIWindowPVRBase.h"
15 #include <memory>
16 #include <string>
18 class CFileItem;
20 namespace PVR
22 class CPVREpgSearchFilter;
24 class CGUIWindowPVRSearchBase : public CGUIWindowPVRBase
26 public:
27 CGUIWindowPVRSearchBase(bool bRadio, int id, const std::string& xmlFile);
28 ~CGUIWindowPVRSearchBase() override;
30 bool OnAction(const CAction& action) override;
31 bool OnMessage(CGUIMessage& message) 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;
37 /*!
38 * @brief set the item to search similar events for.
39 * @param item the epg event to search similar events for.
41 void SetItemToSearch(const CFileItem& item);
43 /*!
44 * @brief Open the search dialog for the given search filter item.
45 * @param item the epg search filter.
46 * @return The result of the dialog
48 CGUIDialogPVRGuideSearch::Result OpenDialogSearch(const CFileItem& item);
50 protected:
51 void OnPrepareFileItems(CFileItemList& items) override;
53 private:
54 bool OnContextButtonClear(CFileItem* item, CONTEXT_BUTTON button);
56 CGUIDialogPVRGuideSearch::Result OpenDialogSearch(
57 const std::shared_ptr<CPVREpgSearchFilter>& searchFilter);
59 void ExecuteSearch();
61 void SetSearchFilter(const std::shared_ptr<CPVREpgSearchFilter>& searchFilter);
63 bool m_bSearchConfirmed = false;
64 std::shared_ptr<CPVREpgSearchFilter> m_searchfilter;
67 class CGUIWindowPVRTVSearch : public CGUIWindowPVRSearchBase
69 public:
70 CGUIWindowPVRTVSearch() : CGUIWindowPVRSearchBase(false, WINDOW_TV_SEARCH, "MyPVRSearch.xml") {}
72 protected:
73 std::string GetRootPath() const override;
74 std::string GetStartFolder(const std::string& dir) override;
75 std::string GetDirectoryPath() override;
78 class CGUIWindowPVRRadioSearch : public CGUIWindowPVRSearchBase
80 public:
81 CGUIWindowPVRRadioSearch() : CGUIWindowPVRSearchBase(true, WINDOW_RADIO_SEARCH, "MyPVRSearch.xml")
85 protected:
86 std::string GetRootPath() const override;
87 std::string GetStartFolder(const std::string& dir) override;
88 std::string GetDirectoryPath() override;
90 } // namespace PVR