11 #include "XBDateTime.h" 12 #include "pvr/epg/EpgSearchData.h" 50 bool FilterEntry(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
56 static void RemoveDuplicates(std::vector<std::shared_ptr<CPVREpgInfoTag>>& results);
62 bool IsRadio()
const {
return m_bIsRadio; }
64 const std::string& GetSearchTerm()
const {
return m_searchData.
m_strSearchTerm; }
65 void SetSearchTerm(
const std::string& strSearchTerm);
67 void SetSearchPhrase(
const std::string& strSearchPhrase);
69 bool IsCaseSensitive()
const {
return m_bIsCaseSensitive; }
70 void SetCaseSensitive(
bool bIsCaseSensitive);
73 void SetSearchInDescription(
bool bSearchInDescription);
75 int GetGenreType()
const {
return m_searchData.
m_iGenreType; }
76 void SetGenreType(
int iGenreType);
78 int GetMinimumDuration()
const {
return m_iMinimumDuration; }
79 void SetMinimumDuration(
int iMinimumDuration);
81 int GetMaximumDuration()
const {
return m_iMaximumDuration; }
82 void SetMaximumDuration(
int iMaximumDuration);
85 void SetIgnoreFinishedBroadcasts(
bool bIgnoreFinishedBroadcasts);
88 void SetIgnoreFutureBroadcasts(
bool bIgnoreFutureBroadcasts);
91 void SetStartDateTime(
const CDateTime& startDateTime);
94 void SetEndDateTime(
const CDateTime& endDateTime);
97 void SetIncludeUnknownGenres(
bool bIncludeUnknownGenres);
99 bool ShouldRemoveDuplicates()
const {
return m_bRemoveDuplicates; }
100 void SetRemoveDuplicates(
bool bRemoveDuplicates);
102 int GetClientID()
const {
return m_iClientID; }
103 void SetClientID(
int iClientID);
105 int GetChannelGroupID()
const {
return m_iChannelGroupID; }
106 void SetChannelGroupID(
int iChannelGroupID);
108 int GetChannelUID()
const {
return m_iChannelUID; }
109 void SetChannelUID(
int iChannelUID);
111 bool IsFreeToAirOnly()
const {
return m_bFreeToAirOnly; }
112 void SetFreeToAirOnly(
bool bFreeToAirOnly);
114 bool ShouldIgnorePresentTimers()
const {
return m_bIgnorePresentTimers; }
115 void SetIgnorePresentTimers(
bool bIgnorePresentTimers);
117 bool ShouldIgnorePresentRecordings()
const {
return m_bIgnorePresentRecordings; }
118 void SetIgnorePresentRecordings(
bool bIgnorePresentRecordings);
120 int GetDatabaseId()
const {
return m_iDatabaseId; }
121 void SetDatabaseId(
int iDatabaseId);
123 const std::string& GetTitle()
const {
return m_title; }
124 void SetTitle(
const std::string& title);
126 const CDateTime& GetLastExecutedDateTime()
const {
return m_lastExecutedDateTime; }
127 void SetLastExecutedDateTime(
const CDateTime& lastExecutedDateTime);
130 void SetEpgSearchDataFiltered() { m_bEpgSearchDataFiltered =
true; }
132 bool IsChanged()
const {
return m_bChanged; }
133 void SetChanged(
bool bChanged) { m_bChanged = bChanged; }
136 bool MatchGenre(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
137 bool MatchDuration(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
138 bool MatchStartAndEndTimes(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
139 bool MatchSearchTerm(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
140 bool MatchChannel(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
141 bool MatchChannelGroup(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
142 bool MatchFreeToAir(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
143 bool MatchTimers(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
144 bool MatchRecordings(
const std::shared_ptr<CPVREpgInfoTag>& tag)
const;
146 bool m_bChanged =
false;
149 bool m_bEpgSearchDataFiltered =
false;
151 bool m_bIsCaseSensitive;
152 int m_iMinimumDuration;
153 int m_iMaximumDuration;
154 bool m_bRemoveDuplicates;
158 int m_iClientID = -1;
159 int m_iChannelGroupID{-1};
160 int m_iChannelUID = -1;
161 bool m_bFreeToAirOnly;
162 bool m_bIgnorePresentTimers;
163 bool m_bIgnorePresentRecordings;
165 mutable std::optional<bool> m_groupIdMatches;
167 int m_iDatabaseId = -1;
bool IsRadio() const
Get the type of channels to search.
Definition: EpgSearchFilter.h:62
bool m_bSearchInDescription
Definition: EpgSearchData.h:23
std::string m_strSearchTerm
Definition: EpgSearchData.h:22
Definition: EpgSearchFilter.h:23
Definition: ContextMenuManager.h:24
static void RemoveDuplicates(std::vector< std::shared_ptr< CPVREpgInfoTag >> &results)
remove duplicates from a list of epg tags.
Definition: EpgSearchFilter.cpp:339
CDateTime m_endDateTime
Definition: EpgSearchData.h:29
CDateTime m_startDateTime
Definition: EpgSearchData.h:28
std::string GetPath() const
Return the path for this filter.
Definition: EpgSearchFilter.cpp:62
bool m_bIgnoreFinishedBroadcasts
Definition: EpgSearchData.h:26
DateTime class, which uses FileTime as it's base.
Definition: XBDateTime.h:63
void Reset()
Clear this filter.
Definition: EpgSearchFilter.cpp:37
bool FilterEntry(const std::shared_ptr< CPVREpgInfoTag > &tag) const
Check if a tag will be filtered or not.
Definition: EpgSearchFilter.cpp:332
int m_iGenreType
Definition: EpgSearchData.h:25
Definition: EpgSearchData.h:20
bool m_bIncludeUnknownGenres
Definition: EpgSearchData.h:24
bool m_bIgnoreFutureBroadcasts
Definition: EpgSearchData.h:27