11 #if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
12 #include <QRecursiveMutex>
27 bool discontinuity {
false};
40 QString InitializeNewChain(
const QString &seed);
41 void LoadFromExistingChain(
const QString &
id);
43 void SetHostPrefix(
const QString &
prefix);
44 void SetInputType(
const QString &
type);
46 void DestroyChain(
void);
48 void AppendNewProgram(
ProgramInfo *pginfo,
const QString& channum,
49 const QString& inputname,
bool discont);
53 void ReloadAll(
const QStringList &data = QStringList());
56 QString
GetID(
void)
const {
return m_id; }
58 int ProgramIsAt(
uint chanid,
const QDateTime &starttime)
const;
60 std::chrono::seconds GetLengthAtCurPos(
void);
61 std::chrono::seconds GetLengthAtPos(
int pos);
62 int TotalSize(
void)
const;
63 bool HasNext(
void)
const;
64 bool HasPrev(
void)
const {
return (m_curPos > 0); }
69 {
return (m_switchId >= 0 && m_jumpPos == std::chrono::seconds::max()); }
72 {
return (m_switchId >= 0 && m_jumpPos != std::chrono::seconds::max()); }
73 QString GetChannelName(
int pos = -1)
const;
74 QString GetInputName(
int pos = -1)
const;
75 QString GetInputType(
int pos = -1)
const;
79 void SwitchTo(
int num);
80 void SwitchToNext(
bool up);
81 void ClearSwitch(
void);
82 ProgramInfo *GetSwitchProgram(
bool &discont,
bool &newtype,
int &newid);
85 void JumpTo(
int num, std::chrono::seconds pos);
86 void JumpToNext(
bool up, std::chrono::seconds pos);
87 std::chrono::seconds GetJumpPos(
void);
92 uint HostSocketCount(
void)
const;
98 QStringList entriesToStringList()
const;
100 bool entriesFromStringList(
const QStringList &items);
103 void BroadcastUpdate();
106 ProgramInfo *DoGetNextProgram(
bool up,
int curpos,
int &newid,
107 bool &discont,
bool &newtype);
112 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
113 mutable QMutex m_lock {QMutex::Recursive};
128 std::chrono::seconds m_jumpPos {std::chrono::seconds::max()};
134 #endif // LIVETVCHAIN_H