kttsd Library API Documentation

player.h

00001 /***************************************************************************
00002     begin                : Sun Feb 17 2002
00003     copyright            : (C) 2002 - 2004 by Scott Wheeler
00004     email                : wheeler@kde.org
00005 ***************************************************************************/
00006 
00007 /***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 
00016 #ifndef PLAYER_H
00017 #define PLAYER_H
00018 
00019 #include <qobject.h>
00020 #include <qstringlist.h>
00021 
00022 // #include "filehandle.h"
00023 
00024 class Player : virtual public QObject
00025 {
00026     Q_OBJECT
00027 
00028 public:
00029     virtual ~Player() {}
00030 
00031 //    virtual void play(const FileHandle &file = FileHandle::null()) = 0;
00032     virtual void startPlay(const QString& file) = 0;
00033     virtual void pause() = 0;
00034     virtual void stop() = 0;
00035 
00036     virtual void setVolume(float volume = 1.0) = 0;
00037     virtual float volume() const = 0;
00038 
00039     virtual bool playing() const = 0;
00040     virtual bool paused() const = 0;
00041 
00042     virtual int totalTime() const = 0;
00043     virtual int currentTime() const = 0;
00044     virtual int position() const = 0; // in this case not really the percent
00045 
00046     virtual void seek(int seekTime) = 0;
00047     virtual void seekPosition(int position) = 0;
00048 
00049     virtual QStringList getPluginList( const QCString& classname ) = 0;
00050     virtual void setSinkName(const QString &sinkName) = 0;
00051 
00052     virtual bool requireVersion(const uint major, const uint minor, const uint micro) = 0;
00053 
00054 protected:
00055     Player(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList() ) :
00056         QObject(parent, name) { if (args.isEmpty()); } // TODO: Avoid compiler WARNING.  Better way?
00057 
00058 };
00059 
00060 #endif
KDE Logo
This file is part of the documentation for kttsd Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Dec 12 14:37:18 2004 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003