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_MEDIAOBJECTINTERFACE_H 00024 #define PHONON_MEDIAOBJECTINTERFACE_H 00025 00026 #include "mediaobject.h" 00027 #include <QtCore/QObject> 00028 00029 QT_BEGIN_HEADER 00030 QT_BEGIN_NAMESPACE 00031 00032 namespace Phonon 00033 { 00034 class StreamInterface; 00035 00067 class MediaObjectInterface 00068 { 00069 public: 00070 virtual ~MediaObjectInterface() {} 00071 00081 virtual void play() = 0; 00082 00091 virtual void pause() = 0; 00092 00104 virtual void stop() = 0; 00105 00121 virtual void seek(qint64 milliseconds) = 0; 00122 00129 virtual qint32 tickInterval() const = 0; 00139 virtual void setTickInterval(qint32 interval) = 0; 00140 00146 virtual bool hasVideo() const = 0; 00152 virtual bool isSeekable() const = 0; 00156 virtual qint64 currentTime() const = 0; 00160 virtual Phonon::State state() const = 0; 00161 00165 virtual QString errorString() const = 0; 00166 00172 virtual Phonon::ErrorType errorType() const = 0; 00173 00181 virtual qint64 totalTime() const = 0; 00182 00186 virtual MediaSource source() const = 0; 00187 00208 virtual void setSource(const MediaSource &) = 0; 00209 00225 virtual void setNextSource(const MediaSource &source) = 0; 00226 00227 virtual qint64 remainingTime() const { return totalTime() - currentTime(); } 00228 virtual qint32 prefinishMark() const = 0; 00229 virtual void setPrefinishMark(qint32) = 0; 00230 00231 virtual qint32 transitionTime() const = 0; 00232 virtual void setTransitionTime(qint32) = 0; 00233 }; 00234 } 00235 00236 Q_DECLARE_INTERFACE(Phonon::MediaObjectInterface, "MediaObjectInterface3.phonon.kde.org") 00237 00238 QT_END_NAMESPACE 00239 QT_END_HEADER 00240 00241 #endif // PHONON_MEDIAOBJECTINTERFACE_H 00242 // vim: sw=4 ts=4 tw=80