mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
refs #382, reviewed audio context handling
* only init QDbusServer for P2P * changed init order of contexts in runtime * use "fake" signal to call setComVoiceRooms (remote in GUI) * added slot to change voice room callsign * used "org.swift" instead of "net.vatim" (just style) * used const QString for serviceName * added correct copyright header (just style)
This commit is contained in:
@@ -25,7 +25,9 @@ namespace BlackCore
|
||||
*/
|
||||
CContextApplicationProxy::CContextApplicationProxy(const QString &serviceName, QDBusConnection &connection, CRuntimeConfig::ContextMode mode, CRuntime *runtime) : IContextApplication(mode, runtime), m_dBusInterface(nullptr)
|
||||
{
|
||||
this->m_dBusInterface = new BlackMisc::CGenericDBusInterface(serviceName , IContextApplication::ObjectPath(), IContextApplication::InterfaceName(), connection, this);
|
||||
this->m_dBusInterface = new CGenericDBusInterface(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(), connection, this);
|
||||
|
||||
// this->m_dBusInterface = new CGenericDBusInterface(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(), connection, this);
|
||||
this->relaySignals(serviceName, connection);
|
||||
|
||||
// Enable event forwarding from GUI process to core
|
||||
@@ -33,7 +35,7 @@ namespace BlackCore
|
||||
connect(inputManager, &CInputManager::hotkeyFuncEvent, this, &CContextApplicationProxy::processHotkeyFuncEvent);
|
||||
inputManager->setEventForwarding(true);
|
||||
|
||||
connect(this, &IContextApplication::messageLogged, this, [](const CStatusMessage &message, const Event::COriginator &origin)
|
||||
connect(this, &IContextApplication::messageLogged, this, [](const CStatusMessage & message, const Event::COriginator & origin)
|
||||
{
|
||||
if (!origin.isFromSameProcess())
|
||||
{
|
||||
@@ -43,17 +45,20 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
/*
|
||||
* Workaround for signals
|
||||
* Connect for signals
|
||||
*/
|
||||
void CContextApplicationProxy::relaySignals(const QString &serviceName, QDBusConnection &connection)
|
||||
{
|
||||
// signals originating from impl side
|
||||
bool s = connection.connect(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(),
|
||||
"messageLogged", this, SIGNAL(messageLogged(BlackMisc::CStatusMessage,BlackMisc::Event::COriginator)));
|
||||
"messageLogged", this, SIGNAL(messageLogged(BlackMisc::CStatusMessage, BlackMisc::Event::COriginator)));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(),
|
||||
"componentChanged", this, SIGNAL(componentChanged(uint, uint)));
|
||||
Q_ASSERT(s);
|
||||
s = connection.connect(serviceName, IContextApplication::ObjectPath(), IContextApplication::InterfaceName(),
|
||||
"fakedSetComVoiceRoom", this, SIGNAL(fakedSetComVoiceRoom(BlackMisc::Audio::CVoiceRoomList)));
|
||||
Q_ASSERT(s);
|
||||
Q_UNUSED(s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user