backendinterface.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2006-2007 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_BACKENDINTERFACE_H
00024 #define PHONON_BACKENDINTERFACE_H
00025 
00026 #include "phonon_export.h"
00027 #include "objectdescription.h"
00028 
00029 #include <QtCore/QtGlobal>
00030 #include <QtCore/QSet>
00031 
00032 QT_BEGIN_HEADER
00033 QT_BEGIN_NAMESPACE
00034 
00035 class QVariant;
00036 
00037 namespace Phonon
00038 {
00039 
00168 class BackendInterface
00169 {
00170     public:
00176         virtual ~BackendInterface() {}
00177 
00181         enum Class {
00185             MediaObjectClass,
00189             VolumeFaderEffectClass,
00193             AudioOutputClass,
00197             AudioDataOutputClass,
00201             VisualizationClass,
00205             VideoDataOutputClass,
00211             EffectClass,
00215             VideoWidgetClass
00216         };
00217 
00225         virtual QObject *createObject(Class c, QObject *parent, const QList<QVariant> &args = QList<QVariant>()) = 0;
00226 
00232         virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const = 0;
00233 
00250         virtual QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const = 0;
00251 
00256         virtual bool startConnectionChange(QSet<QObject *>) = 0;
00257 
00261         virtual bool connectNodes(QObject *, QObject *) = 0;
00262 
00266         virtual bool disconnectNodes(QObject *, QObject *) = 0;
00267 
00272         virtual bool endConnectionChange(QSet<QObject *>) = 0;
00273 
00277         virtual QStringList availableMimeTypes() const = 0;
00278 
00279 };
00280 } // namespace Phonon
00281 
00282 Q_DECLARE_INTERFACE(Phonon::BackendInterface, "BackendInterface3.phonon.kde.org")
00283 
00284 QT_END_NAMESPACE
00285 QT_END_HEADER
00286 
00287 #endif // PHONON_BACKENDINTERFACE_H