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 CPVRChannelGroup;
33 class CPVRChannelGroupMember;
34 class CPVRChannelGroups;
35 class CPVRProvidersContainer;
40 class CPVRTimersContainer;
42 typedef std::map<int, std::shared_ptr<CPVRClient>> CPVRClientMap;
53 int numRecordings = 0;
54 int numDeletedRecordings = 0;
56 int numChannelGroups = 0;
58 uint64_t diskUsed = 0;
59 uint64_t diskTotal = 0;
89 const std::string& changedAddonId =
"",
90 ADDON::AddonInstanceId changedInstanceId = ADDON::ADDON_SINGLETON_INSTANCE_ID);
99 bool RequestRestart(
const std::string& addonId,
100 ADDON::AddonInstanceId instanceId,
101 bool bDataChanged)
override;
109 bool StopClient(
int clientId,
bool restart);
121 int CreatedClientAmount()
const;
127 bool HasCreatedClients()
const;
134 bool IsCreatedClient(
int iClientId)
const;
141 std::shared_ptr<CPVRClient> GetCreatedClient(
int clientId)
const;
147 CPVRClientMap GetCreatedClients()
const;
153 int GetFirstCreatedClientID();
159 bool HasIgnoredClients()
const;
165 int EnabledClientAmount()
const;
172 bool IsEnabledClient(
int clientId)
const;
178 std::vector<CVariant> GetEnabledClientInfos()
const;
184 std::vector<CVariant> GetClientProviderInfos()
const;
195 std::vector<SBackend> GetBackendProperties()
const;
209 bool GetTimers(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
211 std::vector<int>& failedClients);
219 PVR_ERROR UpdateTimerTypes(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
220 std::vector<int>& failedClients);
226 const std::vector<std::shared_ptr<CPVRTimerType>> GetTimerTypes()
const;
241 PVR_ERROR GetRecordings(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
244 std::vector<int>& failedClients);
250 PVR_ERROR DeleteAllRecordingsFromTrash();
270 PVR_ERROR SetEPGMaxPastDays(
int iPastDays);
285 PVR_ERROR SetEPGMaxFutureDays(
int iFutureDays);
300 PVR_ERROR GetChannels(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
302 std::vector<std::shared_ptr<CPVRChannel>>& channels,
303 std::vector<int>& failedClients);
312 PVR_ERROR GetProviders(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
314 std::vector<int>& failedClients);
323 PVR_ERROR GetChannelGroups(
const std::vector<std::shared_ptr<CPVRClient>>& clients,
325 std::vector<int>& failedClients);
336 const std::vector<std::shared_ptr<CPVRClient>>& clients,
338 std::vector<std::shared_ptr<CPVRChannelGroupMember>>& groupMembers,
339 std::vector<int>& failedClients);
345 std::vector<std::shared_ptr<CPVRClient>> GetClientsSupportingChannelScan()
const;
351 std::vector<std::shared_ptr<CPVRClient>> GetClientsSupportingChannelSettings(
bool bRadio)
const;
357 bool AnyClientSupportingRecordingsSize()
const;
363 bool AnyClientSupportingEPG()
const;
369 bool AnyClientSupportingRecordings()
const;
376 bool AnyClientSupportingRecordingsDelete()
const;
385 void OnSystemSleep();
395 void OnPowerSavingActivated();
400 void OnPowerSavingDeactivated();
411 void ConnectionStateChange(
CPVRClient* client,
412 const std::string& strConnectionString,
414 const std::string& strMessage);
422 std::vector<ADDON::AddonInstanceId> GetKnownInstanceIds(
const std::string& addonID)
const;
424 bool GetAddonsWithStatus(
425 const std::string& changedAddonId,
426 std::vector<std::pair<std::shared_ptr<ADDON::CAddonInfo>,
bool>>& addonsWithStatus)
const;
428 std::vector<std::pair<ADDON::AddonInstanceId, bool>> GetInstanceIdsWithStatus(
429 const std::shared_ptr<ADDON::CAddonInfo>& addon,
bool addonIsEnabled)
const;
436 std::shared_ptr<CPVRClient> GetClient(
int clientId)
const;
443 bool IsKnownClient(
int iClientId)
const;
451 PVR_ERROR GetCallableClients(CPVRClientMap& clientsReady,
452 std::vector<int>& clientsNotReady)
const;
454 typedef std::function<PVR_ERROR(const std::shared_ptr<CPVRClient>&)> PVRClientFunction;
464 PVR_ERROR ForClients(
const char* strFunctionName,
465 const std::vector<std::shared_ptr<CPVRClient>>& clients,
466 const PVRClientFunction&
function,
467 std::vector<int>& failedClients)
const;
475 PVR_ERROR ForCreatedClients(
const char* strFunctionName,
476 const PVRClientFunction&
function)
const;
485 PVR_ERROR ForCreatedClients(
const char* strFunctionName,
486 const PVRClientFunction&
function,
487 std::vector<int>& failedClients)
const;
489 mutable CCriticalSection m_critSection;
490 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:30
PVR_CONNECTION_STATE
Definition: pvr_general.h:81
Definition: PVRClients.h:62
Definition: AddonEvents.h:18
Definition: SmartPlayList.cpp:137
Holds generic data about a backend (number of channels etc.)
Definition: PVRClients.h:47
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:52
Definition: PVRClient.h:52