Skip to content
Snippets Groups Projects
Commit 8a3ad543 authored by Sébastien Blin's avatar Sébastien Blin Committed by Amin Bandali
Browse files

smartinfo: fix display on client-gnome (libwrap)

signal from CallManager was not correctly caught and emitted to the
client, so the SmartInfos weren't displayed.

Change-Id: I365a401fc754a5895ff62531547b0ab8fb6cf087
parent 4d0c9c13
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,4 @@ public: ...@@ -48,7 +48,4 @@ public:
QMap<QString, QString> m_information; QMap<QString, QString> m_information;
void setMapInfo(const MapStringString& info); void setMapInfo(const MapStringString& info);
public slots:
void slotSmartInfo(const MapStringString& info);
}; };
...@@ -225,8 +225,8 @@ public: ...@@ -225,8 +225,8 @@ public:
}), }),
exportable_callback<CallSignal::SmartInfo>( exportable_callback<CallSignal::SmartInfo>(
[this](const std::map<std::string, std::string>& info) { [this](const std::map<std::string, std::string>& info) {
LOG_DRING_SIGNAL("smartInfo", ""); LOG_DRING_SIGNAL("SmartInfo", "");
Q_EMIT smartInfo(convertMap(info)); Q_EMIT SmartInfo(convertMap(info));
}), }),
exportable_callback<CallSignal::RemoteRecordingChanged>( exportable_callback<CallSignal::RemoteRecordingChanged>(
[this](const std::string& callId, const std::string& contactId, bool state) { [this](const std::string& callId, const std::string& contactId, bool state) {
...@@ -599,7 +599,7 @@ Q_SIGNALS: // SIGNALS ...@@ -599,7 +599,7 @@ Q_SIGNALS: // SIGNALS
void audioMuted(const QString& callId, bool state); void audioMuted(const QString& callId, bool state);
void videoMuted(const QString& callId, bool state); void videoMuted(const QString& callId, bool state);
void peerHold(const QString& callId, bool state); void peerHold(const QString& callId, bool state);
void smartInfo(const MapStringString& info); void SmartInfo(const MapStringString& info);
void remoteRecordingChanged(const QString& callId, void remoteRecordingChanged(const QString& callId,
const QString& peerNumber, const QString& peerNumber,
bool remoteRecordingState); bool remoteRecordingState);
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "smartinfohub.h" #include "smartinfohub.h"
#include "private/smartInfoHub_p.h" #include "private/smartInfoHub_p.h"
#include "typedefs.h"
#include <dbus/videomanager.h> #include <dbus/videomanager.h>
#include <dbus/callmanager.h> #include <dbus/callmanager.h>
...@@ -28,9 +27,9 @@ SmartInfoHub::SmartInfoHub() ...@@ -28,9 +27,9 @@ SmartInfoHub::SmartInfoHub()
{ {
d_ptr = new SmartInfoHubPrivate; d_ptr = new SmartInfoHubPrivate;
connect(&CallManager::instance(), connect(&CallManager::instance(),
SIGNAL(SmartInfo(MapStringString)), &CallManagerInterface::SmartInfo,
d_ptr, this,
SLOT(slotSmartInfo(MapStringString)), &SmartInfoHub::slotSmartInfo,
Qt::QueuedConnection); Qt::QueuedConnection);
} }
...@@ -64,13 +63,12 @@ SmartInfoHub::setRefreshTime(uint32_t timeMS) ...@@ -64,13 +63,12 @@ SmartInfoHub::setRefreshTime(uint32_t timeMS)
// Retrieve information from the map and implement all the variables // Retrieve information from the map and implement all the variables
void void
SmartInfoHubPrivate::slotSmartInfo(const MapStringString& map) SmartInfoHub::slotSmartInfo(const MapStringString& map)
{ {
for (int i = 0; i < map.size(); i++) { for (int i = 0; i < map.size(); i++)
SmartInfoHubPrivate::m_information[map.keys().at(i)] = map[map.keys().at(i)]; d_ptr->m_information[map.keys().at(i)] = map[map.keys().at(i)];
}
emit SmartInfoHub::instance().changed(); emit changed();
} }
// Getter // Getter
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#pragma once #pragma once
#include <QObject> #include <QObject>
#include "typedefs.h"
class SmartInfoHubPrivate; class SmartInfoHubPrivate;
...@@ -52,6 +53,9 @@ Q_SIGNALS: ...@@ -52,6 +53,9 @@ Q_SIGNALS:
/// Emitted when informations have changed /// Emitted when informations have changed
void changed(); void changed();
private Q_SLOTS:
void slotSmartInfo(const MapStringString& info);
private: private:
// use to initialise the connection between the Qsignal and the lambda function // use to initialise the connection between the Qsignal and the lambda function
SmartInfoHub(); SmartInfoHub();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment