File indexing completed on 2021-12-21 13:27:58

0001 /**
0002  * Copyright (C) 2004 Scott Wheeler <wheeler@kde.org>
0003  *
0004  * This program is free software; you can redistribute it and/or modify it under
0005  * the terms of the GNU General Public License as published by the Free Software
0006  * Foundation; either version 2 of the License, or (at your option) any later
0007  * version.
0008  *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
0012  *
0013  * You should have received a copy of the GNU General Public License along with
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.
0015  */
0016 
0017 #ifndef PLAYLISTINTERFACE_H
0018 #define PLAYLISTINTERFACE_H
0019 
0020 #include <QVector>
0021 #include <QObject>
0022 
0023 class FileHandle;
0024 
0025 class PlaylistInterfaceSignaller: public QObject{
0026     Q_OBJECT
0027 signals:
0028     void playingItemChanged();
0029     void playingItemDataChanged();
0030 };
0031 
0032 class PlaylistInterface
0033 {
0034 public:
0035     virtual QString name() const = 0;
0036     virtual FileHandle currentFile() const = 0;
0037     virtual int time() const = 0;
0038     virtual int count() const = 0;
0039 
0040     virtual void playNext() = 0;
0041     virtual void playPrevious() = 0;
0042     virtual void stop() = 0;
0043 
0044     virtual bool playing() const = 0;
0045     void currentPlayingItemChanged();
0046     virtual void playlistItemsChanged();
0047 
0048     PlaylistInterfaceSignaller signaller;
0049 
0050     virtual ~PlaylistInterface();
0051 };
0052 
0053 #endif
0054 
0055 // vim: set et sw=4 tw=0 sta: