~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to daemon/src/audio/audiortp/zrtp_session_callback.cpp

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
 
2
 *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
3
3
 *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
4
4
 *
5
5
 *  This program is free software; you can redistribute it and/or modify
30
30
#include "zrtp_session_callback.h"
31
31
#include "logger.h"
32
32
#include "sip/sipcall.h"
33
 
#include "dbus/dbusmanager.h"
34
 
#include "dbus/callmanager.h"
 
33
#include "client/client.h"
 
34
#include "client/callmanager.h"
35
35
#include "manager.h"
36
36
 
37
37
#include <cstdlib>
104
104
ZrtpSessionCallback::secureOn(std::string cipher)
105
105
{
106
106
    DEBUG("Secure mode is on with cipher %s", cipher.c_str());
107
 
    Manager::instance().getDbusManager()->getCallManager()->secureZrtpOn(call_.getCallId(), cipher);
 
107
    Manager::instance().getClient()->getCallManager()->secureZrtpOn(call_.getCallId(), cipher);
108
108
}
109
109
 
110
110
void
111
111
ZrtpSessionCallback::secureOff()
112
112
{
113
113
    DEBUG("Secure mode is off");
114
 
    Manager::instance().getDbusManager()->getCallManager()->secureZrtpOff(call_.getCallId());
 
114
    Manager::instance().getClient()->getCallManager()->secureZrtpOff(call_.getCallId());
115
115
}
116
116
 
117
117
void
118
118
ZrtpSessionCallback::showSAS(std::string sas, bool verified)
119
119
{
120
120
    DEBUG("SAS is: %s", sas.c_str());
121
 
    Manager::instance().getDbusManager()->getCallManager()->showSAS(call_.getCallId(), sas, verified);
 
121
    Manager::instance().getClient()->getCallManager()->showSAS(call_.getCallId(), sas, verified);
122
122
}
123
123
 
124
124
void
125
125
ZrtpSessionCallback::zrtpNotSuppOther()
126
126
{
127
127
    DEBUG("Callee does not support ZRTP");
128
 
    Manager::instance().getDbusManager()->getCallManager()->zrtpNotSuppOther(call_.getCallId());
 
128
    Manager::instance().getClient()->getCallManager()->zrtpNotSuppOther(call_.getCallId());
129
129
}
130
130
 
131
131
void
151
151
            DEBUG("Sent error packet: ");
152
152
 
153
153
        std::map<int32, std::string>::const_iterator iter = zrtpMap_.find(subCode);
 
154
 
154
155
        if (iter != zrtpMap_.end()) {
155
156
            DEBUG("%s", iter->second.c_str());
156
 
            Manager::instance().getDbusManager()->getCallManager()->zrtpNegotiationFailed(call_.getCallId(), iter->second, "ZRTP");
 
157
            Manager::instance().getClient()->getCallManager()->zrtpNegotiationFailed(call_.getCallId(), iter->second, "ZRTP");
157
158
        }
158
159
    } else {
159
160
        std::map<int32, std::string>::const_iterator iter = severeMap_.find(subCode);
 
161
 
160
162
        if (iter != severeMap_.end()) {
161
163
            DEBUG("%s", iter->second.c_str());
162
 
            Manager::instance().getDbusManager()->getCallManager()->zrtpNegotiationFailed(call_.getCallId(), iter->second, "severe");
 
164
            Manager::instance().getClient()->getCallManager()->zrtpNegotiationFailed(call_.getCallId(), iter->second, "severe");
163
165
        }
164
166
    }
165
167
}
168
170
ZrtpSessionCallback::confirmGoClear()
169
171
{
170
172
    DEBUG("Received go clear message. Until confirmation, ZRTP won't send any data");
171
 
    Manager::instance().getDbusManager()->getCallManager()->zrtpNotSuppOther(call_.getCallId());
 
173
    Manager::instance().getClient()->getCallManager()->zrtpNotSuppOther(call_.getCallId());
172
174
}
173
175
 
174
176
std::map<int32, std::string> ZrtpSessionCallback::infoMap_;