MythTV  master
fileserverutil.h
Go to the documentation of this file.
1 #ifndef MEDIASERVERUTIL_H_
2 #define MEDIASERVERUTIL_H_
3 
4 using namespace std;
5 
6 // c++
7 #include <utility>
8 
9 // qt
10 #include <QDateTime>
11 #include <QString>
12 
13 #include "mythprotoserverexp.h"
14 #include "programinfo.h"
15 #include "referencecounter.h"
16 
17 class DeleteThread;
18 
20 {
21  public:
22  DeleteHandler(void);
23  explicit DeleteHandler(const QString& filename);
24  ~DeleteHandler(void) override;
25 
26  void Close(void);
27 
28  QString GetPath(void) { return m_path; }
29  int GetFD(void) const { return m_fd; }
30  off_t GetSize(void) const { return m_size; }
31  QDateTime GetWait(void) { return m_wait; }
32 
33  void SetPath(QString path) { m_path= std::move(path); }
34 
35  virtual void DeleteSucceeded(void) {};
36  virtual void DeleteFailed(void) {};
37 
38  friend class DeleteThread;
39 
40  private:
41  QString m_path;
42  int m_fd { -1 };
43  off_t m_size { 0 };
44  QDateTime m_wait;
45 
46 };
47 
48 QString GetPlaybackURL(ProgramInfo *pginfo, bool storePath = true);
49 
50 #endif
GetPlaybackURL
QString GetPlaybackURL(ProgramInfo *pginfo, bool storePath=true)
Definition: fileserverutil.cpp:45
DeleteThread
Definition: deletethread.h:19
DeleteHandler::GetWait
QDateTime GetWait(void)
Definition: fileserverutil.h:31
DeleteHandler::DeleteSucceeded
virtual void DeleteSucceeded(void)
Definition: fileserverutil.h:35
programinfo.h
DeleteHandler
Definition: fileserverutil.h:19
DeleteHandler::GetFD
int GetFD(void) const
Definition: fileserverutil.h:29
mythprotoserverexp.h
DeleteHandler::m_wait
QDateTime m_wait
Definition: fileserverutil.h:44
DeleteHandler::GetPath
QString GetPath(void)
Definition: fileserverutil.h:28
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:634
DeleteHandler::m_path
QString m_path
Definition: fileserverutil.h:41
DeleteHandler::SetPath
void SetPath(QString path)
Definition: fileserverutil.h:33
PROTOSERVER_PUBLIC
#define PROTOSERVER_PUBLIC
Definition: mythprotoserverexp.h:9
referencecounter.h
DeleteHandler::GetSize
off_t GetSize(void) const
Definition: fileserverutil.h:30
off_t
#define off_t
Definition: mythiowrapper.cpp:238
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
ReferenceCounter
General purpose reference counter.
Definition: referencecounter.h:26