Phonon  4.7.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
platformplugin.h
1 /* This file is part of the KDE project
2  Copyright (C) 2007-2008 Matthias Kretz <kretz@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), Nokia Corporation
10  (or its successors, if any) and the KDE Free Qt Foundation, which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef PHONON_PLATFORMPLUGIN_H
24 #define PHONON_PLATFORMPLUGIN_H
25 
26 #include <QtCore/QObject>
27 #include <QtCore/QStringList>
28 #include <QtCore/QPair>
29 #include "phonon_export.h"
30 #include "objectdescription.h"
31 
32 
33 #ifndef QT_NO_PHONON_PLATFORMPLUGIN
34 
35 class QUrl;
36 class QObject;
37 class QIcon;
38 
39 namespace Phonon
40 {
41 class AbstractMediaStream;
42 
44 {
45  public:
46  virtual ~PlatformPlugin() {}
47 
52  virtual AbstractMediaStream *createMediaStream(const QUrl &url, QObject *parent) = 0;
53 
57  virtual QIcon icon(const QString &name) const = 0;
58 
62  virtual void notification(const char *notificationName, const QString &text,
63  const QStringList &actions = QStringList(), QObject *receiver = 0,
64  const char *actionSlot = 0) const = 0;
65 
70  virtual QString applicationName() const = 0;
71 
75  virtual QObject *createBackend() = 0;
76 
80  virtual QObject *createBackend(const QString &library, const QString &version) = 0;
81 
87  virtual bool isMimeTypeAvailable(const QString &mimeType) const = 0;
88 
92  virtual void saveVolume(const QString &outputName, qreal volume) = 0;
93 
97  virtual qreal loadVolume(const QString &outputName) const = 0;
98 
99  virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const = 0;
100  virtual QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const = 0;
101 
107 
108 #ifndef PHONON_NO_AUDIOCAPTURE
109 
114 #endif // PHONON_NO_AUDIOCAPTURE
115 
116 #ifndef PHONON_NO_VIDEOCAPTURE
117 
122 #endif // PHONON_NO_VIDEOCAPTURE
123 };
124 } // namespace Phonon
125 
126 Q_DECLARE_INTERFACE(Phonon::PlatformPlugin, "3PlatformPlugin.phonon.kde.org")
127 
128 #endif //QT_NO_PHONON_PLATFORMPLUGIN
129 
130 
131 #endif // PHONON_PLATFORMPLUGIN_H