player.h 1.63 KB
Newer Older
1 2
/***************************************************************************
    begin                : Sun Feb 17 2002
3
    copyright            : (C) 2002 - 2004 by Scott Wheeler
4
    email                : wheeler@kde.org
5
***************************************************************************/
6 7 8 9 10 11 12 13 14 15 16 17 18

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef PLAYER_H
#define PLAYER_H

19
#include <qobject.h>
Dirk Mueller's avatar
Dirk Mueller committed
20

21 22
#include "filehandle.h"

23
class Player : public QObject
24 25
{
public:
26
    virtual ~Player() {}
27

28
    virtual void play(const FileHandle &file = FileHandle::null()) = 0;
29 30
    virtual void pause() = 0;
    virtual void stop() = 0;
31

32
    virtual void setVolume(float volume = 1.0) = 0;
33
    virtual float volume() const = 0;
34

35 36
    virtual bool playing() const = 0;
    virtual bool paused() const = 0;
37

Scott Wheeler's avatar
Scott Wheeler committed
38 39
    virtual int totalTime() const = 0;
    virtual int currentTime() const = 0;
40
    virtual int position() const = 0; // in this case not really the percent
41

Scott Wheeler's avatar
Scott Wheeler committed
42
    virtual void seek(int seekTime) = 0;
43
    virtual void seekPosition(int position) = 0;
44

45
protected:
46
    Player() : QObject() {}
47

48 49 50
};

#endif