[4829fd]: plugins / mpris / mprissupport.h Maximize Restore History

Download this file

mprissupport.h    110 lines (80 with data), 3.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
/***************************************************************************
mprissupport.h - description
-------------------
copyright : (C) 2014 by Pino Toscano
email : toscano.pino@tiscali.it
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DBUSSUPPORT_H
#define DBUSSUPPORT_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <QtCore/QObject>
#include "radio_interfaces.h"
#include "soundstreamclient_interfaces.h"
#include "pluginbase.h"
class MPRISSupport : public QObject,
public PluginBase,
public IRadioClient,
public ISoundStreamClient
{
Q_OBJECT
public:
MPRISSupport(const QString &instanceID, const QString &name);
~MPRISSupport();
virtual bool connectI (Interface *);
virtual bool disconnectI (Interface *);
virtual QString pluginClassName() const { return "MPRISSupport"; }
virtual void startPlugin();
// PluginBase
RECEIVERS:
INLINE_IMPL_DEF_noticeConnectedI(IErrorLogClient);
public:
virtual void saveState ( KConfigGroup &) const;
virtual void restoreState (const KConfigGroup &);
virtual ConfigPageInfo createConfigurationPage();
// IRadioClient methods
RECEIVERS:
INLINE_IMPL_DEF_noticeConnectedI(IRadioClient);
bool noticePowerChanged(bool on);
bool noticeStationChanged(const RadioStation &rs, int idx);
bool noticeStationsChanged(const StationList &sl);
bool noticePresetFileChanged(const QString &f);
bool noticeRDSStateChanged(bool enabled);
bool noticeRDSRadioTextChanged(const QString &s);
bool noticeRDSStationNameChanged(const QString &s);
bool noticeCurrentSoundStreamSourceIDChanged(SoundStreamID id);
bool noticeCurrentSoundStreamSinkIDChanged(SoundStreamID id);
// ISoundStreamClient methods
RECEIVERS:
void noticeConnectedI(ISoundStreamServer *s, bool pointer_valid);
bool noticePlaybackVolumeChanged(SoundStreamID id, float volume);
bool noticeSoundStreamChanged(SoundStreamID id);
Q_SIGNALS:
void powerChanged(bool on);
void RDSStateChanged(bool enabled);
void RDSRadioTextChanged(const QString &s);
void RDSStationNameChanged(const QString &s);
void volumeChanged(double vol);
void currentStreamChanged();
public:
void showAllWidgetPlugins();
bool isPlaying() const;
bool isPaused() const;
double volume() const;
void setVolume(double vol);
QVariantMap mprisMetadata() const;
void stop();
void play();
void pause();
void playPause();
};
#endif