[video] fix selection after changing video or extra art
[xbmc.git] / xbmc / pvr / addons / PVRClientUID.h
blob5b5d1c05071e2a75ebf0e82a973bd469093bb234
1 /*
2 * Copyright (C) 2012-2022 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 "addons/IAddon.h"
13 #include <string>
15 namespace PVR
17 class CPVRClientUID final
19 public:
20 CPVRClientUID(const std::string& addonID, ADDON::AddonInstanceId instanceID)
21 : m_addonID(addonID), m_instanceID(instanceID)
25 virtual ~CPVRClientUID() = default;
27 /*!
28 * @brief Return the numeric UID.
29 * @return The numeric UID.
31 int GetUID() const;
33 private:
34 CPVRClientUID() = delete;
36 std::string m_addonID;
37 ADDON::AddonInstanceId m_instanceID{ADDON::ADDON_SINGLETON_INSTANCE_ID};
39 mutable bool m_uidCreated{false};
40 mutable int m_uid{0};
42 } // namespace PVR