Qmmp
/usr/src/RPM/BUILD/qmmp-0.8-svn/src/qmmpui/mediaplayer.h
00001 /***************************************************************************
00002  *   Copyright (C) 2008-2013 by Ilya Kotov                                 *
00003  *   forkotov02@hotmail.ru                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00019  ***************************************************************************/
00020 #ifndef MEDIAPLAYER_H
00021 #define MEDIAPLAYER_H
00022 
00023 #include <QObject>
00024 #include <qmmp/soundcore.h>
00025 #include "playlistmanager.h"
00026 
00027 
00028 class QmmpUiSettings;
00029 
00030 
00034 class MediaPlayer : public QObject
00035 {
00036     Q_OBJECT
00037 public:
00042     MediaPlayer(QObject *parent = 0);
00046     ~MediaPlayer();
00050     static MediaPlayer* instance();
00054     PlayListManager *playListManager();
00055 
00056 public slots:
00060     void play(qint64 offset = -1);
00064     void stop();
00068     void next();
00072     void previous();
00073 
00074 private slots:
00075     void playNext();
00076     void updateNextUrl();
00077     void processState(Qmmp::State state);
00078     void updateMetaData();
00079 
00080 private:
00081     QmmpUiSettings *m_settings;
00082     PlayListManager *m_pl_manager;
00083     SoundCore *m_core;
00084     static MediaPlayer* m_instance;
00085     int m_skips;
00086     QString m_nextUrl;
00087 };
00088 
00089 #endif
 All Classes Functions Variables Enumerations Enumerator