diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/plugins/nowlistening/nlmediaplayer.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/nowlistening/nlmediaplayer.h')
-rw-r--r-- | kopete/plugins/nowlistening/nlmediaplayer.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/kopete/plugins/nowlistening/nlmediaplayer.h b/kopete/plugins/nowlistening/nlmediaplayer.h new file mode 100644 index 00000000..5c619150 --- /dev/null +++ b/kopete/plugins/nowlistening/nlmediaplayer.h @@ -0,0 +1,58 @@ +/* + nlmediaplayer.h + + Kopete Now Listening To plugin + + Copyright (c) 2002,2003,2004 by Will Stephenson <will@stevello.free-online.co.uk> + + Kopete (c) 2002,2003,2004 by the Kopete developers <kopete-devel@kde.org> + + Purpose: + Represents a generic media player + and abstracts real media players' actual interfaces (DCOP for KDE apps, + otherwise anything goes! + + ************************************************************************* + * * + * 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 NLMEDIAPLAYER_H +#define NLMEDIAPLAYER_H + +class NLMediaPlayer +{ + public: + enum NLMediaType { Audio, Video }; + NLMediaPlayer() { m_playing = false; m_artist = ""; m_album = ""; m_track = ""; m_newTrack = false; } + virtual ~NLMediaPlayer() {} + /** + * This communicates with the actual mediaplayer and updates + * the model of its state in this class + */ + virtual void update() = 0; + bool playing() const { return m_playing; } + bool newTrack() const { return m_newTrack; } + QString artist() const { return m_artist; } + QString album() const { return m_album; } + QString track() const { return m_track; } + QString name() const{ return m_name; } + NLMediaType mediaType() const { return m_type; } + protected: + // The name of the application + QString m_name; + bool m_playing; + bool m_newTrack; + QString m_artist; + QString m_album; + QString m_track; + NLMediaType m_type; +}; + +#endif +// vim: set noet ts=4 sts=4 sw=4: |