1 /* 2 * Copyright (C) 2012-2019 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 <memory> 12 #include <vector> 13 14 namespace PVR 15 { 16 17 class CPVRChannelGroup; 18 19 class CPVRGUIChannelIconUpdater 20 { 21 public: 22 /*! 23 * @brief ctor. 24 * @param groups The channel groups for which the channel icons shall be updated. 25 * @param bUpdateDb If true, persist the changed values in the PVR database. 26 */ CPVRGUIChannelIconUpdater(const std::vector<std::shared_ptr<CPVRChannelGroup>> & groups,bool bUpdateDb)27 CPVRGUIChannelIconUpdater(const std::vector<std::shared_ptr<CPVRChannelGroup>>& groups, bool bUpdateDb) 28 : m_groups(groups), m_bUpdateDb(bUpdateDb) {} 29 30 CPVRGUIChannelIconUpdater() = delete; 31 CPVRGUIChannelIconUpdater(const CPVRGUIChannelIconUpdater&) = delete; 32 CPVRGUIChannelIconUpdater& operator=(const CPVRGUIChannelIconUpdater&) = delete; 33 34 virtual ~CPVRGUIChannelIconUpdater() = default; 35 36 /*! 37 * @brief Search and update missing channel icons. 38 */ 39 void SearchAndUpdateMissingChannelIcons() const; 40 41 private: 42 const std::vector<std::shared_ptr<CPVRChannelGroup>> m_groups; 43 const bool m_bUpdateDb = false; 44 }; 45 46 } 47