Commit aa60822a authored by Alexandre Savard's avatar Alexandre Savard
parents 28e03cbc a77dfdf7
......@@ -114,7 +114,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
switch (_keyExchangeProtocol) {
case Zrtp:
_rtpSession = new AudioZrtpSession (&Manager::instance(), ca, zidFilename);
_rtpSession = new AudioZrtpSession (ca, zidFilename);
_rtpSessionType = Zrtp;
if (_helloHashEnabled) {
......@@ -128,7 +128,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
case Sdes:
_rtpSession = new AudioSrtpSession (&Manager::instance(), ca);
_rtpSession = new AudioSrtpSession (ca);
_rtpSessionType = Sdes;
break;
......@@ -138,7 +138,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
}
} else {
_rtpSessionType = Symmetric;
_rtpSession = new AudioSymmetricRtpSession (&Manager::instance(), ca);
_rtpSession = new AudioSymmetricRtpSession (ca);
_debug ("AudioRtpFactory: Starting a symmetric unencrypted rtp session");
}
}
......
......@@ -36,16 +36,13 @@
#include "sip/sdp.h"
#include "audio/audiolayer.h"
#include "manager.h"
namespace sfl
{
AudioRtpSession::AudioRtpSession (ManagerImpl * manager, SIPCall * sipcall) :
AudioRtpSession::AudioRtpSession (SIPCall * sipcall) :
AudioRtpRecordHandler (sipcall)
, ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort())
, _mainloopSemaphore (0)
, _manager (manager)
, _timestamp (0)
, _timestampIncrement (0)
, _timestampCount (0)
......
......@@ -45,8 +45,6 @@
#include "sip/sipcall.h"
#include "audio/codecs/audiocodec.h"
#include "managerimpl.h"
using std::ptrdiff_t;
#include <ccrtp/rtp.h>
#include <ccrtp/iqueue.h>
......@@ -64,7 +62,7 @@ class AudioRtpSession : public ost::TimerPort, public AudioRtpRecordHandler, pub
* Constructor
* @param sipcall The pointer on the SIP call
*/
AudioRtpSession (ManagerImpl * manager, SIPCall* sipcall);
AudioRtpSession (SIPCall* sipcall);
~AudioRtpSession();
......@@ -169,11 +167,6 @@ class AudioRtpSession : public ost::TimerPort, public AudioRtpRecordHandler, pub
// this destination and update a new one
unsigned short _remote_port;
/**
* Manager instance.
*/
ManagerImpl * _manager;
/**
* Timestamp for this session
*/
......
......@@ -49,8 +49,8 @@
namespace sfl
{
AudioSrtpSession::AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall) :
AudioRtpSession (manager, sipcall),
AudioSrtpSession::AudioSrtpSession (SIPCall * sipcall) :
AudioRtpSession (sipcall),
_remoteCryptoCtx (NULL),
_localCryptoCtx (NULL),
_localCryptoSuite (0),
......
......@@ -37,7 +37,6 @@
#include <vector>
class SdesNegotiator;
class ManagerImpl;
class SIPCall;
/*
......@@ -81,7 +80,7 @@ class AudioSrtpSession : public AudioRtpSession
/**
* Constructor for this rtp session
*/
AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall);
AudioSrtpSession (SIPCall * sipcall);
~AudioSrtpSession();
......
......@@ -35,14 +35,12 @@ using std::ptrdiff_t;
#include "AudioRtpSession.h"
class ManagerImpl;
namespace sfl
{
class AudioSymmetricRtpSession : public AudioRtpSession
{
public:
AudioSymmetricRtpSession (ManagerImpl * manager, SIPCall * sipcall) : AudioRtpSession (manager, sipcall) {
AudioSymmetricRtpSession (SIPCall * sipcall) : AudioRtpSession (sipcall) {
}
};
......
......@@ -49,7 +49,7 @@
namespace sfl
{
AudioZrtpSession::AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, const std::string& zidFilename) :
AudioZrtpSession::AudioZrtpSession (SIPCall * sipcall, const std::string& zidFilename) :
// ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpRecordHandler (sipcall),
ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue> (ost::InetHostAddress (sipcall->getLocalIp().c_str()),
......@@ -59,7 +59,6 @@ AudioZrtpSession::AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, co
ost::defaultApplication())
, _zidFilename (zidFilename)
, _mainloopSemaphore (0)
, _manager (manager)
, _timestamp (0)
, _timestampIncrement (0)
, _timestampCount (0)
......
......@@ -41,7 +41,6 @@ using std::ptrdiff_t;
#include "AudioRtpRecordHandler.h"
#include <cc++/numbers.h> // OST::Time
class ManagerImpl;
class SIPCall;
namespace sfl
......@@ -58,7 +57,7 @@ class ZrtpZidException: public std::exception
class AudioZrtpSession : protected ost::Thread, public AudioRtpRecordHandler, public ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue>
{
public:
AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, const std::string& zidFilename);
AudioZrtpSession (SIPCall * sipcall, const std::string& zidFilename);
~AudioZrtpSession();
......@@ -142,11 +141,6 @@ class AudioZrtpSession : protected ost::Thread, public AudioRtpRecordHandler, pu
// this destination and update a new one
unsigned short _remote_port;
/**
* Manager instance.
*/
ManagerImpl * _manager;
/**
* Timestamp for this session
*/
......
......@@ -32,7 +32,7 @@
*/
#include "sipcall.h"
#include "global.h" // for _debug
#include "logger.h" // for _debug
#include "audio/audiortp/AudioRtpFactory.h"
#include "sdp.h"
......
......@@ -65,53 +65,11 @@ class SIPCall : public Call
* Destructor
*/
~SIPCall ();
/**
* Call Identifier
* @return int SIP call id
*/
int getCid () const {
return _cid;
}
/**
* Call Identifier
* @param cid SIP call id
*/
void setCid (int cid) {
_cid = cid;
}
/**
* Domain identifier
* @return int SIP domain id
*/
int getDid() const {
return _did;
}
/**
* Domain identifier
* @param did SIP domain id
*/
void setDid (int did) {
_did = did;
}
/**
* Transaction identifier
* @return int SIP transaction id
*/
int getTid () const {
return _tid;
}
/**
* Transaction identifier
* @param tid SIP transaction id
* Get event subscription internal structure
*/
void setTid (int tid) {
_tid = tid;
pjsip_evsub *getXferSub() {
return _xferSub;
}
/**
......@@ -121,13 +79,6 @@ class SIPCall : public Call
_xferSub = sub;
}
/**
* Get event subscription internal structure
*/
pjsip_evsub *getXferSub() {
return _xferSub;
}
void setInvSession (pjsip_inv_session* inv) {
_invSession = inv;
}
......@@ -137,7 +88,7 @@ class SIPCall : public Call
}
void replaceInvSession (pjsip_inv_session *inv) {
_invSession = inv;
_invSession = inv;
}
/**
......@@ -165,7 +116,7 @@ class SIPCall : public Call
* Return the local memory pool for this call
*/
pj_pool_t *getMemoryPool(void) {
return _pool;
return _pool;
}
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment