summaryrefslogtreecommitdiff
path: root/timerconflict.h
blob: d3def8940c2bdc781e05cd82326aadec69e73c7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef __TVGUIDE_TIMERCONFLICT_H
#define __TVGUIDE_TIMERCONFLICT_H

class cTVGuideTimerConflict {
public:
    cTVGuideTimerConflict(void);
    virtual ~cTVGuideTimerConflict(void);
    time_t time;
    time_t timeStart;
    time_t timeStop;
    time_t overlapStart;
    time_t overlapStop;
    int percentPossible;
    int timerID;
    std::vector<int> timerIDs;
    bool timerInvolved(int involvedID);
};

class cTVGuideTimerConflicts {
private:
    std::vector<cTVGuideTimerConflict*> conflicts;
    int numConflicts;
    int currentConflict;
public:
    cTVGuideTimerConflicts(void);
    virtual ~cTVGuideTimerConflicts(void);
    void AddConflict(std::string epgSearchConflictLine);
    void CalculateConflicts(void);
    int NumConflicts(void) {return numConflicts; };
    void SetCurrentConflict(int current) { currentConflict = current; };
    cTVGuideTimerConflict *GetCurrentConflict(void);
    int GetCurrentConflictTimerID(int timerIndex);
    int GetCorrespondingConflict(int timerID);
    cTVGuideTimerConflict *GetConflict(int conflictIndex);
    std::vector<cTVGuideTimerConflict*> GetConflictsBetween(time_t start, time_t stop);
};

#endif //__TVGUIDE_RECMMANAGER_H