[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "retry_deux" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Mar 2 13:05:08 CST 2012


branch "retry_deux" has been created
        at  eaaac8e52da2bcd1092422d0b2a51b9866f550eb (commit)

- Log -----------------------------------------------------------------
commit eaaac8e52da2bcd1092422d0b2a51b9866f550eb
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Mar 2 15:34:05 2012 -0330

    Build fixes for windows and slice updates

diff --git a/slice/AsteriskSCF/Replication/MediaRTPPJMEDIA/RTPStateReplicationIf.ice b/slice/AsteriskSCF/Replication/MediaRTPPJMEDIA/RTPStateReplicationIf.ice
index 1bdd788..4d7099f 100644
--- a/slice/AsteriskSCF/Replication/MediaRTPPJMEDIA/RTPStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/MediaRTPPJMEDIA/RTPStateReplicationIf.ice
@@ -23,6 +23,7 @@
 #include <AsteriskSCF/Media/RTP/MediaRTPIf.ice>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice>
 #include <AsteriskSCF/System/Component/ConfigurationIf.ice>
+#include <AsteriskSCF/System/OperationsIf.ice>
 
 module AsteriskSCF
 {
@@ -53,16 +54,16 @@ module V1
 
     interface RTPStateReplicatorListener
     {
-	void stateRemoved(Ice::StringSeq itemKeys);
-	void stateSet(RTPStateItemSeq items);
+	void stateRemoved(AsteriskSCF::System::V1::OperationContext operationContext, Ice::StringSeq itemKeys);
+	void stateSet(AsteriskSCF::System::V1::OperationContext operationContext, RTPStateItemSeq items);
     };
 
     interface RTPStateReplicator
     {
-	void addListener(RTPStateReplicatorListener *listener);
-	void removeListener(RTPStateReplicatorListener *listener);
-	void setState (RTPStateItemSeq items);
-	void removeState(Ice::StringSeq items);
+	void addListener(AsteriskSCF::System::V1::OperationContext operationContext, RTPStateReplicatorListener *listener);
+	void removeListener(AsteriskSCF::System::V1::OperationContext operationContext, RTPStateReplicatorListener *listener);
+	void setState (AsteriskSCF::System::V1::OperationContext operationContext, RTPStateItemSeq items);
+	void removeState(AsteriskSCF::System::V1::OperationContext operationContext, Ice::StringSeq items);
 	idempotent RTPStateItemSeq getState(Ice::StringSeq itemKeys);
 	idempotent RTPStateItemSeq getAllState();
     };
diff --git a/src/Component.cpp b/src/Component.cpp
index 7182c0b..673af44 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -22,7 +22,7 @@
 #include <IceUtil/UUID.h>
 
 #include <boost/shared_ptr.hpp>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Media/MediaIf.h>
@@ -238,12 +238,12 @@ private:
 
 void Component::onSuspend()
 {
-    mGeneralState->serviceManagement->suspend();
+    mGeneralState->serviceManagement->suspend(AsteriskSCF::Operations::createContext());
 }
 
 void Component::onResume()
 {
-    mGeneralState->serviceManagement->unsuspend();
+    mGeneralState->serviceManagement->unsuspend(AsteriskSCF::Operations::createContext());
 }
 
 /**
@@ -359,7 +359,7 @@ void Component::createPrimaryServices()
 
         if (rtpReplicationContext->isActive() == true)
         {
-            getServiceLocatorManagement()->addCompare(getName() + ".RTP.Comparator", mRTPMediaComparatorServicePrx);
+            getServiceLocatorManagement()->addCompare(AsteriskSCF::Operations::createContext(), getName() + ".RTP.Comparator", mRTPMediaComparatorServicePrx);
         }
 
     }
@@ -416,7 +416,7 @@ void Component::findRemoteServices()
         // replicator service.
         ConfigurationReplicatorPrx configurationReplicator = ConfigurationReplicatorPrx::checkedCast(
             rtpReplicationContext->getReplicator().initialize(), ReplicatorFacet);
-        configurationReplicator->registerConfigurationService(mConfigurationServicePrx);
+        configurationReplicator->registerConfigurationService(AsteriskSCF::Operations::createContext(), mConfigurationServicePrx);
 
     }
     catch (const std::exception& e)
@@ -469,7 +469,7 @@ void Component::listenToStateReplicators()
         // Are we in standby mode?
         if (rtpReplicationContext->getState() == STANDBY_IN_REPLICA_GROUP)
         {
-            rtpReplicationContext->getReplicator()->addListener(mReplicatorListenerProxy);
+            rtpReplicationContext->getReplicator()->addListener(AsteriskSCF::Operations::createContext(), mReplicatorListenerProxy);
             mListeningToReplicator = true;
         }
     }
@@ -497,7 +497,7 @@ void Component::stopListeningToStateReplicators()
 
     try
     {
-        rtpReplicationContext->getReplicator()->removeListener(mReplicatorListenerProxy);
+        rtpReplicationContext->getReplicator()->removeListener(AsteriskSCF::Operations::createContext(), mReplicatorListenerProxy);
         mListeningToReplicator = false;
     }
     catch (const Ice::Exception& e)
@@ -535,7 +535,7 @@ void Component::onRegisterPrimaryServices()
     }
 
     mGeneralState->serviceManagement = mRTPMediaServiceRegistration->getServiceManagement();
-    mGeneralState->serviceManagement->addLocatorParams(AsteriskSCF::createContext(),
+    mGeneralState->serviceManagement->addLocatorParams(AsteriskSCF::Operations::createContext(),
         mRTPOverIceLocatorParams, getName() + ".RTP.Comparator");
 }
 
@@ -549,7 +549,7 @@ void Component::onStart()
         RTPStateItemSeq items;
         items.push_back(mGeneralState);
         RTPStateReplicatorPrx oneway = RTPStateReplicatorPrx::uncheckedCast(rtpReplicationContext->getReplicator()->ice_oneway());
-        oneway->setState(items);
+        oneway->setState(AsteriskSCF::Operations::createContext(), items);
     }
 }
 
@@ -557,10 +557,10 @@ void Component::onStop()
 {
     if (getReplicationContext()->isActive() == true)
     {
-       mGeneralState->serviceManagement->unregister();
+       mGeneralState->serviceManagement->unregister(AsteriskSCF::Operations::createContext());
     }
 
-    getServiceLocatorManagement()->removeCompare(getName() + ".RTP.Comparator");
+    getServiceLocatorManagement()->removeCompare(AsteriskSCF::Operations::createContext(), getName() + ".RTP.Comparator");
 }
 
 extern "C"
diff --git a/src/ICETransport.cpp b/src/ICETransport.cpp
old mode 100644
new mode 100755
index 994b1ad..9553281
--- a/src/ICETransport.cpp
+++ b/src/ICETransport.cpp
@@ -85,8 +85,9 @@ public:
     }
 
     void negotiate_async(const AMD_InteractiveConnectionAgent_negotiatePtr& callback,
-        const string& hostname, Ice::Int port, const CandidateSeq& candidates,
-        const Ice::Current&)
+            const AsteriskSCF::System::V1::OperationContextPtr&,
+            const string& hostname, Ice::Int port, const CandidateSeq& candidates,
+            const Ice::Current&)
     {
 
         boost::unique_lock<boost::shared_mutex> lock(mLock);
diff --git a/src/RTPSession.cpp b/src/RTPSession.cpp
old mode 100644
new mode 100755
index 190658e..9d5f5ce
--- a/src/RTPSession.cpp
+++ b/src/RTPSession.cpp
@@ -36,6 +36,7 @@
 #include <AsteriskSCF/Media/RTP/MediaRTCPIf.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
 #include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 using namespace std;
 using namespace AsteriskSCF::Core::Discovery::V1;
@@ -88,13 +89,13 @@ public:
         return statistics;
     }
 
-    void addListener(const RTCP::V1::InformationListenerPrx& listener, const Ice::Current&)
+    void addListener(const AsteriskSCF::System::V1::OperationContextPtr&, const RTCP::V1::InformationListenerPrx& listener, const Ice::Current&)
     {
 	boost::unique_lock<boost::shared_mutex> lock(mLock);
         mListeners.push_back(listener);
     }
 
-    void removeListener(const RTCP::V1::InformationListenerPrx& listener, const Ice::Current&)
+    void removeListener(const AsteriskSCF::System::V1::OperationContextPtr&, const RTCP::V1::InformationListenerPrx& listener, const Ice::Current&)
     {
 	boost::unique_lock<boost::shared_mutex> lock(mLock);
         mListeners.erase(std::remove(mListeners.begin(), mListeners.end(), listener), mListeners.end());
@@ -168,13 +169,16 @@ public:
     AsteriskSCF::Media::V1::StreamSinkSeq getSinks(const Ice::Current&);
     std::string getId(const Ice::Current&);
     void setCookies(const AsteriskSCF::Media::V1::SessionCookieDict& cookies);
-    void setCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies, 
-                    const Ice::Current&);
+    void setCookies(const AsteriskSCF::System::V1::OperationContextPtr&, 
+            const AsteriskSCF::Media::V1::SessionCookies& cookies, 
+            const Ice::Current&);
     void getCookies_async(const AsteriskSCF::Media::V1::AMD_Session_getCookiesPtr &cb, 
                           const AsteriskSCF::Media::V1::SessionCookies& cookiesToGet, 
                           const Ice::Current&);
-    void removeCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies, 
-                const Ice::Current&);
+    void removeCookies(
+            const AsteriskSCF::System::V1::OperationContextPtr&,
+            const AsteriskSCF::Media::V1::SessionCookies& cookies, 
+            const Ice::Current&);
 
     void useRTCP(bool, const Ice::Current&);
     void release(const Ice::Current&);
@@ -606,8 +610,10 @@ void RTPSessionImpl::setCookies(const AsteriskSCF::Media::V1::SessionCookieDict&
 /** 
  * Support for the corresponding API call. 
  */
-void RTPSessionImpl::setCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies, 
-                const Ice::Current&)
+void RTPSessionImpl::setCookies(
+        const AsteriskSCF::System::V1::OperationContextPtr&,
+        const AsteriskSCF::Media::V1::SessionCookies& cookies, 
+        const Ice::Current&)
 {
     { // scope the lock
         boost::unique_lock<boost::shared_mutex> lock(mLock);
@@ -655,8 +661,10 @@ void RTPSessionImpl::getCookies_async(
 /** 
  * Implementation of the corresponding API call. 
  */
-void RTPSessionImpl::removeCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies, 
-                const Ice::Current&)
+void RTPSessionImpl::removeCookies(
+        const AsteriskSCF::System::V1::OperationContextPtr&,
+        const AsteriskSCF::Media::V1::SessionCookies& cookies, 
+        const Ice::Current&)
 {
     { // scope the lock
         boost::unique_lock<boost::shared_mutex> lock(mLock);
@@ -927,7 +935,7 @@ void RTPSessionImpl::replicateState(
         return;
     }
 
-    mReplicationContext->getReplicator().tryOneWay()->setState(items);
+    mReplicationContext->getReplicator().tryOneWay()->setState(AsteriskSCF::Operations::createContext(), items);
 }
 
 /**
@@ -964,7 +972,7 @@ void RTPSessionImpl::removeState(const RTPSessionStateItemPtr& session, const RT
         return;
     }
 
-    mReplicationContext->getReplicator().tryOneWay()->removeState(items);
+    mReplicationContext->getReplicator().tryOneWay()->removeState(AsteriskSCF::Operations::createContext(), items);
 }
 
 void RTPSessionImpl::associatePayloadsImpl(const AsteriskSCF::Media::RTP::V1::PayloadMap& mappings)
diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
old mode 100644
new mode 100755
index 9ea743c..8347a86
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -212,7 +212,9 @@ void StreamSinkRTPImpl::write(const AsteriskSCF::Media::V1::FrameSeq& frames, co
 /**
  * Implementation of the setSource method as defined in MediaIf.ice
  */
-void StreamSinkRTPImpl::setSource(const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
+void StreamSinkRTPImpl::setSource(
+    const AsteriskSCF::System::V1::OperationContextPtr&, 
+    const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
 {
     mImpl->mSinkStateItem->source = source;
 
@@ -247,7 +249,8 @@ std::string StreamSinkRTPImpl::getId(const Ice::Current&)
 /**
  * Implementation of the setRemoteDetails method as defined in MediaRTPIf.ice
  */
-void StreamSinkRTPImpl::setRemoteDetails(const string& address, Ice::Int port, const Ice::Current&)
+void StreamSinkRTPImpl::setRemoteDetails(const AsteriskSCF::System::V1::OperationContextPtr&, 
+    const string& address, Ice::Int port, const Ice::Current&)
 {
     /* This method is essentially a passthru to the RTPSourceImpl. It takes care of
      * actually attaching the transport.
diff --git a/src/RTPSink.h b/src/RTPSink.h
index f11fc8c..51ad583 100644
--- a/src/RTPSink.h
+++ b/src/RTPSink.h
@@ -34,11 +34,13 @@ public:
      * AsteriskSCF::Media::RTP::V1::StreamSinkRTP implementation.
      */
     void write(const AsteriskSCF::Media::V1::FrameSeq&, const Ice::Current&);
-    void setSource(const AsteriskSCF::Media::V1::StreamSourcePrx&, const Ice::Current&);
+    void setSource(const AsteriskSCF::System::V1::OperationContextPtr&,
+        const AsteriskSCF::Media::V1::StreamSourcePrx&, const Ice::Current&);
     AsteriskSCF::Media::V1::StreamSourcePrx getSource(const Ice::Current&);
     AsteriskSCF::Media::V1::FormatSeq getFormats(const Ice::Current&);
     std::string getId(const Ice::Current&);
-    void setRemoteDetails(const std::string&, Ice::Int, const Ice::Current&);
+    void setRemoteDetails(const AsteriskSCF::System::V1::OperationContextPtr&,
+        const std::string&, Ice::Int, const Ice::Current&);
     std::string getRemoteAddress(const Ice::Current&);
     Ice::Int getRemotePort(const Ice::Current&);
 
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index 26ece57..20a00d0 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -42,7 +42,7 @@
 #include <AsteriskSCF/Media/Formats/OtherFormatsIf.h>
 #include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 using namespace std;
 using namespace AsteriskSCF::Core::Discovery::V1;
@@ -124,7 +124,7 @@ public:
              listener != listeners.end();
              ++listener)
         {
-            (*listener)->sinkStatisticsUpdated(AsteriskSCF::createContext(), mSink, statistics);
+            (*listener)->sinkStatisticsUpdated(AsteriskSCF::Operations::createContext(), mSink, statistics);
         }
     }
 
@@ -280,7 +280,7 @@ RTPTelephonyEventSourcePtr StreamSourceRTPImpl::getTelephonyEventSource()
 /**
  * Implementation of the addSink method as defined in MediaIf.ice
  */
-void StreamSourceRTPImpl::addSink(const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
+void StreamSourceRTPImpl::addSink(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
@@ -301,7 +301,8 @@ void StreamSourceRTPImpl::addSink(const AsteriskSCF::Media::V1::StreamSinkPrx& s
 /**
  * Implementation of the removeSink method as defined in MediaIf.ice
  */
-void StreamSourceRTPImpl::removeSink(const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
+void StreamSourceRTPImpl::removeSink(const AsteriskSCF::System::V1::OperationContextPtr&,
+    const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
@@ -423,7 +424,7 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
              listener != listeners.end();
              ++listener)
         {
-            (*listener)->sourceSsrcChanged(AsteriskSCF::createContext(), source->mImpl->mSource, source->mImpl->mIncomingSession.peer_ssrc);
+            (*listener)->sourceSsrcChanged(AsteriskSCF::Operations::createContext(), source->mImpl->mSource, source->mImpl->mIncomingSession.peer_ssrc);
         }
     }
 
@@ -534,7 +535,7 @@ static void receiveRTCP(void *userdata, void *packet, pj_ssize_t size)
          listener != listeners.end();
          ++listener)
     {
-        (*listener)->sourceStatisticsUpdated(AsteriskSCF::createContext(), source->mImpl->mSource, statistics);
+        (*listener)->sourceStatisticsUpdated(AsteriskSCF::Operations::createContext(), source->mImpl->mSource, statistics);
     }
 }
 
diff --git a/src/RTPSource.h b/src/RTPSource.h
index d69c4d7..b07f744 100644
--- a/src/RTPSource.h
+++ b/src/RTPSource.h
@@ -31,8 +31,8 @@ public:
                         const AsteriskSCF::Media::RTP::V1::StreamSourceRTPPrx& source,
                         const AsteriskSCF::Media::RTP::V1::StreamSinkRTPPrx& sink);
 
-    void addSink(const AsteriskSCF::Media::V1::StreamSinkPrx&, const Ice::Current&);
-    void removeSink(const AsteriskSCF::Media::V1::StreamSinkPrx&, const Ice::Current&);
+    void addSink(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSinkPrx&, const Ice::Current&);
+    void removeSink(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSinkPrx&, const Ice::Current&);
     AsteriskSCF::Media::V1::StreamSinkSeq getSinks(const Ice::Current&);
     AsteriskSCF::Media::V1::FormatSeq getFormats(const Ice::Current&);
     std::string getId(const Ice::Current&);
diff --git a/src/RTPStateReplicator.h b/src/RTPStateReplicator.h
index c325d52..63312c9 100644
--- a/src/RTPStateReplicator.h
+++ b/src/RTPStateReplicator.h
@@ -47,8 +47,8 @@ public:
         const RTPReplicationContextPtr& replicationContext,
 	const ConfigurationServiceImplPtr&);
     ~RTPStateReplicatorListenerI();
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const AsteriskSCF::Replication::MediaRTPPJMEDIA::V1::RTPStateItemSeq&, const Ice::Current&);
+    void stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq&, const Ice::Current&);
+    void stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Replication::MediaRTPPJMEDIA::V1::RTPStateItemSeq&, const Ice::Current&);
     bool operator==(const RTPStateReplicatorListenerI &rhs);
 private:
     boost::shared_ptr<RTPStateReplicatorListenerImpl> mImpl;
diff --git a/src/RTPStateReplicatorListener.cpp b/src/RTPStateReplicatorListener.cpp
index cb76040..03498de 100644
--- a/src/RTPStateReplicatorListener.cpp
+++ b/src/RTPStateReplicatorListener.cpp
@@ -200,12 +200,12 @@ RTPStateReplicatorListenerI::~RTPStateReplicatorListenerI()
 {
 }
 
-void RTPStateReplicatorListenerI::stateRemoved(const Ice::StringSeq& itemKeys, const Ice::Current&)
+void RTPStateReplicatorListenerI::stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq& itemKeys, const Ice::Current&)
 {
     mImpl->removeStateNoticeImpl(itemKeys);
 }
 
-void RTPStateReplicatorListenerI::stateSet(const RTPStateItemSeq& items, const Ice::Current&)
+void RTPStateReplicatorListenerI::stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const RTPStateItemSeq& items, const Ice::Current&)
 {
     mImpl->setStateNoticeImpl(items);
 }
diff --git a/src/RTPTelephonyEventSink.cpp b/src/RTPTelephonyEventSink.cpp
old mode 100644
new mode 100755
index 4acb442..75045a0
--- a/src/RTPTelephonyEventSink.cpp
+++ b/src/RTPTelephonyEventSink.cpp
@@ -171,6 +171,7 @@ void RTPTelephonyEventSink::write_async(
 
 void RTPTelephonyEventSink::setSource_async(
         const AMD_TelephonyEventSink_setSourcePtr& cb,
+        const AsteriskSCF::System::V1::OperationContextPtr&, 
         const TelephonyEventSourcePrx& source,
         const Ice::Current&)
 {
diff --git a/src/RTPTelephonyEventSink.h b/src/RTPTelephonyEventSink.h
old mode 100644
new mode 100755
index e11a23f..4a73e80
--- a/src/RTPTelephonyEventSink.h
+++ b/src/RTPTelephonyEventSink.h
@@ -48,6 +48,7 @@ public:
 
     void setSource_async(
             const AsteriskSCF::SessionCommunications::V1::AMD_TelephonyEventSink_setSourcePtr&,
+            const AsteriskSCF::System::V1::OperationContextPtr&, 
             const AsteriskSCF::SessionCommunications::V1::TelephonyEventSourcePrx& source,
             const Ice::Current&);
 
diff --git a/src/RTPTelephonyEventSource.cpp b/src/RTPTelephonyEventSource.cpp
old mode 100644
new mode 100755
index a097ce1..dc48d0e
--- a/src/RTPTelephonyEventSource.cpp
+++ b/src/RTPTelephonyEventSource.cpp
@@ -19,7 +19,7 @@
 #include <AsteriskSCF/Logger.h>
 #include <pjmedia.h>
 #include <IceUtil/UUID.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 using namespace AsteriskSCF::SessionCommunications::V1;
 using namespace AsteriskSCF::System::Logging;
@@ -220,7 +220,7 @@ void RTPTelephonyEventSource::distributeToSinks(const TelephonyEventPtr& event)
     {
         try
         {
-            (*iter)->write(AsteriskSCF::createContext(), event);
+            (*iter)->write(AsteriskSCF::Operations::createContext(), event);
         }
         catch (const Ice::Exception&)
         {
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
old mode 100644
new mode 100755
index 3a940b7..33c3cf8
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -7,6 +7,7 @@ astscf_component_add_slices(MediaRTPPJMEDIATest LOCAL TestRTPpjmediaIf.ice)
 astscf_component_add_boost_libraries(MediaRTPPJMEDIATest unit_test_framework thread date_time)
 astscf_component_add_slice_collection_libraries(MediaRTPPJMEDIATest ASTSCF)
 astscf_component_build_icebox(MediaRTPPJMEDIATest)
+target_link_libraries(MediaRTPPJMEDIATest ASTSCFIceUtilCpp)
 
 astscf_component_init(MediaRTPPJMEDIATestV6)
 astscf_slice_collection(LOCAL PATH  "${CMAKE_CURRENT_SOURCE_DIR}") 
@@ -16,6 +17,7 @@ astscf_component_add_slices(MediaRTPPJMEDIATestV6 LOCAL TestRTPpjmediaIf.ice)
 astscf_component_add_boost_libraries(MediaRTPPJMEDIATestV6 unit_test_framework thread date_time)
 astscf_component_add_slice_collection_libraries(MediaRTPPJMEDIATestV6 ASTSCF)
 astscf_component_build_icebox(MediaRTPPJMEDIATestV6)
+target_link_libraries(MediaRTPPJMEDIATestV6 ASTSCFIceUtilCpp)
 pjproject_link(MediaRTPPJMEDIATestV6 pjlib)
 set_property(TARGET MediaRTPPJMEDIATestV6 PROPERTY COMPILE_DEFINITIONS IPV6_TEST)
 
@@ -26,6 +28,7 @@ astscf_component_add_slices(MediaRTPPJMEDIAIceTest PROJECT AsteriskSCF/Configura
 astscf_component_add_boost_libraries(MediaRTPPJMEDIAIceTest unit_test_framework thread date_time)
 astscf_component_add_slice_collection_libraries(MediaRTPPJMEDIAIceTest ASTSCF)
 astscf_component_build_icebox(MediaRTPPJMEDIAIceTest)
+target_link_libraries(MediaRTPPJMEDIAIceTest ASTSCFIceUtilCpp)
 pjproject_link(MediaRTPPJMEDIAIceTest pjlib)
 
 astscf_test_icebox(MediaRTPPJMEDIATest config/test_component.conf)
diff --git a/test/TestRTPICE.cpp b/test/TestRTPICE.cpp
index 85ce649..35984c4 100644
--- a/test/TestRTPICE.cpp
+++ b/test/TestRTPICE.cpp
@@ -29,7 +29,7 @@
 #include <boost/thread/condition.hpp>
 #include <Ice/Ice.h>
 #include <Ice/BuiltinSequences.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Media/MediaIf.h>
@@ -56,11 +56,11 @@ namespace
 class TestReplicatorListener : public RTPStateReplicatorListener
 {
 public:
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&)
+    void stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq&, const Ice::Current&)
     {
     }
 
-    void stateSet(const RTPStateItemSeq&, const Ice::Current&)
+    void stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const RTPStateItemSeq&, const Ice::Current&)
     {
     }
     
@@ -182,7 +182,7 @@ BOOST_AUTO_TEST_CASE(RTPSessionWithICEEnabled)
 
         ConfigurationGroupSeq s;
         s.push_back(iceGroup);
-        configPrx->setConfiguration(AsteriskSCF::createContext(), s);
+        configPrx->setConfiguration(AsteriskSCF::Operations::createContext(), s);
 
         RTPMediaServicePrx servicePrx;
         {
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(RTPSessionWithICEEnabled)
             RTPSessionPrx sessionPrx;
             RTPOptionsPtr options(new RTPOptions);
             RTPAllocationOutputsPtr outputs(new RTPAllocationOutputs);
-            BOOST_REQUIRE_NO_THROW(sessionPrx = servicePrx->allocate(AsteriskSCF::createContext(), query, options, outputs));
+            BOOST_REQUIRE_NO_THROW(sessionPrx = servicePrx->allocate(AsteriskSCF::Operations::createContext(), query, options, outputs));
             BOOST_REQUIRE(sessionPrx != 0);
             sessionPrx->ice_ping(); // To silence unused arg warning.
             sessionPrx->release();
@@ -249,7 +249,7 @@ BOOST_AUTO_TEST_CASE(RTPSessionAllocationFailure)
         iceGroup->configurationItems[RTPICETransportFlagsItemName] = iceFlags;
         ConfigurationGroupSeq s;
         s.push_back(iceGroup);
-        BOOST_REQUIRE_NO_THROW(configPrx->setConfiguration(AsteriskSCF::createContext(), s));
+        BOOST_REQUIRE_NO_THROW(configPrx->setConfiguration(AsteriskSCF::Operations::createContext(), s));
         try
         {
             RTPOverICEServiceLocatorParamsPtr query = new RTPOverICEServiceLocatorParams;
@@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE(RTPSessionAllocationFailure)
             query->enableTURN = true;
             RTPOptionsPtr options(new RTPOptions);
             RTPAllocationOutputsPtr outputs(new RTPAllocationOutputs);
-            RTPSessionPrx sessionPrx = servicePrx->allocate(AsteriskSCF::createContext(), query, options, outputs);
+            RTPSessionPrx sessionPrx = servicePrx->allocate(AsteriskSCF::Operations::createContext(), query, options, outputs);
             sessionPrx->ice_ping();
         }
         catch (const SessionAllocationFailure& ex)
diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 1f35b5c..7d20abf 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -36,7 +36,7 @@
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/RTP/MediaRTPIf.h>
 #include <AsteriskSCF/Media/RTP/MediaRTCPIf.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "RTPStateReplicationIf.h"
 #include "TestRTPpjmediaIf.h"
@@ -72,8 +72,8 @@ static ArgCacheType mCachedArgs;
 class TestRTPReplicatorListener : public RTPStateReplicatorListener
 {
 public:
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const RTPStateItemSeq&, const Ice::Current&);
+    void stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq&, const Ice::Current&);
+    void stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const RTPStateItemSeq&, const Ice::Current&);
     
     RTPGeneralStateItemPtr mGeneral;
     RTPSessionStateItemPtr mSession;
@@ -187,11 +187,11 @@ public:
 };
 static SharedTestData Testbed;
 
-void TestRTPReplicatorListener::stateRemoved(const Ice::StringSeq&, const Ice::Current&)
+void TestRTPReplicatorListener::stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq&, const Ice::Current&)
 {
 }
 
-void TestRTPReplicatorListener::stateSet(const RTPStateItemSeq& items, const Ice::Current&)
+void TestRTPReplicatorListener::stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const RTPStateItemSeq& items, const Ice::Current&)
 {
     class visitor : public AsteriskSCF::Replication::MediaRTPPJMEDIA::V1::RTPStateItemVisitor
     {
@@ -257,7 +257,7 @@ public:
     /**
      * Implementation of the setSource method which just stores the source away for later retrieval.
      */
-    void setSource(const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
+    void setSource(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
     {
         mSource = source;
     }
@@ -427,7 +427,7 @@ BOOST_AUTO_TEST_CASE(AddListenertoStateReplicator)
 
     try
     {
-       Testbed.mStateReplicator->addListener(Testbed.mListenerProxy);
+       Testbed.mStateReplicator->addListener(AsteriskSCF::Operations::createContext(), Testbed.mListenerProxy);
 
        added = true;
     }
@@ -492,7 +492,7 @@ BOOST_AUTO_TEST_CASE(AllocateRTPSession)
         RTPOptionsPtr options(new RTPOptions);
         RTPAllocationOutputsPtr outputs(new RTPAllocationOutputs);
 
-        Testbed.session = service->allocate(AsteriskSCF::createContext(), params, options, outputs);
+        Testbed.session = service->allocate(AsteriskSCF::Operations::createContext(), params, options, outputs);
 
         // Give the RTP component time to replicate this session
         Testbed.mCondition.wait(lock);
@@ -668,7 +668,7 @@ BOOST_AUTO_TEST_CASE(VerifyReplicatedRTCPRemoteDetails)
         RTCP::V1::RTCPSessionPrx session = RTCP::V1::RTCPSessionPrx::checkedCast(Testbed.session,
         RTCP::V1::SessionFacet);
 
-        session->setRemoteDetails(AsteriskSCF::createContext(), address, 10001);
+        session->setRemoteDetails(AsteriskSCF::Operations::createContext(), address, 10001);
     }
     catch (const Ice::Exception &e)
     {
@@ -707,7 +707,7 @@ BOOST_AUTO_TEST_CASE(VerifyCookies)
         cookies.push_back(foo);
         cookies.push_back(bar);
 
-         Testbed.session->setCookies(cookies);
+         Testbed.session->setCookies(AsteriskSCF::Operations::createContext(), cookies);
     }
     catch (const Ice::Exception &e)
     {
@@ -858,11 +858,11 @@ BOOST_AUTO_TEST_CASE(ConfirmRemoteRTPAddressSetting)
             StreamSinkRTPPrx sink = StreamSinkRTPPrx::checkedCast((*i));
 
 #ifdef IPV6_TEST
-        std::string address = "::1";
+            std::string address = "::1";
 #else
-        std::string address = "127.0.0.1";
+            std::string address = "127.0.0.1";
 #endif
-            sink->setRemoteDetails(address, 10000);
+            sink->setRemoteDetails(AsteriskSCF::Operations::createContext(), address, 10000);
 
             if (sink->getRemoteAddress() == address && sink->getRemotePort() == 10000)
             {
@@ -897,7 +897,7 @@ BOOST_AUTO_TEST_CASE(ConfirmSinkSetting)
         {
             StreamSourceRTPPrx source = StreamSourceRTPPrx::checkedCast((*i));
 
-            source->addSink(Testbed.sink);
+            source->addSink(AsteriskSCF::Operations::createContext(), Testbed.sink);
 
             StreamSinkPrx sink = source->getSinks().front();
 
@@ -940,7 +940,7 @@ BOOST_AUTO_TEST_CASE(PushPayloadMappings)
         PayloadMap mapping;
         mapping.insert(make_pair(98, format));
 
-        Testbed.session->associatePayloads(AsteriskSCF::createContext(), mapping);
+        Testbed.session->associatePayloads(AsteriskSCF::Operations::createContext(), mapping);
 
         pushed = true;
     }
@@ -969,7 +969,7 @@ BOOST_AUTO_TEST_CASE(AddRTCPListenerToSource)
         StreamSourceRTPPrx source = StreamSourceRTPPrx::uncheckedCast(sources.front());
         RTCP::V1::InformationPrx information = RTCP::V1::InformationPrx::checkedCast(source,
                                                                                      RTCP::V1::Facet);
-        information->addListener(Testbed.mInformationListenerProxy);
+        information->addListener(AsteriskSCF::Operations::createContext(), Testbed.mInformationListenerProxy);
         added = true;
     }
     catch (const Ice::Exception &e)
@@ -997,7 +997,7 @@ BOOST_AUTO_TEST_CASE(AddRTCPListenerToSink)
         StreamSinkRTPPrx sink = StreamSinkRTPPrx::uncheckedCast(sinks.front());
         RTCP::V1::InformationPrx information = RTCP::V1::InformationPrx::checkedCast(sink,
                                                                                      RTCP::V1::Facet);
-        information->addListener(Testbed.mInformationListenerProxy);
+        information->addListener(AsteriskSCF::Operations::createContext(), Testbed.mInformationListenerProxy);
         added = true;
     }
     catch (const Ice::Exception &e)
@@ -1031,7 +1031,7 @@ BOOST_AUTO_TEST_CASE(SetupRTCPLoopback)
 
         boost::mutex::scoped_lock lock(Testbed.mLock);
 
-        session->setRemoteDetails(AsteriskSCF::createContext(), address, port);
+        session->setRemoteDetails(AsteriskSCF::Operations::createContext(), address, port);
 
         looped = true;
 
@@ -1070,13 +1070,13 @@ BOOST_AUTO_TEST_CASE(SetupRTPLoopback)
         StreamSinkSeq sinks = Testbed.session->getSinks();
         StreamSinkRTPPrx sink = StreamSinkRTPPrx::uncheckedCast(sinks.front());
 
-    boost::mutex::scoped_lock lock(Testbed.mLock);
+        boost::mutex::scoped_lock lock(Testbed.mLock);
 
-        sink->setRemoteDetails(address, port);
+        sink->setRemoteDetails(AsteriskSCF::Operations::createContext(), address, port);
 
         looped = true;
 
-    Testbed.mCondition.wait(lock);
+        Testbed.mCondition.wait(lock);
     }
     catch (const Ice::Exception &e)
     {
@@ -1255,7 +1255,7 @@ BOOST_AUTO_TEST_CASE(ReceiveUnknownRTPPacket)
         params->category = "rtp";
         params->service = "";
 #ifdef IPV6_TEST
-    params->ipv6 = true;
+        params->ipv6 = true;
 #endif
 
         RTPMediaServicePrx service = RTPMediaServicePrx::uncheckedCast(Testbed.locator->locate(params));
@@ -1271,12 +1271,12 @@ BOOST_AUTO_TEST_CASE(ReceiveUnknownRTPPacket)
         RTPOptionsPtr options(new RTPOptions);
         RTPAllocationOutputsPtr outputs(new RTPAllocationOutputs);
 
-        RTPSessionPrx session = service->allocate(AsteriskSCF::createContext(), params, options, outputs);
+        RTPSessionPrx session = service->allocate(AsteriskSCF::Operations::createContext(), params, options, outputs);
 
         PayloadMap mapping;
         mapping.insert(make_pair(13, format));
 
-        session->associatePayloads(AsteriskSCF::createContext(), mapping);
+        session->associatePayloads(AsteriskSCF::Operations::createContext(), mapping);
 
         StreamSourceSeq sources = Testbed.session->getSources();
         StreamSourceRTPPrx source = StreamSourceRTPPrx::uncheckedCast(sources.front());
@@ -1285,7 +1285,7 @@ BOOST_AUTO_TEST_CASE(ReceiveUnknownRTPPacket)
 
         StreamSinkSeq sinks = session->getSinks();
         StreamSinkRTPPrx sink = StreamSinkRTPPrx::uncheckedCast(sinks.front());
-        sink->setRemoteDetails(address, port);
+        sink->setRemoteDetails(AsteriskSCF::Operations::createContext(), address, port);
 
         AudioFramePtr frame = new AudioFrame();
         frame->mediaFormat = format;
@@ -1420,16 +1420,16 @@ BOOST_AUTO_TEST_CASE(SetInvalidAddressFamilyAddress)
         {
             StreamSinkRTPPrx sink = StreamSinkRTPPrx::checkedCast((*i));
 
-        /* No, these are not accidentally reversed. We want to try to set an IPv4 address
-         * on an IPv6 sink and vice versa to make sure that an exception does get thrown.
-         */
+            /* No, these are not accidentally reversed. We want to try to set an IPv4 address
+             * on an IPv6 sink and vice versa to make sure that an exception does get thrown.
+             */
 #ifdef IPV6_TEST
-            sink->setRemoteDetails("127.0.0.1", 10000);
+            sink->setRemoteDetails(AsteriskSCF::Operations::createContext(), "127.0.0.1", 10000);
 #else
-        sink->setRemoteDetails("::1", 10000);
+            sink->setRemoteDetails(AsteriskSCF::Operations::createContext(), "::1", 10000);
 #endif
 
-        set = true;
+            set = true;
         }
     }
     catch (const Ice::Exception &e)

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list