MythTV  master
musicdata.h
Go to the documentation of this file.
1 #ifndef MUSICDATA_H_
2 #define MUSICDATA_H_
3 
4 
5 // qt
6 #include <QRunnable>
7 
8 // myth
9 #include <mythexp.h>
10 #include <mythcorecontext.h>
11 
12 // mythmusic
13 #include "playlistcontainer.h"
14 
15 class PlaylistContainer;
16 class AllMusic;
17 class AllStream;
18 
20 class SendStringListThread : public QRunnable
21 {
22  public:
23  explicit SendStringListThread(const QStringList &strList)
24  : m_strList(strList) {}
25 
26  void run() override // QRunnable
27  {
29  }
30 
31  private:
32  QStringList m_strList;
33 };
34 
35 //----------------------------------------------------------------------------
36 
37 class MusicData : public QObject
38 {
39  Q_OBJECT
40 
41  public:
42 
43  MusicData() = default;
44  ~MusicData();
45 
46  static void scanMusic(void);
47  void loadMusic(void);
48 
49  public slots:
50  void reloadMusic(void);
51 
52  public:
54  AllMusic *m_all_music {nullptr};
56  bool m_initialized {false};
57 };
58 
59 // This global variable contains the MusicData instance for the application
61 
62 #endif
static void scanMusic(void)
Definition: musicdata.cpp:47
unsigned int slots[4]
Definition: element.c:38
void run() override
Definition: musicdata.h:26
#define MPUBLIC
Definition: mythexp.h:10
SendStringListThread(const QStringList &strList)
Definition: musicdata.h:23
AllStream * m_all_streams
Definition: musicdata.h:55
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void loadMusic(void)
Definition: musicdata.cpp:99
bool SendReceiveStringList(QStringList &strlist, bool quickTimeout=false, bool block=true)
Send a message to the backend and wait for a response.
PlaylistContainer * m_all_playlists
Definition: musicdata.h:53
MusicData()=default
MPUBLIC MusicData * gMusicData
Definition: musicdata.cpp:20
bool m_initialized
Definition: musicdata.h:56
QStringList m_strList
Definition: musicdata.h:32
send a message to the master BE without blocking the UI thread
Definition: musicdata.h:20
void reloadMusic(void)
reload music after a scan, rip or import
Definition: musicdata.cpp:57
AllMusic * m_all_music
Definition: musicdata.h:54