/src/libtomahawk/infosystem/infoplugins/unix/mprispluginplayeradaptor.cpp

http://github.com/tomahawk-player/tomahawk · C++ · 205 lines · 130 code · 33 blank · 42 comment · 0 complexity · 199bd048498fe734c14fcfbb867ede7a MD5 · raw file

  1. /*
  2. * This file was generated by qdbusxml2cpp version 0.7
  3. * Command line was: qdbusxml2cpp -a mprispluginplayeradaptor -c MprisPluginPlayerAdaptor mprispluginplayeradaptor.xml
  4. *
  5. * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
  6. *
  7. * This is an auto-generated file.
  8. * Do not edit! All changes made to it will be lost.
  9. */
  10. #include "mprispluginplayeradaptor.h"
  11. #include <QtCore/QMetaObject>
  12. #include <QtCore/QByteArray>
  13. #include <QtCore/QList>
  14. #include <QtCore/QMap>
  15. #include <QtCore/QString>
  16. #include <QtCore/QStringList>
  17. #include <QtCore/QVariant>
  18. /*
  19. * Implementation of adaptor class MprisPluginPlayerAdaptor
  20. */
  21. MprisPluginPlayerAdaptor::MprisPluginPlayerAdaptor(QObject *parent)
  22. : QDBusAbstractAdaptor(parent)
  23. {
  24. // constructor
  25. setAutoRelaySignals(true);
  26. }
  27. MprisPluginPlayerAdaptor::~MprisPluginPlayerAdaptor()
  28. {
  29. // destructor
  30. }
  31. bool MprisPluginPlayerAdaptor::canControl() const
  32. {
  33. // get the value of property CanControl
  34. return qvariant_cast< bool >(parent()->property("CanControl"));
  35. }
  36. bool MprisPluginPlayerAdaptor::canGoNext() const
  37. {
  38. // get the value of property CanGoNext
  39. return qvariant_cast< bool >(parent()->property("CanGoNext"));
  40. }
  41. bool MprisPluginPlayerAdaptor::canGoPrevious() const
  42. {
  43. // get the value of property CanGoPrevious
  44. return qvariant_cast< bool >(parent()->property("CanGoPrevious"));
  45. }
  46. bool MprisPluginPlayerAdaptor::canPause() const
  47. {
  48. // get the value of property CanPause
  49. return qvariant_cast< bool >(parent()->property("CanPause"));
  50. }
  51. bool MprisPluginPlayerAdaptor::canPlay() const
  52. {
  53. // get the value of property CanPlay
  54. return qvariant_cast< bool >(parent()->property("CanPlay"));
  55. }
  56. bool MprisPluginPlayerAdaptor::canSeek() const
  57. {
  58. // get the value of property CanSeek
  59. return qvariant_cast< bool >(parent()->property("CanSeek"));
  60. }
  61. QString MprisPluginPlayerAdaptor::loopStatus() const
  62. {
  63. // get the value of property LoopStatus
  64. return qvariant_cast< QString >(parent()->property("LoopStatus"));
  65. }
  66. void MprisPluginPlayerAdaptor::setLoopStatus(const QString &value)
  67. {
  68. // set the value of property LoopStatus
  69. parent()->setProperty("LoopStatus", qVariantFromValue(value));
  70. }
  71. double MprisPluginPlayerAdaptor::maximumRate() const
  72. {
  73. // get the value of property MaximumRate
  74. return qvariant_cast< double >(parent()->property("MaximumRate"));
  75. }
  76. QVariantMap MprisPluginPlayerAdaptor::metadata() const
  77. {
  78. // get the value of property Metadata
  79. return qvariant_cast< QVariantMap >(parent()->property("Metadata"));
  80. }
  81. double MprisPluginPlayerAdaptor::minimumRate() const
  82. {
  83. // get the value of property MinimumRate
  84. return qvariant_cast< double >(parent()->property("MinimumRate"));
  85. }
  86. QString MprisPluginPlayerAdaptor::playbackStatus() const
  87. {
  88. // get the value of property PlaybackStatus
  89. return qvariant_cast< QString >(parent()->property("PlaybackStatus"));
  90. }
  91. qlonglong MprisPluginPlayerAdaptor::position() const
  92. {
  93. // get the value of property Position
  94. return qvariant_cast< qlonglong >(parent()->property("Position"));
  95. }
  96. double MprisPluginPlayerAdaptor::rate() const
  97. {
  98. // get the value of property Rate
  99. return qvariant_cast< double >(parent()->property("Rate"));
  100. }
  101. void MprisPluginPlayerAdaptor::setRate(double value)
  102. {
  103. // set the value of property Rate
  104. parent()->setProperty("Rate", qVariantFromValue(value));
  105. }
  106. bool MprisPluginPlayerAdaptor::shuffle() const
  107. {
  108. // get the value of property Shuffle
  109. return qvariant_cast< bool >(parent()->property("Shuffle"));
  110. }
  111. void MprisPluginPlayerAdaptor::setShuffle(bool value)
  112. {
  113. // set the value of property Shuffle
  114. parent()->setProperty("Shuffle", qVariantFromValue(value));
  115. }
  116. double MprisPluginPlayerAdaptor::volume() const
  117. {
  118. // get the value of property Volume
  119. return qvariant_cast< double >(parent()->property("Volume"));
  120. }
  121. void MprisPluginPlayerAdaptor::setVolume(double value)
  122. {
  123. // set the value of property Volume
  124. parent()->setProperty("Volume", qVariantFromValue(value));
  125. }
  126. void MprisPluginPlayerAdaptor::Next()
  127. {
  128. // handle method call org.mpris.MediaPlayer2.Player.Next
  129. QMetaObject::invokeMethod(parent(), "Next");
  130. }
  131. void MprisPluginPlayerAdaptor::OpenUri(const QString &Uri)
  132. {
  133. // handle method call org.mpris.MediaPlayer2.Player.OpenUri
  134. QMetaObject::invokeMethod(parent(), "OpenUri", Q_ARG(QString, Uri));
  135. }
  136. void MprisPluginPlayerAdaptor::Pause()
  137. {
  138. // handle method call org.mpris.MediaPlayer2.Player.Pause
  139. QMetaObject::invokeMethod(parent(), "Pause");
  140. }
  141. void MprisPluginPlayerAdaptor::Play()
  142. {
  143. // handle method call org.mpris.MediaPlayer2.Player.Play
  144. QMetaObject::invokeMethod(parent(), "Play");
  145. }
  146. void MprisPluginPlayerAdaptor::PlayPause()
  147. {
  148. // handle method call org.mpris.MediaPlayer2.Player.PlayPause
  149. QMetaObject::invokeMethod(parent(), "PlayPause");
  150. }
  151. void MprisPluginPlayerAdaptor::Previous()
  152. {
  153. // handle method call org.mpris.MediaPlayer2.Player.Previous
  154. QMetaObject::invokeMethod(parent(), "Previous");
  155. }
  156. void MprisPluginPlayerAdaptor::Seek(qlonglong Offset)
  157. {
  158. qDebug() << Q_FUNC_INFO;
  159. // handle method call org.mpris.MediaPlayer2.Player.Seek
  160. QMetaObject::invokeMethod(parent(), "Seek", Q_ARG(qlonglong, Offset));
  161. }
  162. void MprisPluginPlayerAdaptor::SetPosition(const QDBusObjectPath &TrackId, qlonglong Position)
  163. {
  164. qDebug() << Q_FUNC_INFO;
  165. // handle method call org.mpris.MediaPlayer2.Player.SetPosition
  166. QMetaObject::invokeMethod(parent(), "SetPosition", Q_ARG(QDBusObjectPath, TrackId), Q_ARG(qlonglong, Position));
  167. }
  168. void MprisPluginPlayerAdaptor::Stop()
  169. {
  170. // handle method call org.mpris.MediaPlayer2.Player.Stop
  171. QMetaObject::invokeMethod(parent(), "Stop");
  172. }