Commit e27e5c39 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

Should fix many KDE issues

parent cac23d80
...@@ -195,6 +195,11 @@ bool ManagerImpl::outgoingCall (const std::string& account_id, ...@@ -195,6 +195,11 @@ bool ManagerImpl::outgoingCall (const std::string& account_id,
_debug ("Manager: New outgoing call abbort, missing callid"); _debug ("Manager: New outgoing call abbort, missing callid");
return false; return false;
} }
if (account_id.empty()) {
_debug ("Manager: New outgoing call abbort, missing account");
return false;
}
// Call ID must be unique // Call ID must be unique
if (not getAccountFromCall (call_id).empty()) { if (not getAccountFromCall (call_id).empty()) {
...@@ -254,7 +259,7 @@ bool ManagerImpl::outgoingCall (const std::string& account_id, ...@@ -254,7 +259,7 @@ bool ManagerImpl::outgoingCall (const std::string& account_id,
try { try {
Call *call = getAccountLink(account_id)->newOutgoingCall (call_id, to_cleaned); Call *call = getAccountLink(account_id)->newOutgoingCall (call_id, to_cleaned);
switchCall (call_id); switchCall (call_id);
call->setConfId(conf_id); call->setConfId(conf_id);
} catch (const VoipLinkException &e) { } catch (const VoipLinkException &e) {
......
...@@ -622,19 +622,20 @@ SIPVoIPLink::answer (Call *c) ...@@ -622,19 +622,20 @@ SIPVoIPLink::answer (Call *c)
_debug ("UserAgent: Answering call"); _debug ("UserAgent: Answering call");
SIPCall *call = dynamic_cast<SIPCall*>(c); SIPCall *call = dynamic_cast<SIPCall*>(c);
if (call != NULL) {
pjsip_inv_session *inv_session = call->inv;
pjsip_inv_session *inv_session = call->inv; _debug ("UserAgent: SDP negotiation success! : call %s ", call->getCallId().c_str());
// Create and send a 200(OK) response
_debug ("UserAgent: SDP negotiation success! : call %s ", call->getCallId().c_str()); if (pjsip_inv_answer (inv_session, PJSIP_SC_OK, NULL, NULL, &tdata) != PJ_SUCCESS)
// Create and send a 200(OK) response throw VoipLinkException("Could not init invite request answer (200 OK)");
if (pjsip_inv_answer (inv_session, PJSIP_SC_OK, NULL, NULL, &tdata) != PJ_SUCCESS)
throw VoipLinkException("Could not init invite request answer (200 OK)"); if (pjsip_inv_send_msg (inv_session, tdata) != PJ_SUCCESS)
throw VoipLinkException("Could not send invite request answer (200 OK)");
if (pjsip_inv_send_msg (inv_session, tdata) != PJ_SUCCESS)
throw VoipLinkException("Could not send invite request answer (200 OK)");
call->setConnectionState (Call::Connected); call->setConnectionState (Call::Connected);
call->setState (Call::Active); call->setState (Call::Active);
}
} }
void void
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
Codec::Codec(int payload, bool enabled) Codec::Codec(int payload, bool enabled)
{ {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList details = configurationManager.getCodecDetails(payload); QStringList details = configurationManager.getAudioCodecDetails(payload);
this->payload = QString::number(payload); this->payload = QString::number(payload);
this->enabled = enabled; this->enabled = enabled;
this->name = details[CODEC_NAME]; this->name = details[CODEC_NAME];
......
...@@ -83,9 +83,9 @@ bool SFLPhone::initialize() ...@@ -83,9 +83,9 @@ bool SFLPhone::initialize()
view->loadWindow(); view->loadWindow();
move(QCursor::pos().x() - geometry().width()/2, QCursor::pos().y() - geometry().height()/2); move(QCursor::pos().x() - geometry().width()/2, QCursor::pos().y() - geometry().height()/2);
if( ! configurationManager.isStartHidden()) { //if( ! configurationManager.isStartHidden()) {
show(); show();
} //}
if(configurationManager.getAccountList().value().isEmpty()) { if(configurationManager.getAccountList().value().isEmpty()) {
(new AccountWizard())->show(); (new AccountWizard())->show();
...@@ -146,8 +146,8 @@ void SFLPhone::setupActions() ...@@ -146,8 +146,8 @@ void SFLPhone::setupActions()
action_displayDialpad->setCheckable(true); action_displayDialpad->setCheckable(true);
action_displayVolumeControls->setCheckable(true); action_displayVolumeControls->setCheckable(true);
action_displayVolumeControls->setChecked(configurationManager.getVolumeControls()); action_displayVolumeControls->setChecked(/*configurationManager.getVolumeControls()*/true);
action_displayDialpad->setChecked(configurationManager.getDialpad()); action_displayDialpad->setChecked(/*configurationManager.getDialpad()*/true);
action_accountCreationWizard = new KAction(i18n("Account creation wizard"), this); action_accountCreationWizard = new KAction(i18n("Account creation wizard"), this);
connect(action_accept, SIGNAL(triggered()), view, SLOT(accept())); connect(action_accept, SIGNAL(triggered()), view, SLOT(accept()));
...@@ -347,9 +347,9 @@ void SFLPhone::on_view_incomingCall(const Call * call) ...@@ -347,9 +347,9 @@ void SFLPhone::on_view_incomingCall(const Call * call)
{ {
putForeground(); putForeground();
}*/ }*/
if(configurationManager.getNotify()) { //if(configurationManager.getNotify()) {
sendNotif(call->getPeerName().isEmpty() ? call->getPeerPhoneNumber() : call->getPeerName()); sendNotif(call->getPeerName().isEmpty() ? call->getPeerPhoneNumber() : call->getPeerName());
} //}
} }
void SFLPhone::on_view_addressBookEnableAsked(bool enabled) void SFLPhone::on_view_addressBookEnableAsked(bool enabled)
......
...@@ -163,7 +163,7 @@ SFLPhoneView::~SFLPhoneView() ...@@ -163,7 +163,7 @@ SFLPhoneView::~SFLPhoneView()
void SFLPhoneView::saveState() void SFLPhoneView::saveState()
{ {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
configurationManager.setHistory(callTreeModel.getHistoryMap()); configurationManager.setHistory(callTreeModel.getHistory());
} }
void SFLPhoneView::loadWindow() void SFLPhoneView::loadWindow()
...@@ -739,8 +739,8 @@ void SFLPhoneView::updateVolumeControls() ...@@ -739,8 +739,8 @@ void SFLPhoneView::updateVolumeControls()
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = 0; int display = 0;
if(configurationManager.getAudioManager() == ConfigurationSkeleton::EnumInterface::ALSA) { if(QString(configurationManager.getAudioManager()) == "alsa") {
display = configurationManager.getVolumeControls(); display = true;
((SFLPhone*)parent())->action_displayVolumeControls->setEnabled(true); ((SFLPhone*)parent())->action_displayVolumeControls->setEnabled(true);
} }
...@@ -763,7 +763,7 @@ void SFLPhoneView::updateVolumeControls() ...@@ -763,7 +763,7 @@ void SFLPhoneView::updateVolumeControls()
void SFLPhoneView::updateDialpad() void SFLPhoneView::updateDialpad()
{ {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = configurationManager.getDialpad(); int display = true;
qDebug() << "updateDialpad " << display; qDebug() << "updateDialpad " << display;
...@@ -795,17 +795,17 @@ void SFLPhoneView::updateStatusMessage() ...@@ -795,17 +795,17 @@ void SFLPhoneView::updateStatusMessage()
void SFLPhoneView::displayVolumeControls() void SFLPhoneView::displayVolumeControls()
{ {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = configurationManager.getVolumeControls(); int display = true;//configurationManager.getVolumeControls();
configurationManager.setVolumeControls(!display); //configurationManager.setVolumeControls(!display);
updateVolumeControls(); updateVolumeControls();
} }
void SFLPhoneView::displayDialpad() void SFLPhoneView::displayDialpad()
{ {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int display = configurationManager.getDialpad(); int display = true;// configurationManager.getDialpad();
configurationManager.setDialpad(!display); //configurationManager.setDialpad(!display);
updateDialpad(); updateDialpad();
} }
......
...@@ -61,20 +61,20 @@ void ConfigurationSkeleton::readConfig() ...@@ -61,20 +61,20 @@ void ConfigurationSkeleton::readConfig()
//////////////////////// ////////////////////////
//Call history settings //Call history settings
setEnableHistory(QVariant(configurationManager.getHistoryEnabled()).toBool()); //setEnableHistory(true);
setHistoryMax(configurationManager.getHistoryLimit()); setHistoryMax(1000);//configurationManager.getHistoryLimit());
//////////////////////// ////////////////////////
////Display settings//// ////Display settings////
//////////////////////// ////////////////////////
//Notification settings //Notification settings
setNotifOnCalls(configurationManager.getNotify()); setNotifOnCalls(true);
setNotifOnMessages(configurationManager.getMailNotify()); setNotifOnMessages(true);//configurationManager.getMailNotify());
//Window display settings //Window display settings
setDisplayOnStart(! configurationManager.isStartHidden()); setDisplayOnStart(true);
setDisplayOnCalls(configurationManager.popupMode()); setDisplayOnCalls(true);
///////////////////////// /////////////////////////
////Accounts settings//// ////Accounts settings////
...@@ -88,13 +88,13 @@ void ConfigurationSkeleton::readConfig() ...@@ -88,13 +88,13 @@ void ConfigurationSkeleton::readConfig()
////////////////////// //////////////////////
//Audio Interface settings //Audio Interface settings
int audioManager = configurationManager.getAudioManager(); QString audioManager = configurationManager.getAudioManager();
qDebug() << "audioManager = " << audioManager; qDebug() << "audioManager = " << audioManager;
setInterface(audioManager); //setInterface(audioManager); //TODO
//ringtones settings //ringtones settings
setEnableRingtones(configurationManager.isRingtoneEnabled()); setEnableRingtones(true);
QString ringtone = configurationManager.getRingtoneChoice(); QString ringtone = "";
if(ringtone.isEmpty()) { if(ringtone.isEmpty()) {
setRingtone(QString(SHARE_INSTALL_PREFIX) + "sflphone/ringtones/konga.ul"); setRingtone(QString(SHARE_INSTALL_PREFIX) + "sflphone/ringtones/konga.ul");
} }
...@@ -122,10 +122,10 @@ void ConfigurationSkeleton::readConfig() ...@@ -122,10 +122,10 @@ void ConfigurationSkeleton::readConfig()
setAlsaInputDevice(inputDevice); setAlsaInputDevice(inputDevice);
qDebug() << "outputDevice = " << devices[0]; //qDebug() << "outputDevice = " << devices[0];
int outputDevice = devices[0].toInt(& ok); //int outputDevice = devices[0].toInt(& ok);
if(!ok) qDebug() << "outputDevice is not a number"; //if(!ok) qDebug() << "outputDevice is not a number";
setAlsaOutputDevice(outputDevice); //setAlsaOutputDevice(outputDevice);
/////////////////////// ///////////////////////
////Record settings//// ////Record settings////
...@@ -173,7 +173,7 @@ void ConfigurationSkeleton::readConfig() ...@@ -173,7 +173,7 @@ void ConfigurationSkeleton::readConfig()
void ConfigurationSkeleton::writeConfig() void ConfigurationSkeleton::writeConfig()
{ {
qDebug() << "\nWriting config"; qDebug() << "\nWriting config";
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); /*ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
//////////////////////// ////////////////////////
...@@ -183,9 +183,9 @@ void ConfigurationSkeleton::writeConfig() ...@@ -183,9 +183,9 @@ void ConfigurationSkeleton::writeConfig()
qDebug() << "Writing General settings"; qDebug() << "Writing General settings";
//Call history settings //Call history settings
if(enableHistory() != QVariant(configurationManager.getHistoryEnabled()).toBool() ) { //if(enableHistory() != QVariant(configurationManager.getHistoryEnabled()).toBool() ) {
configurationManager.setHistoryEnabled(); //configurationManager.setHistoryEnabled();
} //}
configurationManager.setHistoryLimit(historyMax()); configurationManager.setHistoryLimit(historyMax());
...@@ -196,13 +196,13 @@ void ConfigurationSkeleton::writeConfig() ...@@ -196,13 +196,13 @@ void ConfigurationSkeleton::writeConfig()
qDebug() << "Writing Display settings"; qDebug() << "Writing Display settings";
//Notification settings //Notification settings
if(notifOnCalls() != configurationManager.getNotify()) configurationManager.setNotify(); //if(notifOnCalls() != configurationManager.getNotify()) configurationManager.setNotify();
if(notifOnMessages() != configurationManager.getMailNotify()) configurationManager.setMailNotify(); //if(notifOnMessages() != configurationManager.getMailNotify()) configurationManager.setMailNotify();
//Window display settings //Window display settings
//WARNING états inversés //WARNING états inversés
if(displayOnStart() == configurationManager.isStartHidden()) configurationManager.startHidden(); //if(displayOnStart() == configurationManager.isStartHidden()) configurationManager.startHidden();
if(displayOnCalls() != configurationManager.popupMode()) configurationManager.switchPopupMode(); //if(displayOnCalls() != configurationManager.popupMode()) configurationManager.switchPopupMode();
///////////////////////// /////////////////////////
////Accounts settings//// ////Accounts settings////
...@@ -283,7 +283,7 @@ void ConfigurationSkeleton::writeConfig() ...@@ -283,7 +283,7 @@ void ConfigurationSkeleton::writeConfig()
hooksSettings[HOOKS_COMMAND] = hooksCommand(); hooksSettings[HOOKS_COMMAND] = hooksCommand();
configurationManager.setHookSettings(hooksSettings); configurationManager.setHookSettings(hooksSettings);
qDebug() << "Finished to write config\n"; qDebug() << "Finished to write config\n";*/
readConfig(); readConfig();
} }
......
...@@ -262,7 +262,7 @@ void DlgAccounts::saveAccount(QListWidgetItem * item) ...@@ -262,7 +262,7 @@ void DlgAccounts::saveAccount(QListWidgetItem * item)
} }
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
configurationManager.setActiveCodecList(_codecList, account->getAccountDetail(ACCOUNT_ID)); configurationManager.setActiveAudioCodecList(_codecList, account->getAccountDetail(ACCOUNT_ID));
qDebug() << "Account codec have been saved" << _codecList << account->getAccountDetail(ACCOUNT_ID); qDebug() << "Account codec have been saved" << _codecList << account->getAccountDetail(ACCOUNT_ID);
saveCredential(account->getAccountDetail(ACCOUNT_ID)); saveCredential(account->getAccountDetail(ACCOUNT_ID));
...@@ -367,7 +367,7 @@ void DlgAccounts::loadAccount(QListWidgetItem * item) ...@@ -367,7 +367,7 @@ void DlgAccounts::loadAccount(QListWidgetItem * item)
keditlistbox_codec->clear(); keditlistbox_codec->clear();
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList activeCodecList = configurationManager.getActiveCodecList(account->getAccountDetail(ACCOUNT_ID)); QStringList activeCodecList = configurationManager.getActiveAudioCodecList(account->getAccountDetail(ACCOUNT_ID));
foreach (QString aCodec, activeCodecList) { foreach (QString aCodec, activeCodecList) {
foreach (StringHash _aCodec, codecList) { foreach (StringHash _aCodec, codecList) {
if (_aCodec["id"] == aCodec) if (_aCodec["id"] == aCodec)
...@@ -613,16 +613,16 @@ void DlgAccounts::updateWidgets() ...@@ -613,16 +613,16 @@ void DlgAccounts::updateWidgets()
void DlgAccounts::loadCodecList() void DlgAccounts::loadCodecList()
{ {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
QStringList codecIdList = configurationManager.getCodecList(); QStringList codecIdList = configurationManager.getAudioCodecList();
QStringList tmpNameList; QStringList tmpNameList;
foreach (QString aCodec, codecIdList) { foreach (QString aCodec, codecIdList) {
QStringList codec = configurationManager.getCodecDetails(aCodec.toInt()); QStringList codec = configurationManager.getAudioCodecDetails(aCodec.toInt());
QHash<QString, QString> _codec; QHash<QString, QString> _codec;
_codec["name"] = codec[0]; _codec["name"] = codec[0];
_codec["frequency"] = codec[1]; _codec["frequency"] = codec[1];
_codec["bitrate"] = codec[2]; _codec["bitrate"] = codec[2];
_codec["bandwidth"] = codec[3]; _codec["bandwidth"] = ""; //TODO remove
_codec["id"] = aCodec; _codec["id"] = aCodec;
tmpNameList << _codec["name"]; tmpNameList << _codec["name"];
...@@ -711,24 +711,30 @@ void DlgAccounts::updateCombo(int value) ...@@ -711,24 +711,30 @@ void DlgAccounts::updateCombo(int value)
} }
} }
void DlgAccounts::loadCredentails(QString accountId) { void DlgAccounts::loadCredentails(QString accountId) {
credentialInfo.clear(); credentialInfo.clear();
list_credential->clear(); list_credential->clear();
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
int credentialCount = configurationManager.getNumberOfCredential(accountId); VectorMapStringString credentials = configurationManager.getCredentials(accountId);
for (int i=0; i < credentialCount; i++) { for (int i=0; i < credentials.size(); i++) {
QMap<QString, QString> credentialData = configurationManager.getCredential(accountId,i); qDebug() << "Credential: " << credentials[i];
qDebug() << "Credential: " << credentialData;
QListWidgetItem* newItem = new QListWidgetItem(); QListWidgetItem* newItem = new QListWidgetItem();
newItem->setText(credentialData["username"]); newItem->setText(credentials[i]["username"]);
credentialInfo[newItem] = {newItem, credentialData["username"], credentialData["password"],credentialData["realm"]}; CredentialData data;
data.pointer = newItem;
data.name = credentials[i]["username"];
data.password =credentials[i]["password"] ;
data.realm = credentials[i]["realm"];
credentialInfo[newItem] = data;
list_credential->addItem(newItem); list_credential->addItem(newItem);
} }
} }
void DlgAccounts::saveCredential(QString accountId) { void DlgAccounts::saveCredential(QString accountId) {
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
configurationManager.setNumberOfCredential(accountId, list_credential->count()); //configurationManager.setNumberOfCredential(accountId, list_credential->count()); //TODO
VectorMapStringString toReturn;
for (int i=0; i < list_credential->count();i++) { for (int i=0; i < list_credential->count();i++) {
QListWidgetItem* currentItem = list_credential->item(i); QListWidgetItem* currentItem = list_credential->item(i);
...@@ -736,8 +742,9 @@ void DlgAccounts::saveCredential(QString accountId) { ...@@ -736,8 +742,9 @@ void DlgAccounts::saveCredential(QString accountId) {
credentialData["username"] = credentialInfo[currentItem].name; credentialData["username"] = credentialInfo[currentItem].name;
credentialData["password"] = credentialInfo[currentItem].password; credentialData["password"] = credentialInfo[currentItem].password;
credentialData["realm"] = credentialInfo[currentItem].realm; credentialData["realm"] = credentialInfo[currentItem].realm;
configurationManager.setCredential(accountId, i,credentialData); toReturn << credentialData;
} }
configurationManager.setCredentials(accountId,toReturn);
} }
void DlgAccounts::addCredential() { void DlgAccounts::addCredential() {
......
...@@ -97,10 +97,10 @@ void DlgAudio::loadAlsaSettings() ...@@ -97,10 +97,10 @@ void DlgAudio::loadAlsaSettings()
{ {
qDebug() << "DlgAudio::loadAlsaSettings"; qDebug() << "DlgAudio::loadAlsaSettings";
ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface & configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
if(configurationManager.getAudioManager() == ConfigurationSkeleton::EnumInterface::ALSA) { if(QString(configurationManager.getAudioManager()) == "alsa") {
ConfigurationSkeleton * skeleton = ConfigurationSkeleton::self(); ConfigurationSkeleton * skeleton = ConfigurationSkeleton::self();
QStringList pluginList = configurationManager.getOutputAudioPluginList(); QStringList pluginList = configurationManager.getAudioPluginList();
box_alsaPlugin->clear(); box_alsaPlugin->clear();
box_alsaPlugin->addItems(pluginList); box_alsaPlugin->addItems(pluginList);
int index = box_alsaPlugin->findText(skeleton->alsaPlugin()); int index = box_alsaPlugin->findText(skeleton->alsaPlugin());
......
...@@ -56,7 +56,7 @@ const QString account_state_name(QString & s) ...@@ -56,7 +56,7 @@ const QString account_state_name(QString & s)
Account::Account():accountId(NULL),accountDetails(NULL) Account::Account():accountId(NULL),accountDetails(NULL)
{ {
} }
#include <unistd.h>
Account* Account::buildExistingAccountFromId(QString _accountId) Account* Account::buildExistingAccountFromId(QString _accountId)
{ {
qDebug() << "Building an account from id: " << _accountId; qDebug() << "Building an account from id: " << _accountId;
......
...@@ -499,7 +499,7 @@ void Call::acceptTransf() ...@@ -499,7 +499,7 @@ void Call::acceptTransf()
CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance();
qDebug() << "Accepting call and transfering it to number : " << transferNumber << ". callId : " << callId; qDebug() << "Accepting call and transfering it to number : " << transferNumber << ". callId : " << callId;
callManager.accept(callId); callManager.accept(callId);
callManager.transfert(callId, transferNumber); callManager.transfer(callId, transferNumber);
// historyState = TRANSFERED; // historyState = TRANSFERED;
} }
...@@ -563,7 +563,7 @@ void Call::transfer() ...@@ -563,7 +563,7 @@ void Call::transfer()
{ {
CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance();
qDebug() << "Transfering call to number : " << transferNumber << ". callId : " << callId; qDebug() << "Transfering call to number : " << transferNumber << ". callId : " << callId;
callManager.transfert(callId, transferNumber); callManager.transfer(callId, transferNumber);
this->stopTime = new QDateTime(QDateTime::currentDateTime()); this->stopTime = new QDateTime(QDateTime::currentDateTime());
} }
...@@ -700,7 +700,7 @@ void Call::setConfId(QString value) { ...@@ -700,7 +700,7 @@ void Call::setConfId(QString value) {
QString Call::getCurrentCodecName() { QString Call::getCurrentCodecName() {
CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance(); CallManagerInterface & callManager = CallManagerInterfaceSingleton::getInstance();
return callManager.getCurrentCodecName(callId); return callManager.getCurrentAudioCodecName(callId);
} }
//This function could also be called mayBeSecure or haveChancesToBeEncryptedButWeCantTell. //This function could also be called mayBeSecure or haveChancesToBeEncryptedButWeCantTell.
......
...@@ -91,7 +91,7 @@ class LIB_EXPORT CallModel { ...@@ -91,7 +91,7 @@ class LIB_EXPORT CallModel {
void removeConference(Call* call); void removeConference(Call* call);
void removeCall(Call* call); void removeCall(Call* call);
MapStringString getHistoryMap(); QStringList getHistory();
//Account related members //Account related members
static Account* getCurrentAccount(); static Account* getCurrentAccount();
......
...@@ -72,21 +72,21 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>:: ...@@ -72,21 +72,21 @@ template<typename CallWidget, typename Index> bool CallModel<CallWidget,Index>::
{ {
if (!historyInit) { if (!historyInit) {
ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance(); ConfigurationManagerInterface& configurationManager = ConfigurationManagerInterfaceSingleton::getInstance();
MapStringString historyMap = configurationManager.getHistory().value(); QStringList historyMap = configurationManager.getHistory().value();
qDebug() << "Call History = " << historyMap; qDebug() << "Call History = " << historyMap;
QMapIterator<QString, QString> i(historyMap); // QMapIterator<QString, QString> i(historyMap);
while (i.hasNext()) { // while (i.hasNext()) {
i.next(); // i.next();
uint startTimeStamp = i.key().toUInt(); // uint startTimeStamp = i.key().toUInt();
QStringList param = i.value().split("|"); // QStringList param = i.value().split("|");
QString type2 = param[0]; // QString type2 = param[0];
QString number = param[1]; // QString number = param[1];
QString name = param[2]; // QString name = param[2];
uint stopTimeStamp = param[3].toUInt(); // uint stopTimeStamp = param[3].toUInt();
QString account = param[4]; // QString account = param[4];
historyCalls[QString::number(startTimeStamp)] = Call::buildHistoryCall(generateCallId(), startTimeStamp, stopTimeStamp, account, name, number, type2); // historyCalls[QString::number(startTimeStamp)] = Call::buildHistoryCall(generateCallId(), startTimeStamp, stopTimeStamp, account, name, number, type2);
addCall(historyCalls[QString::number(startTimeStamp)]); // addCall(historyCalls[QString::number(startTimeStamp)]);
}