player.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PLAYOBJECT_H
00021 #define PLAYOBJECT_H
00022
00023 #include <kdelibs_export.h>
00024 #include <qobject.h>
00025
00026 class KURL;
00027
00028 namespace KDE
00029 {
00030 namespace Multimedia
00031 {
00032 class Channel;
00039 class KDE_EXPORT Player : public QObject
00040 {
00041 Q_OBJECT
00042 public:
00046 enum State
00047 {
00053 NoMedia,
00060 Loading,
00065 Stopped,
00069 Playing,
00074 Buffering,
00078 Paused
00079 };
00080
00081 virtual ~Player();
00082
00090 virtual bool setOutputChannel( Channel * device ) = 0;
00091
00095 virtual State state() const;
00096
00102 virtual bool hasVolumeControl() const = 0;
00103
00109 virtual float volume() const = 0;
00110
00114 virtual long totalTime() const = 0;
00115
00119 virtual long remainingTime() const = 0;
00120
00124 virtual long currentTime() const = 0;
00125
00131 virtual bool seekable() const = 0;
00132
00136 virtual long tickInterval() const = 0;
00137
00138 public slots:
00148 virtual bool load( const KURL & url ) = 0;
00149
00153 virtual bool play() = 0;
00154
00158 virtual bool pause() = 0;
00159
00163 virtual bool stop() = 0;
00164
00176 virtual bool setVolume( float volume ) = 0;
00177
00185 virtual bool seek( long time ) = 0;
00186
00195 virtual bool setTickInterval( long ms ) = 0;
00196
00197 signals:
00203 void finished();
00204
00205
00206
00215 void stateChanged( KDE::Multimedia::Player::State newstate, KDE::Multimedia::Player::State oldstate );
00216
00224 void tick( long time );
00225
00232 void length( long length );
00233
00234 protected:
00239 Player( QObject * parent, const char * name );
00240
00248 void setState( State newstate );
00249
00250 private:
00251 class Private;
00252 Private * d;
00253
00254 State m_state;
00255 };
00256 }}
00257
00258
00259 #endif // PLAYOBJECT_H
This file is part of the documentation for kdemm Library Version 3.4.2.