phonon/platformplugin.h Source File

platformplugin.h
Go to the documentation of this file.
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 
34 
35 #ifndef QT_NO_PHONON_PLATFORMPLUGIN
36 
37 class QUrl;
38 class QObject;
39 class QIcon;
40 
41 namespace Phonon
42 {
43 class AbstractMediaStream;
44 
46 {
47  public:
48  virtual ~PlatformPlugin() {}
49 
54  virtual AbstractMediaStream *createMediaStream(const QUrl &url, QObject *parent) = 0;
55 
59  virtual QIcon icon(const QString &name) const = 0;
60 
64  virtual void notification(const char *notificationName, const QString &text,
65  const QStringList &actions = QStringList(), QObject *receiver = 0,
66  const char *actionSlot = 0) const = 0;
67 
72  virtual QString applicationName() const = 0;
73 
77  virtual QObject *createBackend() = 0;
78 
82  virtual QObject *createBackend(const QString &library, const QString &version) = 0;
83 
89  virtual bool isMimeTypeAvailable(const QString &mimeType) const = 0;
90 
94  virtual void saveVolume(const QString &outputName, qreal volume) = 0;
95 
99  virtual qreal loadVolume(const QString &outputName) const = 0;
100 
103 
108 };
109 } // namespace Phonon
110 
111 Q_DECLARE_INTERFACE(Phonon::PlatformPlugin, "3PlatformPlugin.phonon.kde.org")
112 
113 #endif //QT_NO_PHONON_PLATFORMPLUGIN
114 
117 
118 #endif // PHONON_PLATFORMPLUGIN_H
GLuint GLuint GLsizei GLenum type
Definition: GLee.h:872
Base class for custom media data streams.
virtual QList< int > objectDescriptionIndexes(ObjectDescriptionType type) const =0
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
ObjectDescriptionType
Defines the type of information that is contained in a ObjectDescription object.
virtual QIcon icon(const QString &name) const =0
Returns the icon for the given icon name.
Definition: qicon.h:60
virtual void saveVolume(const QString &outputName, qreal volume)=0
Saves the volume for the given output.
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(QWebKitPlatformPlugin,"com.nokia.Qt.WebKit.PlatformPlugin/1.7")
Provides a tuple of enduser visible name and description.
virtual QList< QPair< QByteArray, QString > > deviceAccessListFor(const Phonon::AudioOutputDevice &) const
Returns a list of (driver, handle) pairs for the given AudioOutputDevice description.
virtual AbstractMediaStream * createMediaStream(const QUrl &url, QObject *parent)=0
Creates a AbstractMediaStream object that provides the data for the given url.
virtual QObject * createBackend()=0
Creates a backend object.
virtual QHash< QByteArray, QVariant > objectDescriptionProperties(ObjectDescriptionType type, int index) const =0
Definition: qurl.h:61
GLuint const GLchar * name
Definition: GLee.h:1704
The KDE Multimedia classes.
virtual qreal loadVolume(const QString &outputName) const =0
Loads the volume for the given output.
virtual QString applicationName() const =0
Returns the name of the application.
#define QT_END_HEADER
Definition: qglobal.h:142
virtual void notification(const char *notificationName, const QString &text, const QStringList &actions=QStringList(), QObject *receiver=0, const char *actionSlot=0) const =0
Shows a notification popup.
virtual bool isMimeTypeAvailable(const QString &mimeType) const =0
Tries to check whether the default backend supports a given MIME type without loading the actual back...
GLuint index
Definition: GLee.h:1704