11 #include "dbwrappers/Database.h" 12 #include "threads/CriticalSection.h" 20 class CPVRChannelGroup;
21 class CPVRChannelGroupMember;
22 class CPVRChannelGroups;
26 class CPVRTimerInfoTag;
31 static constexpr
int CHANNEL_COMMIT_QUERY_COUNT_LIMIT = 10000;
51 void Close()
override;
122 const std::vector<std::shared_ptr<CPVRClient>>& clients,
123 std::map<std::pair<int, int>, std::shared_ptr<CPVRChannel>>& results)
const;
184 bool Get(
CPVRProviders& results,
const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
223 std::vector<std::shared_ptr<CPVRChannelGroupMember>>
Get(
225 const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
249 std::vector<std::shared_ptr<CPVRTimerInfoTag>>
GetTimers(
250 CPVRTimers& timers,
const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
303 void CreateTables()
override;
304 void CreateAnalytics()
override;
309 void UpdateTables(
int version)
override;
310 int GetMinSchemaVersion()
const override {
return 11; }
318 mutable CCriticalSection m_critSection;
bool Persist(const CPVRClient &client)
Add or update a client entry in the database.
Definition: PVRDatabase.cpp:317
Definition: PVRChannel.h:35
Definition: ContextMenuManager.h:24
bool QueueDeleteQuery(const CPVRChannel &channel)
Remove a channel entry from the database.
Definition: PVRDatabase.cpp:560
bool DeleteChannelGroups()
Remove all channel groups from the database.
Definition: PVRDatabase.cpp:612
Definition: PVRProvider.h:32
bool Delete(const CPVRClient &client)
Remove a client entry from the database.
Definition: PVRDatabase.cpp:332
bool ResetEPG()
Reset all epg ids to 0.
Definition: PVRDatabase.cpp:864
bool Open() override
Open the database.
Definition: PVRDatabase.cpp:115
void Unlock()
Unlock the database.
Definition: PVRDatabase.cpp:132
A container class for channel groups.
Definition: PVRChannelGroups.h:26
bool DeleteProviders()
Remove all providers from the database.
Definition: PVRDatabase.cpp:367
bool UpdateLastOpened(const CPVRChannelGroup &group)
Updates the last opened timestamp for the channel group.
Definition: PVRDatabase.cpp:1002
std::vector< std::shared_ptr< CPVRTimerInfoTag > > GetTimers(CPVRTimers &timers, const std::vector< std::shared_ptr< CPVRClient >> &clients) const
Get the timers.
Definition: PVRDatabase.cpp:1013
Definition: PVRChannelGroupMember.h:23
bool DeleteClients()
Remove all client entries from the database.
Definition: PVRDatabase.cpp:309
CPVRDatabase()=default
Create a new instance of the PVR database.
Definition: Database.h:26
Definition: PVRTimers.h:68
Definition: PVRTimerInfoTag.h:33
bool UpdateLastWatched(const CPVRChannel &channel)
Updates the last watched timestamp for the channel.
Definition: PVRDatabase.cpp:984
void Lock()
Lock the database.
Definition: PVRDatabase.cpp:127
int GetPriority(const CPVRClient &client)
Get the priority for a given client from the database.
Definition: PVRDatabase.cpp:347
Definition: SmartPlayList.cpp:137
int Get(bool bRadio, const std::vector< std::shared_ptr< CPVRClient >> &clients, std::map< std::pair< int, int >, std::shared_ptr< CPVRChannel >> &results) const
Get channels from the database.
Definition: PVRDatabase.cpp:491
Definition: PVRProviders.h:61
Definition: PVRDatabase.h:33
const char * GetBaseDBName() const override
Get the default sqlite database filename.
Definition: PVRDatabase.h:73
int GetMaxProviderId()
Get the maximum provider id in the database.
Definition: PVRDatabase.cpp:481
Definition: PVRChannelGroup.h:46
void Close() override
Close the database.
Definition: PVRDatabase.cpp:121
Definition: PVRClient.h:51
int GetSchemaVersion() const override
Get the minimal database version that is required to operate correctly.
Definition: PVRDatabase.h:67
bool DeleteTimers()
Remove all timer entries from the database.
Definition: PVRDatabase.cpp:1135
bool DeleteChannels()
Remove all channels from the database.
Definition: PVRDatabase.cpp:552