Skip to content
Snippets Groups Projects
Commit ecae6ced authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

qtwrapper: Add more optional debug output for CallManager

Refs #69979
parent 7218c5a6
Branches
Tags
No related merge requests found
...@@ -52,103 +52,119 @@ public: ...@@ -52,103 +52,119 @@ public:
exportable_callback<CallSignal::StateChange>( exportable_callback<CallSignal::StateChange>(
[this] (const std::string &callID, const std::string &state, int code) { [this] (const std::string &callID, const std::string &state, int code) {
QTimer::singleShot(0, [this,callID, state, code] { QTimer::singleShot(0, [this,callID, state, code] {
LOG_DRING_SIGNAL3("callStateChanged",QString(callID.c_str()) , QString(state.c_str()) , code);
emit this->callStateChanged(QString(callID.c_str()), QString(state.c_str()), code); emit this->callStateChanged(QString(callID.c_str()), QString(state.c_str()), code);
}); });
}), }),
exportable_callback<CallSignal::TransferFailed>( exportable_callback<CallSignal::TransferFailed>(
[this] () { [this] () {
QTimer::singleShot(0, [this] { QTimer::singleShot(0, [this] {
LOG_DRING_SIGNAL("transferFailed","");
emit this->transferFailed(); emit this->transferFailed();
}); });
}), }),
exportable_callback<CallSignal::TransferSucceeded>( exportable_callback<CallSignal::TransferSucceeded>(
[this] () { [this] () {
QTimer::singleShot(0, [this] { QTimer::singleShot(0, [this] {
LOG_DRING_SIGNAL("transferSucceeded","");
emit this->transferSucceeded(); emit this->transferSucceeded();
}); });
}), }),
exportable_callback<CallSignal::RecordPlaybackStopped>( exportable_callback<CallSignal::RecordPlaybackStopped>(
[this] (const std::string &filepath) { [this] (const std::string &filepath) {
QTimer::singleShot(0, [this,filepath] { QTimer::singleShot(0, [this,filepath] {
LOG_DRING_SIGNAL("recordPlaybackStopped",QString(filepath.c_str()));
emit this->recordPlaybackStopped(QString(filepath.c_str())); emit this->recordPlaybackStopped(QString(filepath.c_str()));
}); });
}), }),
exportable_callback<CallSignal::VoiceMailNotify>( exportable_callback<CallSignal::VoiceMailNotify>(
[this] (const std::string &accountID, int count) { [this] (const std::string &accountID, int count) {
QTimer::singleShot(0, [this,accountID, count] { QTimer::singleShot(0, [this,accountID, count] {
LOG_DRING_SIGNAL2("voiceMailNotify",QString(accountID.c_str()), count);
emit this->voiceMailNotify(QString(accountID.c_str()), count); emit this->voiceMailNotify(QString(accountID.c_str()), count);
}); });
}), }),
exportable_callback<CallSignal::IncomingMessage>( exportable_callback<CallSignal::IncomingMessage>(
[this] (const std::string &callID, const std::string &from, const std::string &message) { [this] (const std::string &callID, const std::string &from, const std::string &message) {
QTimer::singleShot(0, [this,callID, from, message] { QTimer::singleShot(0, [this,callID, from, message] {
LOG_DRING_SIGNAL3("incomingMessage",QString(callID.c_str()),QString(from.c_str()),QString(message.c_str()));
emit this->incomingMessage(QString(callID.c_str()), QString(from.c_str()), QString(message.c_str())); emit this->incomingMessage(QString(callID.c_str()), QString(from.c_str()), QString(message.c_str()));
}); });
}), }),
exportable_callback<CallSignal::IncomingCall>( exportable_callback<CallSignal::IncomingCall>(
[this] (const std::string &accountID, const std::string &callID, const std::string &from) { [this] (const std::string &accountID, const std::string &callID, const std::string &from) {
QTimer::singleShot(0, [this,accountID, callID, from] { QTimer::singleShot(0, [this,accountID, callID, from] {
LOG_DRING_SIGNAL3("incomingCall",QString(accountID.c_str()), QString(callID.c_str()), QString(from.c_str()));
emit this->incomingCall(QString(accountID.c_str()), QString(callID.c_str()), QString(from.c_str())); emit this->incomingCall(QString(accountID.c_str()), QString(callID.c_str()), QString(from.c_str()));
}); });
}), }),
exportable_callback<CallSignal::RecordPlaybackFilepath>( exportable_callback<CallSignal::RecordPlaybackFilepath>(
[this] (const std::string &callID, const std::string &filepath) { [this] (const std::string &callID, const std::string &filepath) {
QTimer::singleShot(0, [this,callID, filepath] { QTimer::singleShot(0, [this,callID, filepath] {
LOG_DRING_SIGNAL2("recordPlaybackFilepath",QString(callID.c_str()), QString(filepath.c_str()));
emit this->recordPlaybackFilepath(QString(callID.c_str()), QString(filepath.c_str())); emit this->recordPlaybackFilepath(QString(callID.c_str()), QString(filepath.c_str()));
}); });
}), }),
exportable_callback<CallSignal::ConferenceCreated>( exportable_callback<CallSignal::ConferenceCreated>(
[this] (const std::string &confID) { [this] (const std::string &confID) {
QTimer::singleShot(0, [this,confID] { QTimer::singleShot(0, [this,confID] {
LOG_DRING_SIGNAL("conferenceCreated",QString(confID.c_str()));
emit this->conferenceCreated(QString(confID.c_str())); emit this->conferenceCreated(QString(confID.c_str()));
}); });
}), }),
exportable_callback<CallSignal::ConferenceChanged>( exportable_callback<CallSignal::ConferenceChanged>(
[this] (const std::string &confID, const std::string &state) { [this] (const std::string &confID, const std::string &state) {
QTimer::singleShot(0, [this,confID, state] { QTimer::singleShot(0, [this,confID, state] {
LOG_DRING_SIGNAL2("conferenceChanged",QString(confID.c_str()), QString(state.c_str()));
emit this->conferenceChanged(QString(confID.c_str()), QString(state.c_str())); emit this->conferenceChanged(QString(confID.c_str()), QString(state.c_str()));
}); });
}), }),
exportable_callback<CallSignal::UpdatePlaybackScale>( exportable_callback<CallSignal::UpdatePlaybackScale>(
[this] (const std::string &filepath, int position, int size) { [this] (const std::string &filepath, int position, int size) {
QTimer::singleShot(0, [this,filepath, position, size] { QTimer::singleShot(0, [this,filepath, position, size] {
LOG_DRING_SIGNAL3("updatePlaybackScale",QString(filepath.c_str()), position, size);
emit this->updatePlaybackScale(QString(filepath.c_str()), position, size); emit this->updatePlaybackScale(QString(filepath.c_str()), position, size);
}); });
}), }),
exportable_callback<CallSignal::ConferenceRemoved>( exportable_callback<CallSignal::ConferenceRemoved>(
[this] (const std::string &confID) { [this] (const std::string &confID) {
QTimer::singleShot(0, [this,confID] { QTimer::singleShot(0, [this,confID] {
LOG_DRING_SIGNAL("conferenceRemoved",QString(confID.c_str()));
emit this->conferenceRemoved(QString(confID.c_str())); emit this->conferenceRemoved(QString(confID.c_str()));
}); });
}), }),
exportable_callback<CallSignal::NewCallCreated>( exportable_callback<CallSignal::NewCallCreated>(
[this] (const std::string &accountID, const std::string &callID, const std::string &to) { [this] (const std::string &accountID, const std::string &callID, const std::string &to) {
QTimer::singleShot(0, [this,accountID, callID, to] { QTimer::singleShot(0, [this,accountID, callID, to] {
printf("EMIT ONNEWCALL\n"); LOG_DRING_SIGNAL3("newCallCreated",QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str()));
emit this->newCallCreated(QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str())); emit this->newCallCreated(QString(accountID.c_str()), QString(callID.c_str()), QString(to.c_str()));
}); });
}), }),
exportable_callback<CallSignal::RecordingStateChanged>( exportable_callback<CallSignal::RecordingStateChanged>(
[this] (const std::string &callID, bool recordingState) { [this] (const std::string &callID, bool recordingState) {
QTimer::singleShot(0, [this,callID, recordingState] { QTimer::singleShot(0, [this,callID, recordingState] {
LOG_DRING_SIGNAL2("recordingStateChanged",QString(callID.c_str()), recordingState);
emit this->recordingStateChanged(QString(callID.c_str()), recordingState); emit this->recordingStateChanged(QString(callID.c_str()), recordingState);
}); });
}), }),
exportable_callback<CallSignal::SecureSdesOn>( exportable_callback<CallSignal::SecureSdesOn>(
[this] (const std::string &callID) { [this] (const std::string &callID) {
QTimer::singleShot(0, [this,callID] { QTimer::singleShot(0, [this,callID] {
LOG_DRING_SIGNAL("secureSdesOn",QString(callID.c_str()));
emit this->secureSdesOn(QString(callID.c_str())); emit this->secureSdesOn(QString(callID.c_str()));
}); });
}), }),
exportable_callback<CallSignal::SecureSdesOff>( exportable_callback<CallSignal::SecureSdesOff>(
[this] (const std::string &callID) { [this] (const std::string &callID) {
QTimer::singleShot(0, [this,callID] { QTimer::singleShot(0, [this,callID] {
LOG_DRING_SIGNAL("secureSdesOff",QString(callID.c_str()));
emit this->secureSdesOff(QString(callID.c_str())); emit this->secureSdesOff(QString(callID.c_str()));
}); });
}), }),
exportable_callback<CallSignal::SecureZrtpOn>( exportable_callback<CallSignal::SecureZrtpOn>(
[this] (const std::string &callID, const std::string &cipher) { [this] (const std::string &callID, const std::string &cipher) {
QTimer::singleShot(0, [this,callID,cipher] { QTimer::singleShot(0, [this,callID,cipher] {
LOG_DRING_SIGNAL2("secureZrtpOn",QString(callID.c_str()), QString(cipher.c_str()));
emit this->secureZrtpOn(QString(callID.c_str()), QString(cipher.c_str())); emit this->secureZrtpOn(QString(callID.c_str()), QString(cipher.c_str()));
}); });
}), }),
...@@ -161,24 +177,28 @@ public: ...@@ -161,24 +177,28 @@ public:
exportable_callback<CallSignal::ShowSAS>( exportable_callback<CallSignal::ShowSAS>(
[this] (const std::string &callID, const std::string &sas, bool verified) { [this] (const std::string &callID, const std::string &sas, bool verified) {
QTimer::singleShot(0, [this,callID, sas, verified] { QTimer::singleShot(0, [this,callID, sas, verified] {
LOG_DRING_SIGNAL3("showSAS",QString(callID.c_str()), QString(sas.c_str()), verified);
emit this->showSAS(QString(callID.c_str()), QString(sas.c_str()), verified); emit this->showSAS(QString(callID.c_str()), QString(sas.c_str()), verified);
}); });
}), }),
exportable_callback<CallSignal::ZrtpNotSuppOther>( exportable_callback<CallSignal::ZrtpNotSuppOther>(
[this] (const std::string &callID) { [this] (const std::string &callID) {
QTimer::singleShot(0, [this,callID] { QTimer::singleShot(0, [this,callID] {
LOG_DRING_SIGNAL("zrtpNotSuppOther",QString(callID.c_str()));
emit this->zrtpNotSuppOther(QString(callID.c_str())); emit this->zrtpNotSuppOther(QString(callID.c_str()));
}); });
}), }),
exportable_callback<CallSignal::ZrtpNegotiationFailed>( exportable_callback<CallSignal::ZrtpNegotiationFailed>(
[this] (const std::string &callID, const std::string &reason, const std::string &severity) { [this] (const std::string &callID, const std::string &reason, const std::string &severity) {
QTimer::singleShot(0, [this,callID, reason, severity] { QTimer::singleShot(0, [this,callID, reason, severity] {
LOG_DRING_SIGNAL3("zrtpNegotiationFailed",QString(callID.c_str()), QString(reason.c_str()), QString(severity.c_str()));
emit this->zrtpNegotiationFailed(QString(callID.c_str()), QString(reason.c_str()), QString(severity.c_str())); emit this->zrtpNegotiationFailed(QString(callID.c_str()), QString(reason.c_str()), QString(severity.c_str()));
}); });
}), }),
exportable_callback<CallSignal::RtcpReportReceived>( exportable_callback<CallSignal::RtcpReportReceived>(
[this] (const std::string &callID, const std::map<std::string, int>& report) { [this] (const std::string &callID, const std::map<std::string, int>& report) {
QTimer::singleShot(0, [this,callID, report] { QTimer::singleShot(0, [this,callID, report] {
LOG_DRING_SIGNAL2("onRtcpReportReceived",QString(callID.c_str()), convertStringInt(report));
emit this->onRtcpReportReceived(QString(callID.c_str()), convertStringInt(report)); emit this->onRtcpReportReceived(QString(callID.c_str()), convertStringInt(report));
}); });
}) })
......
...@@ -26,6 +26,19 @@ ...@@ -26,6 +26,19 @@
#define Q_NOREPLY #define Q_NOREPLY
//Print all call to some signals
#ifdef VERBOSE_IPC
#define LOG_DRING_SIGNAL(name,arg) qDebug() << "\033[22;34m >>>>>> \033[0m" << name << arg;
#define LOG_DRING_SIGNAL2(name,arg,arg2) qDebug() << "\033[22;34m >>>>>> \033[0m" << name << arg << arg2;
#define LOG_DRING_SIGNAL3(name,arg,arg2,arg3) qDebug() << "\033[22;34m >>>>>> \033[0m" << name << arg << arg2 << arg3;
#define LOG_DRING_SIGNAL4(name,arg,arg2,arg3,arg4) qDebug() << "\033[22;34m >>>>>> \033[0m" << name << arg << arg2 << arg3 << arg4;
#else
#define LOG_DRING_SIGNAL(name,args) //Nothing
#define LOG_DRING_SIGNAL2(name,arg,arg2)
#define LOG_DRING_SIGNAL3(name,arg,arg2,arg3)
#define LOG_DRING_SIGNAL4(name,arg,arg2,arg3,arg4)
#endif
inline MapStringString convertMap(const std::map<std::string, std::string>& m) { inline MapStringString convertMap(const std::map<std::string, std::string>& m) {
MapStringString temp; MapStringString temp;
for (const auto& x : m) { for (const auto& x : m) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment