add more spacing
[personal-kdebase.git] / runtime / phonon / platform_kde / kdeplatformplugin.h
blobaef6108298cc9ac03909d6fcee3f2856f6983d30
1 /* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
20 #ifndef PHONON_KDEPLUGINFACTORY_H
21 #define PHONON_KDEPLUGINFACTORY_H
23 #include <phonon/platformplugin.h>
24 #include <phonon/objectdescription.h>
25 #include <QtCore/QObject>
26 #include <kservice.h>
28 namespace Phonon
31 class DeviceListing;
33 class KdePlatformPlugin : public QObject, public PlatformPlugin
35 Q_INTERFACES(Phonon::PlatformPlugin)
36 Q_OBJECT
37 public:
38 KdePlatformPlugin();
39 ~KdePlatformPlugin();
41 AbstractMediaStream *createMediaStream(const QUrl &url, QObject *parent);
43 QIcon icon(const QString &name) const;
44 void notification(const char *notificationName, const QString &text,
45 const QStringList &actions, QObject *receiver,
46 const char *actionSlot) const;
47 QString applicationName() const;
48 QObject *createBackend();
49 QObject *createBackend(const QString &library, const QString &version);
50 bool isMimeTypeAvailable(const QString &mimeType) const;
51 void saveVolume(const QString &outputName, qreal volume);
52 qreal loadVolume(const QString &outputName) const;
54 virtual QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const;
55 virtual QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const;
57 virtual QList<QPair<QByteArray, QString> > deviceAccessListFor(const Phonon::AudioOutputDevice &) const;
59 signals:
60 void objectDescriptionChanged(ObjectDescriptionType);
62 private:
63 QObject *createBackend(KService::Ptr newService);
64 void ensureDeviceListingObject() const;
65 mutable DeviceListing *m_devList;
68 } // namespace Phonon
70 #endif // PHONON_KDEPLUGINFACTORY_H