[WASAPI] fix stream types and frequencies enumeration
[xbmc.git] / xbmc / guilib / listproviders / StaticProvider.h
blobe1e2c084e05bec258a6f95f287d22464d54ba324
1 /*
2 * Copyright (C) 2013-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 "IListProvider.h"
12 #include "guilib/GUIStaticItem.h"
14 #include <vector>
16 class TiXmlElement;
18 class CStaticListProvider : public IListProvider
20 public:
21 CStaticListProvider(const TiXmlElement *element, int parentID);
22 explicit CStaticListProvider(const std::vector<CGUIStaticItemPtr> &items); // for python
23 explicit CStaticListProvider(const CStaticListProvider& other);
24 ~CStaticListProvider() override;
26 // Implementation of IListProvider
27 std::unique_ptr<IListProvider> Clone() override;
28 bool Update(bool forceRefresh) override;
29 void Fetch(std::vector<std::shared_ptr<CGUIListItem>>& items) override;
30 bool OnClick(const std::shared_ptr<CGUIListItem>& item) override;
31 bool OnInfo(const std::shared_ptr<CGUIListItem>& item) override { return false; }
32 bool OnContextMenu(const std::shared_ptr<CGUIListItem>& item) override { return false; }
33 void SetDefaultItem(int item, bool always) override;
34 int GetDefaultItem() const override;
35 bool AlwaysFocusDefaultItem() const override;
36 private:
37 int m_defaultItem;
38 bool m_defaultAlways;
39 unsigned int m_updateTime;
40 std::vector<CGUIStaticItemPtr> m_items;