11 #include "addons/IAddonManagerCallback.h" 12 #include "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h" 13 #include "threads/CriticalSection.h" 32 class CPVRChannelGroupInternal;
33 class CPVRChannelGroup;
34 class CPVRChannelGroupMember;
35 class CPVRChannelGroups;
36 class CPVRProvidersContainer;
41 class CPVRTimersContainer;
43 typedef std::map<int, std::shared_ptr<CPVRClient>> CPVRClientMap;
54 int numRecordings = 0;
55 int numDeletedRecordings = 0;
57 int numChannelGroups = 0;
59 uint64_t diskUsed = 0;
60 uint64_t diskTotal = 0;
90 const std::string& changedAddonId =
"",
91 ADDON::AddonInstanceId changedInstanceId = ADDON::ADDON_SINGLETON_INSTANCE_ID);
100 bool RequestRestart(
const std::string& addonId,
101 ADDON::AddonInstanceId instanceId,
102 bool bDataChanged)
override;
110 bool StopClient(
int clientId,
bool restart);
122 int CreatedClientAmount()
const;
128 bool HasCreatedClients()
const;
135 bool IsCreatedClient(
int iClientId)
const;
142 std::shared_ptr<CPVRClient> GetCreatedClient(
int clientId)
const;
148 CPVRClientMap GetCreatedClients()
const;
154 int GetFirstCreatedClientID();
160 bool HasIgnoredClients()
const;
166 int EnabledClientAmount()
const;
173 bool IsEnabledClient(
int clientId)
const;
179 std::vector<CVariant> GetEnabledClientInfos()
const;
185 std::vector<CVariant> GetClientProviderInfos()
const;
196 std::vector<SBackend> GetBackendProperties()
const;
210 bool GetTimers(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
212 std::vector<int>& failedClients);
219 PVR_ERROR GetTimerTypes(std::vector<std::shared_ptr<CPVRTimerType>>& results)
const;
234 PVR_ERROR GetRecordings(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
237 std::vector<int>& failedClients);
243 PVR_ERROR DeleteAllRecordingsFromTrash();
263 PVR_ERROR SetEPGMaxPastDays(
int iPastDays);
278 PVR_ERROR SetEPGMaxFutureDays(
int iFutureDays);
293 PVR_ERROR GetChannels(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
295 std::vector<std::shared_ptr<CPVRChannel>>& channels,
296 std::vector<int>& failedClients);
305 PVR_ERROR GetProviders(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
307 std::vector<int>& failedClients);
316 PVR_ERROR GetChannelGroups(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
318 std::vector<int>& failedClients);
329 const std::vector<std::shared_ptr<CPVRClient>>& clients,
331 std::vector<std::shared_ptr<CPVRChannelGroupMember>>& groupMembers,
332 std::vector<int>& failedClients);
338 std::vector<std::shared_ptr<CPVRClient>> GetClientsSupportingChannelScan()
const;
344 std::vector<std::shared_ptr<CPVRClient>> GetClientsSupportingChannelSettings(
bool bRadio)
const;
350 bool AnyClientSupportingRecordingsSize()
const;
356 bool AnyClientSupportingEPG()
const;
362 bool AnyClientSupportingRecordings()
const;
369 bool AnyClientSupportingRecordingsDelete()
const;
378 void OnSystemSleep();
388 void OnPowerSavingActivated();
393 void OnPowerSavingDeactivated();
404 void ConnectionStateChange(
CPVRClient* client,
405 const std::string& strConnectionString,
407 const std::string& strMessage);
415 std::vector<ADDON::AddonInstanceId> GetKnownInstanceIds(
const std::string& addonID)
const;
417 bool GetAddonsWithStatus(
418 const std::string& changedAddonId,
419 std::vector<std::pair<std::shared_ptr<ADDON::CAddonInfo>,
bool>>& addonsWithStatus)
const;
421 std::vector<std::pair<ADDON::AddonInstanceId, bool>> GetInstanceIdsWithStatus(
422 const std::shared_ptr<ADDON::CAddonInfo>& addon,
bool addonIsEnabled)
const;
429 std::shared_ptr<CPVRClient> GetClient(
int clientId)
const;
436 bool IsKnownClient(
int iClientId)
const;
444 PVR_ERROR GetCallableClients(CPVRClientMap& clientsReady,
445 std::vector<int>& clientsNotReady)
const;
447 typedef std::function<PVR_ERROR(const std::shared_ptr<CPVRClient>&)> PVRClientFunction;
457 PVR_ERROR ForClients(
const char* strFunctionName,
458 const std::vector<std::shared_ptr<CPVRClient>>& clients,
459 const PVRClientFunction&
function,
460 std::vector<int>& failedClients)
const;
468 PVR_ERROR ForCreatedClients(
const char* strFunctionName,
469 const PVRClientFunction&
function)
const;
478 PVR_ERROR ForCreatedClients(
const char* strFunctionName,
479 const PVRClientFunction&
function,
480 std::vector<int>& failedClients)
const;
482 mutable CCriticalSection m_critSection;
483 CPVRClientMap m_clientMap;
Definition: PVRRecordings.h:28
PVR_ERROR
Definition: pvr_general.h:34
Definition: ContextMenuManager.h:24
A container class for channel groups.
Definition: PVRChannelGroups.h:26
PVR_CONNECTION_STATE
Definition: pvr_general.h:81
Definition: PVRClients.h:63
Definition: AddonEvents.h:18
Definition: SmartPlayList.cpp:137
Holds generic data about a backend (number of channels etc.)
Definition: PVRClients.h:48
Class - IAddonMgrCallback This callback should be inherited by any class which manages specific addon...
Definition: IAddonManagerCallback.h:23
Definition: PVRProviders.h:23
Definition: PVRTimers.h:32
Definition: PVRChannelGroup.h:46
Definition: PVRClient.h:51