11 #include <QRecursiveMutex>
25 bool discontinuity {
false};
38 QString InitializeNewChain(
const QString &seed);
39 void LoadFromExistingChain(
const QString &
id);
41 void SetHostPrefix(
const QString &
prefix);
42 void SetInputType(
const QString &
type);
44 void DestroyChain(
void);
46 void AppendNewProgram(
ProgramInfo *pginfo,
const QString& channum,
47 const QString& inputname,
bool discont);
51 void ReloadAll(
const QStringList &data = QStringList());
54 QString
GetID(
void)
const {
return m_id; }
56 int ProgramIsAt(
uint chanid,
const QDateTime &starttime)
const;
58 std::chrono::seconds GetLengthAtCurPos(
void);
59 std::chrono::seconds GetLengthAtPos(
int pos);
60 int TotalSize(
void)
const;
61 bool HasNext(
void)
const;
62 bool HasPrev(
void)
const {
return (m_curPos > 0); }
67 {
return (m_switchId >= 0 && m_jumpPos == std::chrono::seconds::max()); }
70 {
return (m_switchId >= 0 && m_jumpPos != std::chrono::seconds::max()); }
71 QString GetChannelName(
int pos = -1)
const;
72 QString GetInputName(
int pos = -1)
const;
73 QString GetInputType(
int pos = -1)
const;
77 void SwitchTo(
int num);
78 void SwitchToNext(
bool up);
79 void ClearSwitch(
void);
80 ProgramInfo *GetSwitchProgram(
bool &discont,
bool &newtype,
int &newid);
83 void JumpTo(
int num, std::chrono::seconds pos);
84 void JumpToNext(
bool up, std::chrono::seconds pos);
85 std::chrono::seconds GetJumpPos(
void);
90 uint HostSocketCount(
void)
const;
96 QStringList entriesToStringList()
const;
98 bool entriesFromStringList(
const QStringList &items);
101 void BroadcastUpdate();
104 ProgramInfo *DoGetNextProgram(
bool up,
int curpos,
int &newid,
105 bool &discont,
bool &newtype);
122 std::chrono::seconds m_jumpPos {std::chrono::seconds::max()};
128 #endif // LIVETVCHAIN_H