~ubuntu-branches/ubuntu/wily/kradio4/wily

« back to all changes in this revision

Viewing changes to plugins/dbus/dbussupport.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Pino Toscano, Pino Toscano
  • Date: 2011-01-16 10:37:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110116103720-hdne9plqu6uek40k
Tags: 4.0.2-1
[ Pino Toscano ]
* QA upload.
* New upstream release. (Closes: #609258)
* Bring back and update the kradio4-convert-presents.1 man page.
* Update copyright.
* debian/rules: pass first the sequence to `dh', then the arguments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
        SoundStreamID streamSinkID = queryCurrentSoundStreamSinkID();
151
151
        bool          paused       = false;
152
152
        queryIsPlaybackPaused(streamSinkID, paused);
 
153
        if (!paused) {
 
154
            sendPausePlayback(streamSinkID);
 
155
        }
 
156
    }
 
157
}
 
158
 
 
159
void DBusSupport::playbackResume()
 
160
{
 
161
    if (queryIsPowerOn()) {
 
162
        SoundStreamID streamSinkID = queryCurrentSoundStreamSinkID();
 
163
        bool          paused       = false;
 
164
        queryIsPlaybackPaused(streamSinkID, paused);
153
165
        if (paused) {
154
166
            sendResumePlayback(streamSinkID);
155
167
        }
156
168
    }
157
169
}
158
170
 
159
 
void DBusSupport::playbackResume()
160
 
{
161
 
    if (queryIsPowerOn()) {
162
 
        SoundStreamID streamSinkID = queryCurrentSoundStreamSinkID();
163
 
        bool          paused       = false;
164
 
        queryIsPlaybackPaused(streamSinkID, paused);
165
 
        if (!paused) {
166
 
            sendPausePlayback(streamSinkID);
167
 
        }
168
 
    }
169
 
}
170
 
 
171
171
 
172
172
void DBusSupport::setVolume(float v)
173
173
{
200
200
 
201
201
void DBusSupport::nextStation()
202
202
{
203
 
    if (queryIsPowerOn()) {
 
203
//     if (queryIsPowerOn()) {
204
204
        int k = queryCurrentStationIdx() + 1;
205
205
        if (k >= queryStations().count())
206
206
            k = 0;
207
207
        sendActivateStation(k);
208
 
    }
 
208
//     }
209
209
}
210
210
 
211
211
void DBusSupport::prevStation()
212
212
{
213
 
    if (queryIsPowerOn()) {
 
213
//     if (queryIsPowerOn()) {
214
214
        int k = queryCurrentStationIdx() - 1;
215
215
        if (k < 0)
216
216
            k = queryStations().count() - 1;
217
217
        sendActivateStation(k);
218
 
    }
 
218
//     }
219
219
}
220
220
 
221
221
void DBusSupport::setStation(int idx)
222
222
{
223
 
    if (queryIsPowerOn()) {
 
223
//     if (queryIsPowerOn()) {
224
224
        sendActivateStation(idx);
225
 
    }
 
225
//     }
226
226
}
227
227
 
228
228
void DBusSupport::setStation(const QString &stationid)