11 #include "threads/CriticalSection.h" 21 enum class ProviderUpdateMode;
39 std::shared_ptr<CPVRProvider>
GetByClient(
int iClientId,
int iUniqueId)
const;
54 void InsertEntry(
const std::shared_ptr<CPVRProvider>& newProvider, ProviderUpdateMode updateMode);
56 mutable CCriticalSection m_critSection;
58 std::vector<std::shared_ptr<CPVRProvider>> m_providers;
72 bool Update(
const std::vector<std::shared_ptr<CPVRClient>>& clients);
84 bool UpdateFromClients(
const std::vector<std::shared_ptr<CPVRClient>>& clients);
91 bool LoadFromDatabase(
const std::vector<std::shared_ptr<CPVRClient>>& clients);
99 std::shared_ptr<CPVRProvider> CheckAndAddEntry(
const std::shared_ptr<CPVRProvider>& newProvider,
100 ProviderUpdateMode updateMode);
109 std::shared_ptr<CPVRProvider> CheckAndPersistEntry(
110 const std::shared_ptr<CPVRProvider>& newProvider, ProviderUpdateMode updateMode);
115 bool PersistUserChanges(
const std::vector<std::shared_ptr<CPVRProvider>>& providers);
122 std::shared_ptr<CPVRProvider> GetById(
int iProviderId)
const;
128 int CleanupCachedImages();
131 void RemoveEntry(
const std::shared_ptr<CPVRProvider>& provider);
134 const std::vector<int>& failedClients,
135 const std::vector<int>& disabledClients);
137 bool m_bIsUpdating =
false;
std::shared_ptr< CPVRProvider > GetByClient(int iClientId, int iUniqueId) const
Get the provider denoted by given client id and unique client provider id.
Definition: PVRProviders.cpp:48
Definition: ContextMenuManager.h:24
std::vector< std::shared_ptr< CPVRProvider > > GetProvidersList() const
Definition: PVRProviders.cpp:79
bool UpdateFromClient(const std::shared_ptr< CPVRProvider > &provider)
Add a provider to this container or update the provider if already present in this container...
Definition: PVRProviders.cpp:30
std::size_t GetNumProviders() const
Definition: PVRProviders.cpp:85
Definition: PVRProviders.h:61
Definition: PVRProviders.h:23