diff --git a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp index 6499f07064894e67a8dd573128510630faaae2c2..1e14cb20c5c4dd9561d14a331e8ed7c046111b13 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp +++ b/sflphone-common/src/audio/audiortp/AudioRtpFactory.cpp @@ -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"); } } diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp index a103f10f7ee9d0580feaf9e82d25634baf781371..4e7179da3114e815c594ff36768086682b8658d0 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp @@ -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) diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.h b/sflphone-common/src/audio/audiortp/AudioRtpSession.h index 5c238783e3812fad36abe32dd4a629e086b7e3b8..4acd2c77a6bed5089b352ecb8995edd20b2a188c 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpSession.h +++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.h @@ -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 */ diff --git a/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp index d14f0efdfa1bee6f9c21be7bcf27c8d322b10fca..fc9d0a83ad32e1e8f7cb5fc021a49a32dbf38710 100644 --- a/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp @@ -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), diff --git a/sflphone-common/src/audio/audiortp/AudioSrtpSession.h b/sflphone-common/src/audio/audiortp/AudioSrtpSession.h index f236dec7d0eead3bb299713908982c1b7f76f040..eaa333215a5c96e29ea6bf60052a811b0f26a0a7 100644 --- a/sflphone-common/src/audio/audiortp/AudioSrtpSession.h +++ b/sflphone-common/src/audio/audiortp/AudioSrtpSession.h @@ -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(); diff --git a/sflphone-common/src/audio/audiortp/AudioSymmetricRtpSession.h b/sflphone-common/src/audio/audiortp/AudioSymmetricRtpSession.h index 3fcbb7a3a5e428d1f2533bdc596339a60049e872..a03b77d27389152ee240c8d14dfff9fae91ab080 100644 --- a/sflphone-common/src/audio/audiortp/AudioSymmetricRtpSession.h +++ b/sflphone-common/src/audio/audiortp/AudioSymmetricRtpSession.h @@ -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) { } }; diff --git a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp index 49a40c1dbf6389631492a45500300b9a77f6b734..26f31bf04998c9cd7bd524176f4e142969047966 100644 --- a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp @@ -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) diff --git a/sflphone-common/src/audio/audiortp/AudioZrtpSession.h b/sflphone-common/src/audio/audiortp/AudioZrtpSession.h index f19d7f10639c25c53f405f222513d635051614b4..9d33c2065bd9218721600f36be53834b6c9ad528 100644 --- a/sflphone-common/src/audio/audiortp/AudioZrtpSession.h +++ b/sflphone-common/src/audio/audiortp/AudioZrtpSession.h @@ -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 */ diff --git a/sflphone-common/src/sip/sipcall.cpp b/sflphone-common/src/sip/sipcall.cpp index e8fa530748354d8fec5be99db4f79c6e10c6b4c3..477c84be2e91a4e172e54ea5954c7ddd5c49247c 100644 --- a/sflphone-common/src/sip/sipcall.cpp +++ b/sflphone-common/src/sip/sipcall.cpp @@ -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" diff --git a/sflphone-common/src/sip/sipcall.h b/sflphone-common/src/sip/sipcall.h index 63141c6ed6f4a78c1c17845cb8579a6d520a2bd3..649ec9570330f8f70e7f04415d4577667e2dbd8f 100644 --- a/sflphone-common/src/sip/sipcall.h +++ b/sflphone-common/src/sip/sipcall.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: