aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/phonon/pyside_phonon.h
blob: c9d26282849f5798e58a9396c9bf45b91eec3b0f (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
39
#ifndef PYSIDE_PHONON
#define PYSIDE_PHONON

#include <QObject>
#include <phonon/backendcapabilities.h>

namespace Phonon
{
namespace BackendCapabilities
{
    class NotifierWrapper : public QObject
    {
        public:

            inline static NotifierWrapper* notifier() {
                Notifier* notifier = BackendCapabilities::notifier();

                if (notifier != m_notifier) {
                    delete m_instance;
                    m_instance = new NotifierWrapper(notifier);

                }

                return m_instance;
            }

            inline const QMetaObject* metaObject() const { return m_notifier->metaObject(); }

        private:
            static NotifierWrapper* m_instance;
            static Notifier* m_notifier;

            NotifierWrapper(Notifier* notifier) { m_notifier = notifier; }
            NotifierWrapper() {}
    };
}
}

#endif