addoninterface.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_ADDONINTERFACE_H
00024 #define PHONON_ADDONINTERFACE_H
00025 
00026 #include "phononnamespace.h"
00027 
00028 #include <QtCore/QList>
00029 #include <QtCore/QVariant>
00030 
00031 QT_BEGIN_HEADER
00032 QT_BEGIN_NAMESPACE
00033 
00034 #ifndef QT_NO_PHONON_MEDIACONTROLLER
00035 
00036 namespace Phonon
00037 {
00043 class AddonInterface
00044 {
00045     public:
00046         virtual ~AddonInterface() {}
00047 
00048         enum Interface {
00049             NavigationInterface   = 1,
00050             ChapterInterface      = 2,
00051             AngleInterface        = 3,
00052             TitleInterface        = 4,
00053             SubtitleInterface     = 5,
00054             AudioChannelInterface = 6
00055         };
00056 
00057         enum NavigationCommand {
00058             Menu1Button
00059         };
00060         enum ChapterCommand {
00061             availableChapters,
00062             chapter,
00063             setChapter
00064         };
00065         enum AngleCommand {
00066             availableAngles,
00067             angle,
00068             setAngle
00069         };
00070         enum TitleCommand {
00071             availableTitles,
00072             title,
00073             setTitle,
00074             autoplayTitles,
00075             setAutoplayTitles
00076         };
00077         enum SubtitleCommand {
00078             availableSubtitles,
00079             currentSubtitle,
00080             setCurrentSubtitle
00081         };
00082         enum AudioChannelCommand {
00083             availableAudioChannels,
00084             currentAudioChannel,
00085             setCurrentAudioChannel
00086         };
00087 
00088         virtual bool hasInterface(Interface iface) const = 0;
00089 
00090         virtual QVariant interfaceCall(Interface iface, int command,
00091                 const QList<QVariant> &arguments = QList<QVariant>()) = 0;
00092 };
00093 
00094 } // namespace Phonon
00095 
00096 Q_DECLARE_INTERFACE(Phonon::AddonInterface, "AddonInterface0.2.phonon.kde.org")
00097 
00098 #endif //QT_NO_PHONON_MEDIACONTROLLER
00099 
00100 QT_END_NAMESPACE
00101 QT_END_HEADER
00102 
00103 #endif // PHONON_ADDONINTERFACE_H