PageRenderTime 24ms CodeModel.GetById 2ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 11#include "mprispluginplayeradaptor.h"
 12#include <QtCore/QMetaObject>
 13#include <QtCore/QByteArray>
 14#include <QtCore/QList>
 15#include <QtCore/QMap>
 16#include <QtCore/QString>
 17#include <QtCore/QStringList>
 18#include <QtCore/QVariant>
 19
 20/*
 21 * Implementation of adaptor class MprisPluginPlayerAdaptor
 22 */
 23
 24MprisPluginPlayerAdaptor::MprisPluginPlayerAdaptor(QObject *parent)
 25    : QDBusAbstractAdaptor(parent)
 26{
 27    // constructor
 28    setAutoRelaySignals(true);
 29}
 30
 31MprisPluginPlayerAdaptor::~MprisPluginPlayerAdaptor()
 32{
 33    // destructor
 34}
 35
 36bool MprisPluginPlayerAdaptor::canControl() const
 37{
 38    // get the value of property CanControl
 39    return qvariant_cast< bool >(parent()->property("CanControl"));
 40}
 41
 42bool MprisPluginPlayerAdaptor::canGoNext() const
 43{
 44    // get the value of property CanGoNext
 45    return qvariant_cast< bool >(parent()->property("CanGoNext"));
 46}
 47
 48bool MprisPluginPlayerAdaptor::canGoPrevious() const
 49{
 50    // get the value of property CanGoPrevious
 51    return qvariant_cast< bool >(parent()->property("CanGoPrevious"));
 52}
 53
 54bool MprisPluginPlayerAdaptor::canPause() const
 55{
 56    // get the value of property CanPause
 57    return qvariant_cast< bool >(parent()->property("CanPause"));
 58}
 59
 60bool MprisPluginPlayerAdaptor::canPlay() const
 61{
 62    // get the value of property CanPlay
 63    return qvariant_cast< bool >(parent()->property("CanPlay"));
 64}
 65
 66bool MprisPluginPlayerAdaptor::canSeek() const
 67{
 68    // get the value of property CanSeek
 69    return qvariant_cast< bool >(parent()->property("CanSeek"));
 70}
 71
 72QString MprisPluginPlayerAdaptor::loopStatus() const
 73{
 74    // get the value of property LoopStatus
 75    return qvariant_cast< QString >(parent()->property("LoopStatus"));
 76}
 77
 78void MprisPluginPlayerAdaptor::setLoopStatus(const QString &value)
 79{
 80    // set the value of property LoopStatus
 81    parent()->setProperty("LoopStatus", qVariantFromValue(value));
 82}
 83
 84double MprisPluginPlayerAdaptor::maximumRate() const
 85{
 86    // get the value of property MaximumRate
 87    return qvariant_cast< double >(parent()->property("MaximumRate"));
 88}
 89
 90QVariantMap MprisPluginPlayerAdaptor::metadata() const
 91{
 92    // get the value of property Metadata
 93    return qvariant_cast< QVariantMap >(parent()->property("Metadata"));
 94}
 95
 96double MprisPluginPlayerAdaptor::minimumRate() const
 97{
 98    // get the value of property MinimumRate
 99    return qvariant_cast< double >(parent()->property("MinimumRate"));
100}
101
102QString MprisPluginPlayerAdaptor::playbackStatus() const
103{
104    // get the value of property PlaybackStatus
105    return qvariant_cast< QString >(parent()->property("PlaybackStatus"));
106}
107
108qlonglong MprisPluginPlayerAdaptor::position() const
109{
110    // get the value of property Position
111    return qvariant_cast< qlonglong >(parent()->property("Position"));
112}
113
114double MprisPluginPlayerAdaptor::rate() const
115{
116    // get the value of property Rate
117    return qvariant_cast< double >(parent()->property("Rate"));
118}
119
120void MprisPluginPlayerAdaptor::setRate(double value)
121{
122    // set the value of property Rate
123    parent()->setProperty("Rate", qVariantFromValue(value));
124}
125
126bool MprisPluginPlayerAdaptor::shuffle() const
127{
128    // get the value of property Shuffle
129    return qvariant_cast< bool >(parent()->property("Shuffle"));
130}
131
132void MprisPluginPlayerAdaptor::setShuffle(bool value)
133{
134    // set the value of property Shuffle
135    parent()->setProperty("Shuffle", qVariantFromValue(value));
136}
137
138double MprisPluginPlayerAdaptor::volume() const
139{
140    // get the value of property Volume
141    return qvariant_cast< double >(parent()->property("Volume"));
142}
143
144void MprisPluginPlayerAdaptor::setVolume(double value)
145{
146    // set the value of property Volume
147    parent()->setProperty("Volume", qVariantFromValue(value));
148}
149
150void MprisPluginPlayerAdaptor::Next()
151{
152    // handle method call org.mpris.MediaPlayer2.Player.Next
153    QMetaObject::invokeMethod(parent(), "Next");
154}
155
156void MprisPluginPlayerAdaptor::OpenUri(const QString &Uri)
157{
158    // handle method call org.mpris.MediaPlayer2.Player.OpenUri
159    QMetaObject::invokeMethod(parent(), "OpenUri", Q_ARG(QString, Uri));
160}
161
162void MprisPluginPlayerAdaptor::Pause()
163{
164    // handle method call org.mpris.MediaPlayer2.Player.Pause
165    QMetaObject::invokeMethod(parent(), "Pause");
166}
167
168void MprisPluginPlayerAdaptor::Play()
169{
170    // handle method call org.mpris.MediaPlayer2.Player.Play
171    QMetaObject::invokeMethod(parent(), "Play");
172}
173
174void MprisPluginPlayerAdaptor::PlayPause()
175{
176    // handle method call org.mpris.MediaPlayer2.Player.PlayPause
177    QMetaObject::invokeMethod(parent(), "PlayPause");
178}
179
180void MprisPluginPlayerAdaptor::Previous()
181{
182    // handle method call org.mpris.MediaPlayer2.Player.Previous
183    QMetaObject::invokeMethod(parent(), "Previous");
184}
185
186void MprisPluginPlayerAdaptor::Seek(qlonglong Offset)
187{
188    qDebug() << Q_FUNC_INFO;
189    // handle method call org.mpris.MediaPlayer2.Player.Seek
190    QMetaObject::invokeMethod(parent(), "Seek", Q_ARG(qlonglong, Offset));
191}
192
193void MprisPluginPlayerAdaptor::SetPosition(const QDBusObjectPath &TrackId, qlonglong Position)
194{
195    qDebug() << Q_FUNC_INFO;
196    // handle method call org.mpris.MediaPlayer2.Player.SetPosition
197    QMetaObject::invokeMethod(parent(), "SetPosition", Q_ARG(QDBusObjectPath, TrackId), Q_ARG(qlonglong, Position));
198}
199
200void MprisPluginPlayerAdaptor::Stop()
201{
202    // handle method call org.mpris.MediaPlayer2.Player.Stop
203    QMetaObject::invokeMethod(parent(), "Stop");
204}
205