1 /***************************************************************************
2 begin : Sun Feb 17 2002
3 copyright : (C) 2002 - 2004 by Scott Wheeler
4 email : wheeler@kde.org
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 ******************************************************************************/
25 #include <QtCore/QObject>
26 #include <QtCore/QStringList>
27 #include <QtCore/QByteArray>
30 #include <kdemacros.h>
32 // #include "filehandle.h"
34 class KDE_EXPORT Player
: public QObject
41 // virtual void play(const FileHandle &file = FileHandle::null()) = 0;
42 virtual void startPlay(const QString
& file
) = 0;
43 virtual void pause() = 0;
44 virtual void stop() = 0;
46 virtual void setVolume(float volume
= 1.0) = 0;
47 virtual float volume() const = 0;
49 virtual bool playing() const = 0;
50 virtual bool paused() const = 0;
52 virtual int totalTime() const = 0;
53 virtual int currentTime() const = 0;
54 virtual int position() const = 0; // in this case not really the percent
56 virtual void seek(int seekTime
) = 0;
57 virtual void seekPosition(int position
) = 0;
59 virtual QStringList
getPluginList( const QByteArray
& classname
) {
63 virtual void setSinkName(const QString
&sinkName
) { Q_UNUSED(sinkName
); }
64 virtual bool requireVersion(uint major
, uint minor
, uint micro
) {
70 virtual void setDebugLevel(uint level
) { Q_UNUSED(level
); }
71 virtual void setPeriodSize(uint periodSize
) { Q_UNUSED(periodSize
); }
72 virtual void setPeriods(uint periods
) {Q_UNUSED(periods
); }
75 Player(QObject
* parent
= 0, const char* name
= 0, const QStringList
& args
=QStringList() ) :
76 QObject(parent
) { Q_UNUSED(name
); Q_UNUSED(args
); }