summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/nowlistening/nlmediaplayer.h
blob: d3baf7cb21609ecbcb0b74c0bb928e24e7283fd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
    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; }
		TQString artist() const { return m_artist; }
		TQString album() const { return m_album; }
		TQString track() const { return m_track; }
		TQString name() const{ return m_name; }
		NLMediaType mediaType() const { return m_type; }
	protected:
		// The name of the application
		TQString m_name;
		bool m_playing;
		bool m_newTrack;
		TQString m_artist;
		TQString m_album;
		TQString m_track;
		NLMediaType m_type;
};

#endif