1 #ifndef _MP_XMMSINTERFACE_H_
2 #define _MP_XMMSINTERFACE_H_
3 //=============================================================================
4 //
5 //   File : MpXmmsInterface.h
6 //   Creation date : Fri 25 Mar 2005 20:04:54 by Szymon Stefanek
7 //
8 //   This file is part of the KVIrc IRC client distribution
9 //   Copyright (C) 2005-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 //   This program is FREE software. You can redistribute it and/or
12 //   modify it under the terms of the GNU General Public License
13 //   as published by the Free Software Foundation; either version 2
14 //   of the License, or (at your option) any later version.
15 //
16 //   This program is distributed in the HOPE that it will be USEFUL,
17 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
18 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 //   See the GNU General Public License for more details.
20 //
21 //   You should have received a copy of the GNU General Public License
22 //   along with this program. If not, write to the Free Software Foundation,
23 //   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //   Thnx to Alexander Stillich <torque at pltn dot org> for Audacious
26 //   media player interface hints :)
27 //
28 //=============================================================================
29 
30 #include "MpInterface.h"
31 
32 #include "kvi_settings.h"
33 
34 #include <QLibrary>
35 
36 #if !defined(COMPILE_ON_WINDOWS) && !defined(COMPILE_ON_MINGW)
37 class KviXmmsInterface : public MpInterface
38 {
39 public:
40 	KviXmmsInterface();
41 	virtual ~KviXmmsInterface();
42 
43 protected:
44 	QLibrary * m_pPlayerLibrary;
45 	QString m_szPlayerLibraryName;
46 	const char ** m_pLibraryPaths;
47 
48 public:
49 	virtual int detect(bool bStart);
50 	virtual bool prev();
51 	virtual bool next();
52 	virtual bool play();
53 	virtual bool stop();
54 	virtual bool pause();
55 	virtual bool quit();
56 	virtual bool jumpTo(kvs_int_t & iPos);
57 	virtual bool setVol(kvs_int_t & iVol);
58 	virtual int getVol();
59 	virtual MpInterface::PlayerStatus status();
60 	virtual QString nowPlaying();
61 	virtual bool playMrl(const QString & mrl);
62 	virtual QString mrl();
63 	virtual int getPlayListPos();
64 	virtual int position();
65 	virtual int length();
66 	virtual bool getRepeat();
67 	virtual bool getShuffle();
68 	virtual bool setRepeat(bool & bVal);
69 	virtual bool setShuffle(bool & bVal);
70 
71 protected:
72 	bool loadPlayerLibrary();
73 	void * lookupSymbol(const char * szSymbolName);
74 };
75 
MP_DECLARE_DESCRIPTOR(KviXmmsInterface)76 MP_DECLARE_DESCRIPTOR(KviXmmsInterface)
77 
78 class KviAudaciousClassicInterface : public KviXmmsInterface
79 {
80 public:
81 	KviAudaciousClassicInterface();
82 	virtual ~KviAudaciousClassicInterface();
83 };
84 
85 MP_DECLARE_DESCRIPTOR(KviAudaciousClassicInterface)
86 
87 #endif //COMPILE_ON_WINDOWS
88 
89 #endif //_MP_XMMSINTERFACE_H_
90