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;
224 const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
232 std::vector<std::shared_ptr<CPVRChannelGroupMember>>
Get(
234 const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
258 std::vector<std::shared_ptr<CPVRTimerInfoTag>>
GetTimers(
259 CPVRTimers& timers,
const std::vector<std::shared_ptr<CPVRClient>>& clients)
const;
313 void CreateTables()
override;
314 void CreateAnalytics()
override;
319 void UpdateTables(
int version)
override;
320 int GetMinSchemaVersion()
const override {
return 11; }
330 mutable CCriticalSection m_critSection;
int GetLocalGroups(CPVRChannelGroups &results) const
Get all local channel groups.
Definition: PVRDatabase.cpp:748
bool Persist(const CPVRClient &client)
Add or update a client entry in the database.
Definition: PVRDatabase.cpp:383
int GetPriority(const CPVRClient &client) const
Get the priority for a given client from the database.
Definition: PVRDatabase.cpp:413
Definition: PVRChannel.h:35
Definition: ContextMenuManager.h:24
bool QueueDeleteQuery(const CPVRChannel &channel)
Remove a channel entry from the database.
Definition: PVRDatabase.cpp:627
bool DeleteChannelGroups()
Remove all channel groups from the database.
Definition: PVRDatabase.cpp:679
Definition: PVRProvider.h:32
bool Delete(const CPVRClient &client)
Remove a client entry from the database.
Definition: PVRDatabase.cpp:398
bool ResetEPG()
Reset all epg ids to 0.
Definition: PVRDatabase.cpp:952
bool Open() override
Open the database.
Definition: PVRDatabase.cpp:111
void Unlock()
Unlock the database.
Definition: PVRDatabase.cpp:128
A container class for channel groups.
Definition: PVRChannelGroups.h:30
bool DeleteProviders()
Remove all providers from the database.
Definition: PVRDatabase.cpp:433
bool UpdateLastOpened(const CPVRChannelGroup &group)
Updates the last opened timestamp for the channel group.
Definition: PVRDatabase.cpp:1098
std::vector< std::shared_ptr< CPVRTimerInfoTag > > GetTimers(CPVRTimers &timers, const std::vector< std::shared_ptr< CPVRClient >> &clients) const
Get the timers.
Definition: PVRDatabase.cpp:1109
Definition: PVRChannelGroupMember.h:23
bool DeleteClients()
Remove all client entries from the database.
Definition: PVRDatabase.cpp:375
CPVRDatabase()=default
Create a new instance of the PVR database.
Definition: Database.h:26
Definition: PVRTimers.h:68
Definition: PVRTimerInfoTag.h:33
void Lock()
Lock the database.
Definition: PVRDatabase.cpp:123
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:557
Definition: PVRProviders.h:61
Definition: PVRDatabase.h:33
const char * GetBaseDBName() const override
Get the default sqlite database filename.
Definition: PVRDatabase.h:73
bool UpdateLastWatched(const CPVRChannel &channel, int groupId)
Updates the last watched timestamp for the channel.
Definition: PVRDatabase.cpp:1080
Definition: PVRChannelGroup.h:52
int GetMaxProviderId() const
Get the maximum provider id in the database.
Definition: PVRDatabase.cpp:547
void Close() override
Close the database.
Definition: PVRDatabase.cpp:117
Definition: PVRClient.h:52
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:1231
bool DeleteChannels()
Remove all channels from the database.
Definition: PVRDatabase.cpp:619