MythTV master
videolist.h
Go to the documentation of this file.
1#ifndef VIDEOLIST_H_
2#define VIDEOLIST_H_
3
4// Type of the item added to the tree
5enum TreeNodeType : std::int8_t {
11};
12
13// Tree node attribute index
14enum TreeNodeAttributes : std::uint8_t {
16};
17
18class MythGenericTree;
21class ParentalLevel;
22
24{
25 public:
26 VideoList();
27 ~VideoList();
28
29 // Deleted functions should be public.
30 VideoList(const VideoList &) = delete; // not copyable
31 VideoList &operator=(const VideoList &) = delete; // not copyable
32
33 MythGenericTree *buildVideoList(bool filebrowser, bool flatlist,
34 int group_type,
35 const ParentalLevel &parental_level,
36 bool include_updirs);
37
38 void refreshList(bool filebrowser, const ParentalLevel &parental_level,
39 bool flat_list, int group_type);
40 bool refreshNode(MythGenericTree *node);
41
42 unsigned int count() const;
43
46
47 // returns the number of videos matched by this filter
48 int TryFilter(const VideoFilterSettings &filter) const;
49
50 unsigned int getFilterChangedState();
51
52 bool Delete(int video_id);
53
55
57
58 void InvalidateCache();
59
60 private:
62};
63
64int AddFileNode(MythGenericTree *where_to_add, const QString& name,
65 VideoMetadata *metadata);
66
67class VideoMetadata;
69{
70 public:
71 TreeNodeData() = default;;
72 explicit TreeNodeData(VideoMetadata *metadata);
73 TreeNodeData(QString path, QString host, QString prefix);
74
75 TreeNodeData(const TreeNodeData &other);
77
79
81 const VideoMetadata *GetMetadata() const;
82 QString GetPath() const;
83 QString GetHost() const;
84 QString GetPrefix() const;
85
86 private:
87 class TreeNodeDataPrivate *m_d {nullptr};
88};
89
91
92#endif // VIDEOLIST_H
TreeNodeData()=default
QString GetPath() const
Definition: videolist.cpp:133
TreeNodeData & operator=(const TreeNodeData &rhs)
Definition: videolist.cpp:101
QString GetHost() const
Definition: videolist.cpp:140
class TreeNodeDataPrivate * m_d
Definition: videolist.h:87
QString GetPrefix() const
Definition: videolist.cpp:147
VideoMetadata * GetMetadata()
Definition: videolist.cpp:117
bool Delete(int video_id)
Definition: videolist.cpp:513
bool refreshNode(MythGenericTree *node)
Definition: videolist.cpp:478
void InvalidateCache()
Definition: videolist.cpp:523
const VideoMetadataListManager & getListCache() const
Definition: videolist.cpp:503
void setCurrentVideoFilter(const VideoFilterSettings &filter)
Definition: videolist.cpp:493
int TryFilter(const VideoFilterSettings &filter) const
Definition: videolist.cpp:498
unsigned int count() const
Definition: videolist.cpp:483
void refreshList(bool filebrowser, const ParentalLevel &parental_level, bool flat_list, int group_type)
Definition: videolist.cpp:471
class VideoListImp * m_imp
Definition: videolist.h:61
VideoList & operator=(const VideoList &)=delete
unsigned int getFilterChangedState()
Definition: videolist.cpp:508
VideoList(const VideoList &)=delete
const VideoFilterSettings & getCurrentVideoFilter() const
Definition: videolist.cpp:488
MythGenericTree * GetTreeRoot()
Definition: videolist.cpp:518
MythGenericTree * buildVideoList(bool filebrowser, bool flatlist, int group_type, const ParentalLevel &parental_level, bool include_updirs)
Definition: videolist.cpp:462
Q_DECLARE_METATYPE(std::chrono::seconds)
int AddFileNode(MythGenericTree *where_to_add, const QString &name, VideoMetadata *metadata)
Definition: videolist.cpp:304
TreeNodeAttributes
Definition: videolist.h:14
@ kNodeSort
Definition: videolist.h:15
TreeNodeType
Definition: videolist.h:5
@ kRootNode
Definition: videolist.h:8
@ kSubFolder
Definition: videolist.h:6
@ kUpFolder
Definition: videolist.h:7
@ kDynamicSubFolder
Definition: videolist.h:10
@ kNoFilesFound
Definition: videolist.h:9