- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# platformplugin.h

Go to the documentation of this file.

    00001 /*  This file is part of the KDE project
    00002     Copyright (C) 2007-2008 Matthias Kretz <kretz@kde.org>
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Lesser General Public
    00006     License as published by the Free Software Foundation; either
    00007     version 2.1 of the License, or (at your option) version 3, or any
    00008     later version accepted by the membership of KDE e.V. (or its
    00009     successor approved by the membership of KDE e.V.), Nokia Corporation
    00010     (or its successors, if any) and the KDE Free Qt Foundation, which shall
    00011     act as a proxy defined in Section 6 of version 3 of the license.
    00012
    00013     This library is distributed in the hope that it will be useful,
    00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00016     Lesser General Public License for more details.
    00017
    00018     You should have received a copy of the GNU Lesser General Public
    00019     License along with this library.  If not, see <http://www.gnu.org/licenses/>.
    00020
    00021 */
    00022
    00023 #ifndef PHONON_PLATFORMPLUGIN_H
    00024 #define PHONON_PLATFORMPLUGIN_H
    00025
    00026 #include <QtCore/QObject>
    00027 #include <QtCore/QStringList>
    00028 #include <QtCore/QPair>
    00029 #include "phonon_export.h"
    00030 #include "objectdescription.h"
    00031
    00032 QT_BEGIN_HEADER
    00033 QT_BEGIN_NAMESPACE
    00034
    00035 #ifndef QT_NO_PHONON_PLATFORMPLUGIN
    00036
    00037 class QUrl;
    00038 class QObject;
    00039 class QIcon;
    00040
    00041 namespace Phonon
    00042 {
    00043 class AbstractMediaStream;
    00044
    00045 class PlatformPlugin
    00046 {
    00047     public:
    00048         virtual ~PlatformPlugin() {}
    00049
    00054         virtual AbstractMediaStream *createMediaStream(const QUrl &url, QObject *parent) = 0;
    00055
    00059         virtual QIcon icon(const QString &name) const = 0;
    00060
    00064         virtual void notification(const char *notificationName, const QString &text,
    00065                 const QStringList &actions = QStringList(), QObject *receiver = 0,
    00066                 const char *actionSlot = 0) const = 0;
    00067
    00072         virtual QString applicationName() const = 0;
    00073
    00077         virtual QObject *createBackend() = 0;
    00078
    00082         virtual QObject *createBackend(const QString &library, const QString &version) = 0;
    00083
    00089         virtual bool isMimeTypeAvailable(const QString &mimeType) const = 0;
    00090
    00094         virtual void saveVolume(const QString &outputName, qreal volume) = 0;
    00095
    00099         virtual qreal loadVolume(const QString &outputName) const = 0;
    00100
    00101         virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const = 0;
    00102         virtual QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const = 0;
    00103
    00107         virtual QList<QPair<QByteArray, QString> > deviceAccessListFor(const Phonon::AudioOutputDevice &) const { return QList<QPair<QByteArray, QString> >(); }
    00108 };
    00109 } // namespace Phonon
    00110
    00111 Q_DECLARE_INTERFACE(Phonon::PlatformPlugin, "3PlatformPlugin.phonon.kde.org")
    00112
    00113 #endif //QT_NO_PHONON_PLATFORMPLUGIN
    00114
    00115 QT_END_NAMESPACE
    00116 QT_END_HEADER
    00117
    00118 #endif // PHONON_PLATFORMPLUGIN_H