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

/***************************************************************************
 *                                                                         *
 *   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

21 22 23
/**
 * Just an interface for concrete player implementations
 */
24

Dirk Mueller's avatar
Dirk Mueller committed
25 26
#include <qstring.h>

27 28
#include "filehandle.h"

29 30
class QObject;
class KSelectAction;
31

32
class Player
33 34
{
public:
35
    virtual ~Player() {}
36

37
    virtual void play(const FileHandle &file = FileHandle::null()) = 0;
38 39
    virtual void pause() = 0;
    virtual void stop() = 0;
40

41
    virtual void setVolume(float volume = 1.0) = 0;
42
    virtual float volume() const = 0;
43

44 45
    virtual bool playing() const = 0;
    virtual bool paused() const = 0;
46

47 48 49
    virtual long totalTime() const = 0;
    virtual long currentTime() const = 0;
    virtual int position() const = 0; // in this case not really the percent
50

51 52
    virtual void seek(long seekTime) = 0;
    virtual void seekPosition(int position) = 0;
53

54 55 56
protected:
    Player() {}

57 58 59
};

#endif