Qmmp
/usr/src/RPM/BUILD/qmmp-0.7-svn/src/qmmp/qmmpevents_p.h
00001 /***************************************************************************
00002  *   Copyright (C) 2011-2012 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 
00021 #ifndef QMMPEVENTS_P_H
00022 #define QMMPEVENTS_P_H
00023 
00024 #include <QMap>
00025 #include <QHash>
00026 #include <QEvent>
00027 #include "qmmp.h"
00028 
00029 #define EVENT_STATE_CHANGED (QEvent::Type(QEvent::User)) 
00030 #define EVENT_NEXT_TRACK_REQUEST (QEvent::Type(QEvent::User + 1)) 
00031 #define EVENT_FINISHED (QEvent::Type(QEvent::User + 2)) 
00032 #define EVENT_METADATA_CHANGED (QEvent::Type(QEvent::User + 3)) 
00033 #define EVENT_STREAM_INFO_CHANGED (QEvent::Type(QEvent::User + 4)) 
00038 class StateChangedEvent : public QEvent
00039 {
00040 public:
00041     StateChangedEvent(Qmmp::State currentState, Qmmp::State previousState);
00042     virtual ~StateChangedEvent();
00043 
00044     Qmmp::State currentState() const;
00045     Qmmp::State previousState() const;
00046 
00047 private:
00048     Qmmp::State m_state;
00049     Qmmp::State m_prevState;
00050 
00051 };
00052 
00056 class MetaDataChangedEvent : public QEvent
00057 {
00058 public:
00059     MetaDataChangedEvent(const QMap<Qmmp::MetaData, QString> &metaData);
00060     virtual ~MetaDataChangedEvent();
00064     QMap <Qmmp::MetaData, QString> metaData() const;
00068     QString metaData(Qmmp::MetaData key) const;
00069 
00070 private:
00071     QMap<Qmmp::MetaData, QString> m_metaData;
00072 };
00073 
00077 class StreamInfoChangedEvent : public QEvent
00078 {
00079 public:
00080     StreamInfoChangedEvent(const QHash<QString, QString> &info);
00081     virtual ~StreamInfoChangedEvent();
00085     QHash <QString, QString> streamInfo() const;
00086 
00087 private:
00088     QHash<QString, QString> m_streamInfo;
00089 };
00090 
00091 #endif // QMMPEVENTS_P_H
 All Classes Functions Variables Enumerations Enumerator