Skip to content
Snippets Groups Projects
Commit aa60822a authored by Alexandre Savard's avatar Alexandre Savard
Browse files
parents 28e03cbc a77dfdf7
No related branches found
No related tags found
No related merge requests found
...@@ -114,7 +114,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca) ...@@ -114,7 +114,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
switch (_keyExchangeProtocol) { switch (_keyExchangeProtocol) {
case Zrtp: case Zrtp:
_rtpSession = new AudioZrtpSession (&Manager::instance(), ca, zidFilename); _rtpSession = new AudioZrtpSession (ca, zidFilename);
_rtpSessionType = Zrtp; _rtpSessionType = Zrtp;
if (_helloHashEnabled) { if (_helloHashEnabled) {
...@@ -128,7 +128,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca) ...@@ -128,7 +128,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
case Sdes: case Sdes:
_rtpSession = new AudioSrtpSession (&Manager::instance(), ca); _rtpSession = new AudioSrtpSession (ca);
_rtpSessionType = Sdes; _rtpSessionType = Sdes;
break; break;
...@@ -138,7 +138,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca) ...@@ -138,7 +138,7 @@ void AudioRtpFactory::initAudioRtpSession (SIPCall * ca)
} }
} else { } else {
_rtpSessionType = Symmetric; _rtpSessionType = Symmetric;
_rtpSession = new AudioSymmetricRtpSession (&Manager::instance(), ca); _rtpSession = new AudioSymmetricRtpSession (ca);
_debug ("AudioRtpFactory: Starting a symmetric unencrypted rtp session"); _debug ("AudioRtpFactory: Starting a symmetric unencrypted rtp session");
} }
} }
......
...@@ -36,16 +36,13 @@ ...@@ -36,16 +36,13 @@
#include "sip/sdp.h" #include "sip/sdp.h"
#include "audio/audiolayer.h" #include "audio/audiolayer.h"
#include "manager.h"
namespace sfl namespace sfl
{ {
AudioRtpSession::AudioRtpSession (ManagerImpl * manager, SIPCall * sipcall) : AudioRtpSession::AudioRtpSession (SIPCall * sipcall) :
AudioRtpRecordHandler (sipcall) AudioRtpRecordHandler (sipcall)
, ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()) , ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort())
, _mainloopSemaphore (0) , _mainloopSemaphore (0)
, _manager (manager)
, _timestamp (0) , _timestamp (0)
, _timestampIncrement (0) , _timestampIncrement (0)
, _timestampCount (0) , _timestampCount (0)
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
#include "sip/sipcall.h" #include "sip/sipcall.h"
#include "audio/codecs/audiocodec.h" #include "audio/codecs/audiocodec.h"
#include "managerimpl.h"
using std::ptrdiff_t; using std::ptrdiff_t;
#include <ccrtp/rtp.h> #include <ccrtp/rtp.h>
#include <ccrtp/iqueue.h> #include <ccrtp/iqueue.h>
...@@ -64,7 +62,7 @@ class AudioRtpSession : public ost::TimerPort, public AudioRtpRecordHandler, pub ...@@ -64,7 +62,7 @@ class AudioRtpSession : public ost::TimerPort, public AudioRtpRecordHandler, pub
* Constructor * Constructor
* @param sipcall The pointer on the SIP call * @param sipcall The pointer on the SIP call
*/ */
AudioRtpSession (ManagerImpl * manager, SIPCall* sipcall); AudioRtpSession (SIPCall* sipcall);
~AudioRtpSession(); ~AudioRtpSession();
...@@ -169,11 +167,6 @@ class AudioRtpSession : public ost::TimerPort, public AudioRtpRecordHandler, pub ...@@ -169,11 +167,6 @@ class AudioRtpSession : public ost::TimerPort, public AudioRtpRecordHandler, pub
// this destination and update a new one // this destination and update a new one
unsigned short _remote_port; unsigned short _remote_port;
/**
* Manager instance.
*/
ManagerImpl * _manager;
/** /**
* Timestamp for this session * Timestamp for this session
*/ */
......
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
namespace sfl namespace sfl
{ {
AudioSrtpSession::AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall) : AudioSrtpSession::AudioSrtpSession (SIPCall * sipcall) :
AudioRtpSession (manager, sipcall), AudioRtpSession (sipcall),
_remoteCryptoCtx (NULL), _remoteCryptoCtx (NULL),
_localCryptoCtx (NULL), _localCryptoCtx (NULL),
_localCryptoSuite (0), _localCryptoSuite (0),
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <vector> #include <vector>
class SdesNegotiator; class SdesNegotiator;
class ManagerImpl;
class SIPCall; class SIPCall;
/* /*
...@@ -81,7 +80,7 @@ class AudioSrtpSession : public AudioRtpSession ...@@ -81,7 +80,7 @@ class AudioSrtpSession : public AudioRtpSession
/** /**
* Constructor for this rtp session * Constructor for this rtp session
*/ */
AudioSrtpSession (ManagerImpl * manager, SIPCall * sipcall); AudioSrtpSession (SIPCall * sipcall);
~AudioSrtpSession(); ~AudioSrtpSession();
......
...@@ -35,14 +35,12 @@ using std::ptrdiff_t; ...@@ -35,14 +35,12 @@ using std::ptrdiff_t;
#include "AudioRtpSession.h" #include "AudioRtpSession.h"
class ManagerImpl;
namespace sfl namespace sfl
{ {
class AudioSymmetricRtpSession : public AudioRtpSession class AudioSymmetricRtpSession : public AudioRtpSession
{ {
public: public:
AudioSymmetricRtpSession (ManagerImpl * manager, SIPCall * sipcall) : AudioRtpSession (manager, sipcall) { AudioSymmetricRtpSession (SIPCall * sipcall) : AudioRtpSession (sipcall) {
} }
}; };
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
namespace sfl 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()), // ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpRecordHandler (sipcall), AudioRtpRecordHandler (sipcall),
ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue> (ost::InetHostAddress (sipcall->getLocalIp().c_str()), 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 ...@@ -59,7 +59,6 @@ AudioZrtpSession::AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, co
ost::defaultApplication()) ost::defaultApplication())
, _zidFilename (zidFilename) , _zidFilename (zidFilename)
, _mainloopSemaphore (0) , _mainloopSemaphore (0)
, _manager (manager)
, _timestamp (0) , _timestamp (0)
, _timestampIncrement (0) , _timestampIncrement (0)
, _timestampCount (0) , _timestampCount (0)
......
...@@ -41,7 +41,6 @@ using std::ptrdiff_t; ...@@ -41,7 +41,6 @@ using std::ptrdiff_t;
#include "AudioRtpRecordHandler.h" #include "AudioRtpRecordHandler.h"
#include <cc++/numbers.h> // OST::Time #include <cc++/numbers.h> // OST::Time
class ManagerImpl;
class SIPCall; class SIPCall;
namespace sfl namespace sfl
...@@ -58,7 +57,7 @@ class ZrtpZidException: public std::exception ...@@ -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> class AudioZrtpSession : protected ost::Thread, public AudioRtpRecordHandler, public ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue>
{ {
public: public:
AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, const std::string& zidFilename); AudioZrtpSession (SIPCall * sipcall, const std::string& zidFilename);
~AudioZrtpSession(); ~AudioZrtpSession();
...@@ -142,11 +141,6 @@ class AudioZrtpSession : protected ost::Thread, public AudioRtpRecordHandler, pu ...@@ -142,11 +141,6 @@ class AudioZrtpSession : protected ost::Thread, public AudioRtpRecordHandler, pu
// this destination and update a new one // this destination and update a new one
unsigned short _remote_port; unsigned short _remote_port;
/**
* Manager instance.
*/
ManagerImpl * _manager;
/** /**
* Timestamp for this session * Timestamp for this session
*/ */
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
*/ */
#include "sipcall.h" #include "sipcall.h"
#include "global.h" // for _debug #include "logger.h" // for _debug
#include "audio/audiortp/AudioRtpFactory.h" #include "audio/audiortp/AudioRtpFactory.h"
#include "sdp.h" #include "sdp.h"
......
...@@ -65,53 +65,11 @@ class SIPCall : public Call ...@@ -65,53 +65,11 @@ class SIPCall : public Call
* Destructor * Destructor
*/ */
~SIPCall (); ~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 * Get event subscription internal structure
* @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
*/ */
void setTid (int tid) { pjsip_evsub *getXferSub() {
_tid = tid; return _xferSub;
} }
/** /**
...@@ -121,13 +79,6 @@ class SIPCall : public Call ...@@ -121,13 +79,6 @@ class SIPCall : public Call
_xferSub = sub; _xferSub = sub;
} }
/**
* Get event subscription internal structure
*/
pjsip_evsub *getXferSub() {
return _xferSub;
}
void setInvSession (pjsip_inv_session* inv) { void setInvSession (pjsip_inv_session* inv) {
_invSession = inv; _invSession = inv;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment