KVIrc  4.9.2
DeveloperAPIs
MpMprisInterface.h
Go to the documentation of this file.
1 #ifndef _MP_AUDACIOUSINTERFACE_H_
2 #define _MP_AUDACIOUSINTERFACE_H_
3 //=============================================================================
4 //
5 // File : MpMprisInterface.h
6 // Creation date : Thu 06 Dec 2007 14:20:02 by Tomasz Moń
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2007-2009 Tomasz Moń <desowin@gmail.com>
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 //=============================================================================
26 
27 #include "MpInterface.h"
28 
29 #include "kvi_settings.h"
30 
31 #if(defined(COMPILE_DBUS_SUPPORT) && !defined(COMPILE_ON_WINDOWS) && !defined(COMPILE_ON_MAC) && !defined(COMPILE_ON_MINGW))
32 #include <QtDBus/QtDBus>
33 
34 class MpMprisInterface : public MpInterface
35 {
36 public:
37  MpMprisInterface();
38  virtual ~MpMprisInterface();
39 
40 public:
41  QString m_szServiceName;
42  virtual int detect(bool bStart);
43  virtual bool prev();
44  virtual bool next();
45  virtual bool play();
46  virtual bool stop();
47  virtual bool pause();
48  virtual bool quit();
50  virtual QString nowPlaying();
51  virtual QString mrl();
52  virtual QString title();
53  virtual QString artist();
54  virtual QString genre();
55  virtual QString comment();
56  virtual QString year();
57  virtual QString album();
58  virtual int bitRate();
59  virtual int sampleRate();
60  virtual bool setVol(kvs_int_t & iVol);
61  virtual int getVol();
62  virtual int position();
63  virtual int length();
64  virtual bool jumpTo(kvs_int_t & iPos);
65 };
66 
67 class MpAudaciousInterface : public MpMprisInterface
68 {
69 public:
70  MpAudaciousInterface();
71 
72 public:
73  virtual bool quit();
74  virtual MpInterface::PlayerStatus status();
75  virtual QString mrl();
76  virtual int length();
77 
78  virtual int getPlayListPos();
79  virtual QString year();
80  virtual QString mediaType();
81 };
82 
83 class MpBmpxInterface : public MpMprisInterface
84 {
85 public:
86  MpBmpxInterface();
87  virtual MpInterface::PlayerStatus status();
88 };
89 
90 class MpAmarok2Interface : public MpMprisInterface
91 {
92 public:
93  MpAmarok2Interface();
94 };
95 
96 class MpQmmpInterface : public MpMprisInterface
97 {
98 public:
99  MpQmmpInterface();
100 };
101 
102 class MpXmms2Interface : public MpMprisInterface
103 {
104 public:
105  MpXmms2Interface();
106 };
107 
108 class MpSongbirdInterface : public MpMprisInterface
109 {
110 public:
111  MpSongbirdInterface();
112  virtual MpInterface::PlayerStatus status();
113 };
114 
115 class MpTotemInterface : public MpMprisInterface
116 {
117 public:
118  MpTotemInterface();
119 };
120 
121 class MpVlcInterface : public MpMprisInterface
122 {
123 public:
124  MpVlcInterface();
125 };
126 
127 class MpClementineInterface : public MpMprisInterface
128 {
129 public:
130  MpClementineInterface();
131 };
132 
133 MP_DECLARE_DESCRIPTOR(MpAudaciousInterface)
134 MP_DECLARE_DESCRIPTOR(MpBmpxInterface)
135 MP_DECLARE_DESCRIPTOR(MpAmarok2Interface)
136 MP_DECLARE_DESCRIPTOR(MpQmmpInterface)
137 MP_DECLARE_DESCRIPTOR(MpXmms2Interface)
138 MP_DECLARE_DESCRIPTOR(MpSongbirdInterface)
139 MP_DECLARE_DESCRIPTOR(MpTotemInterface)
140 MP_DECLARE_DESCRIPTOR(MpVlcInterface)
141 MP_DECLARE_DESCRIPTOR(MpClementineInterface)
142 #endif //COMPILE_ON_WINDOWS
143 
144 #endif //_MP_AUDACIOUSINTERFACE_H_
PlayerStatus
Definition: MpInterface.h:113
virtual MpInterface::PlayerStatus status()
Definition: MpInterface.cpp:191
virtual bool play()=0
virtual QString comment()
Definition: MpInterface.cpp:136
virtual QString album()
Definition: MpInterface.cpp:149
void quit()
Definition: winamp.cpp:125
virtual QString genre()
Definition: MpInterface.cpp:130
virtual bool jumpTo(kvs_int_t &iPos)
Definition: MpInterface.cpp:185
virtual int sampleRate()
Definition: MpInterface.cpp:203
virtual QString title()
Definition: MpInterface.cpp:124
virtual bool setVol(kvs_int_t &iVol)
Definition: MpInterface.cpp:167
virtual bool stop()=0
virtual bool pause()=0
virtual QString mrl()=0
virtual QString nowPlaying()=0
Definition: MpInterface.h:31
virtual bool quit()
Definition: MpInterface.cpp:58
virtual int bitRate()
Definition: MpInterface.cpp:197
virtual bool prev()=0
virtual int length()
Definition: MpInterface.cpp:52
virtual int position()
Definition: MpInterface.cpp:46
virtual int getVol()
Definition: MpInterface.cpp:173
This file contains compile time settings.
#define MP_DECLARE_DESCRIPTOR(_interfaceclass)
Definition: MpInterface.h:200
virtual QString year()
Definition: MpInterface.cpp:142
kvi_i64_t kvs_int_t
Definition: KviKvsTypes.h:33
virtual bool next()=0
virtual QString artist()
Definition: MpInterface.cpp:118
virtual int detect(bool bStart)=0