mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
refs #335, volume and mute functions
* refs #339, in the same step fixed delete
This commit is contained in:
committed by
Roland Winklmeier
parent
efb89dd7be
commit
e1647cd8fd
@@ -19,13 +19,12 @@ namespace BlackCore
|
||||
CContextAudioProxy::CContextAudioProxy(const QString &serviceName, QDBusConnection &connection, CRuntimeConfig::ContextMode mode, CRuntime *runtime) : IContextAudio(mode, runtime), m_dBusInterface(nullptr)
|
||||
{
|
||||
this->m_dBusInterface = new BlackMisc::CGenericDBusInterface(
|
||||
serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(),
|
||||
connection, this);
|
||||
serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(), connection, this);
|
||||
this->relaySignals(serviceName, connection);
|
||||
}
|
||||
|
||||
/*
|
||||
* Workaround for signals, not working without, but why?
|
||||
* Relaying signals
|
||||
*/
|
||||
void CContextAudioProxy::relaySignals(const QString &serviceName, QDBusConnection &connection)
|
||||
{
|
||||
@@ -33,7 +32,13 @@ namespace BlackCore
|
||||
"audioTestCompleted", this, SIGNAL(audioTestCompleted()));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(),
|
||||
"changedVoiceRooms", this, SIGNAL(changedVoiceRooms(BlackMisc::Audio::CVoiceRoomList, bool)));
|
||||
"changedVoiceRooms", this, SIGNAL(changedVoiceRooms(BlackMisc::Audio::CVoiceRoomList, bool)));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(),
|
||||
"changedAudioVolumes", this, SIGNAL(changedAudioVolumes(QList<qint32>)));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextAudio::ObjectPath(), IContextAudio::InterfaceName(),
|
||||
"changedMute", this, SIGNAL(changedMute(bool)));
|
||||
Q_ASSERT(s);
|
||||
Q_UNUSED(s);
|
||||
}
|
||||
@@ -198,6 +203,22 @@ namespace BlackCore
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("setVolumes"), com1, com2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Volumes
|
||||
*/
|
||||
void CContextAudioProxy::setVolumes(qint32 com1Volume, qint32 com2Volume)
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("setVolumes"), com1Volume, com2Volume);
|
||||
}
|
||||
|
||||
/*
|
||||
* Toggle mute
|
||||
*/
|
||||
void CContextAudioProxy::setMute(bool muted)
|
||||
{
|
||||
return this->m_dBusInterface->callDBus(QLatin1Literal("setMute"), muted);
|
||||
}
|
||||
|
||||
/*
|
||||
* Muted?
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user