MythTV  master
playbackboxhelper.h
Go to the documentation of this file.
1 #ifndef _FREE_SPACE_H_
2 #define _FREE_SPACE_H_
3 
4 #include <cstdint>
5 
6 #include <QStringList>
7 #include <QDateTime>
8 #include <QMutex>
9 
10 #include "mythcorecontext.h"
11 #include "metadatacommon.h"
12 #include "mthread.h"
13 #include "mythtypes.h"
14 
15 class PreviewGenerator;
16 class PBHEventHandler;
17 class ProgramInfo;
18 class QStringList;
19 class QObject;
20 class QTimer;
21 
27 };
28 
29 class PlaybackBoxHelper : public MThread
30 {
31  friend class PBHEventHandler;
32 
33  public:
34  explicit PlaybackBoxHelper(QObject *listener);
35  ~PlaybackBoxHelper(void);
36 
37  void ForceFreeSpaceUpdate(void);
38  void StopRecording(const ProgramInfo&);
39  void DeleteRecording( uint recordingID, bool forceDelete,
40  bool forgetHistory);
41  void DeleteRecordings(const QStringList&);
42  void UndeleteRecording(uint recordingID);
43  void CheckAvailability(const ProgramInfo&,
45  QString GetPreviewImage(const ProgramInfo&, bool check_availability = true);
46 
47  QString LocateArtwork(const QString &inetref, uint season,
48  VideoArtworkType type, const ProgramInfo *pginfo,
49  const QString &groupname = nullptr);
50 
51  uint64_t GetFreeSpaceTotalMB(void) const;
52  uint64_t GetFreeSpaceUsedMB(void) const;
53 
54  private:
55  void UpdateFreeSpace(void);
56 
57  private:
58  QObject *m_listener {nullptr};
60  mutable QMutex m_lock;
61 
62  // Free disk space tracking
63  uint64_t m_freeSpaceTotalMB {0LL};
64  uint64_t m_freeSpaceUsedMB {0LL};
65 
66  // Artwork Variables //////////////////////////////////////////////////////
68 };
69 
70 #endif // _FREE_SPACE_H_
This is a wrapper around QThread that does several additional things.
Definition: mthread.h:46
void DeleteRecording(uint recordingID, bool forceDelete, bool forgetHistory)
PBHEventHandler * m_eventHandler
uint64_t GetFreeSpaceTotalMB(void) const
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
void DeleteRecordings(const QStringList &)
VideoArtworkType
This class creates a preview image of a recording.
Holds information on recordings and videos.
Definition: programinfo.h:66
void UndeleteRecording(uint recordingID)
PlaybackBoxHelper(QObject *listener)
void CheckAvailability(const ProgramInfo &, CheckAvailabilityType cat=kCheckForCache)
unsigned int uint
Definition: compat.h:140
QString LocateArtwork(const QString &inetref, uint season, VideoArtworkType type, const ProgramInfo *pginfo, const QString &groupname=nullptr)
QString GetPreviewImage(const ProgramInfo &, bool check_availability=true)
void ForceFreeSpaceUpdate(void)
CheckAvailabilityType
void StopRecording(const ProgramInfo &)
uint64_t GetFreeSpaceUsedMB(void) const