kodi
PVRClientUID.h
1 /*
2  * Copyright (C) 2012-2022 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 "addons/IAddon.h"
12 
13 #include <string>
14 
15 namespace PVR
16 {
17 class CPVRClientUID final
18 {
19 public:
20  CPVRClientUID(const std::string& addonID, ADDON::AddonInstanceId instanceID)
21  : m_addonID(addonID), m_instanceID(instanceID)
22  {
23  }
24 
25  virtual ~CPVRClientUID() = default;
26 
31  int GetUID() const;
32 
33 private:
34  CPVRClientUID() = delete;
35 
36  std::string m_addonID;
37  ADDON::AddonInstanceId m_instanceID{ADDON::ADDON_SINGLETON_INSTANCE_ID};
38 
39  mutable bool m_uidCreated{false};
40  mutable int m_uid{0};
41 };
42 } // namespace PVR
Definition: ContextMenuManager.h:24
int GetUID() const
Return the numeric UID.
Definition: PVRClientUID.cpp:15
Definition: PVRClientUID.h:17