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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Mar 2 14:01:16 CST 2012


branch "retry_deux" has been created
        at  1836b0ec0cf302d24ee005ec9d0a0a3bce82e9b9 (commit)

- Log -----------------------------------------------------------------
commit 1836b0ec0cf302d24ee005ec9d0a0a3bce82e9b9
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Mar 2 16:30:36 2012 -0330

    Updates for recent changes to slice

diff --git a/slice/AsteriskSCF/Replication/UDPTL/UdptlStateReplicationIf.ice b/slice/AsteriskSCF/Replication/UDPTL/UdptlStateReplicationIf.ice
index d7e65f4..8fad508 100644
--- a/slice/AsteriskSCF/Replication/UDPTL/UdptlStateReplicationIf.ice
+++ b/slice/AsteriskSCF/Replication/UDPTL/UdptlStateReplicationIf.ice
@@ -54,16 +54,16 @@ module V1
 
     interface UdptlStateReplicatorListener
     {
-	void stateRemoved(Ice::StringSeq itemKeys);
-	void stateSet(UdptlStateItemSeq items);
+	idempotent void stateRemoved(AsteriskSCF::System::V1::OperationContext operationContext, Ice::StringSeq itemKeys);
+	idempotent void stateSet(AsteriskSCF::System::V1::OperationContext operationContext, UdptlStateItemSeq items);
     };
 
     interface UdptlStateReplicator
     {
-	void addListener(UdptlStateReplicatorListener *listener);
-	void removeListener(UdptlStateReplicatorListener *listener);
-	void setState (UdptlStateItemSeq items);
-	void removeState(Ice::StringSeq items);
+	idempotent void addListener(AsteriskSCF::System::V1::OperationContext operationContext, UdptlStateReplicatorListener *listener);
+	idempotent void removeListener(AsteriskSCF::System::V1::OperationContext operationContext, UdptlStateReplicatorListener *listener);
+	idempotent void setState (AsteriskSCF::System::V1::OperationContext operationContext, UdptlStateItemSeq items);
+	idempotent void removeState(AsteriskSCF::System::V1::OperationContext operationContext, Ice::StringSeq items);
 	idempotent UdptlStateItemSeq getState(Ice::StringSeq itemKeys);
 	idempotent UdptlStateItemSeq getAllState();
     };
diff --git a/src/Component.cpp b/src/Component.cpp
index 43e3374..2082485 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -31,7 +31,7 @@
 #include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Discovery/SmartProxy.h>
 #include <AsteriskSCF/Component/Component.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "UdptlReplicationContext.h"
 #include "UDPTLSession.h"
@@ -160,12 +160,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());
 }
 
 /**
@@ -337,7 +337,7 @@ void Component::findRemoteServices()
         // replicator service. 
         ConfigurationReplicatorPrx configurationReplicator = ConfigurationReplicatorPrx::checkedCast(
             udptlReplicationContext->getReplicator().initialize(), ReplicatorFacet);
-        configurationReplicator->registerConfigurationService(mConfigurationServicePrx);
+        configurationReplicator->registerConfigurationService(AsteriskSCF::Operations::createContext(), mConfigurationServicePrx);
 
     }
     catch (const std::exception& e)
@@ -390,7 +390,7 @@ void Component::listenToStateReplicators()
         // Are we in standby mode?
         if (udptlReplicationContext->getState() == STANDBY_IN_REPLICA_GROUP)
         {
-            udptlReplicationContext->getReplicator()->addListener(mReplicatorListenerProxy);
+            udptlReplicationContext->getReplicator()->addListener(AsteriskSCF::Operations::createContext(), mReplicatorListenerProxy);
             mListeningToReplicator = true;
         }
     }
@@ -418,7 +418,7 @@ void Component::stopListeningToStateReplicators()
 
     try
     {
-        udptlReplicationContext->getReplicator()->removeListener(mReplicatorListenerProxy);
+        udptlReplicationContext->getReplicator()->removeListener(AsteriskSCF::Operations::createContext(), mReplicatorListenerProxy);
         mListeningToReplicator = false;
     }
     catch (const Ice::Exception& e)
@@ -456,7 +456,7 @@ void Component::onRegisterPrimaryServices()
     }
 
     mGeneralState->serviceManagement = mUdptlMediaServiceRegistration->getServiceManagement();
-    mGeneralState->serviceManagement->addLocatorParams(AsteriskSCF::createContext(), mUdptlLocatorParams, "");
+    mGeneralState->serviceManagement->addLocatorParams(AsteriskSCF::Operations::createContext(), mUdptlLocatorParams, "");
 }
 
 void Component::onStart() 
@@ -469,7 +469,7 @@ void Component::onStart()
         UdptlStateItemSeq items;
         items.push_back(mGeneralState);
         UdptlStateReplicatorPrx oneway = UdptlStateReplicatorPrx::uncheckedCast(udptlReplicationContext->getReplicator()->ice_oneway());
-        oneway->setState(items);
+        oneway->setState(AsteriskSCF::Operations::createContext(), items);
     }
 }
 
@@ -477,7 +477,7 @@ void Component::onStop()
 {
     if (getReplicationContext()->isActive() == true)
     {
-       mGeneralState->serviceManagement->unregister();
+       mGeneralState->serviceManagement->unregister(AsteriskSCF::Operations::createContext());
     }
 }
 
diff --git a/src/ICETransport.cpp b/src/ICETransport.cpp
index db2337d..1b1ddd9 100644
--- a/src/ICETransport.cpp
+++ b/src/ICETransport.cpp
@@ -85,6 +85,7 @@ public:
     }
 
     void negotiate_async(const AMD_InteractiveConnectionAgent_negotiatePtr& callback,
+        const AsteriskSCF::System::V1::OperationContextPtr&,
         const string& hostname, Ice::Int port, const CandidateSeq& candidates,
         const Ice::Current&)
     {
diff --git a/src/UDPTLSession.cpp b/src/UDPTLSession.cpp
index b0203a5..a2ff51c 100644
--- a/src/UDPTLSession.cpp
+++ b/src/UDPTLSession.cpp
@@ -33,6 +33,7 @@
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/UDPTL/MediaUDPTLIf.h>
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "udptl.h"
 
@@ -79,12 +80,12 @@ 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,
+    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,
+    void removeCookies(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::SessionCookies& cookies,
                        const Ice::Current&);
     void release(const Ice::Current&);
 
@@ -327,7 +328,7 @@ void UDPTLSessionImpl::setCookies(const AsteriskSCF::Media::V1::SessionCookieDic
 /**
  * Support for the corresponding API call.
  */
-void UDPTLSessionImpl::setCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies,
+void UDPTLSessionImpl::setCookies(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::SessionCookies& cookies,
                                   const Ice::Current&)
 {
     { // scope the lock
@@ -376,7 +377,7 @@ void UDPTLSessionImpl::getCookies_async(
 /**
  * Implementation of the corresponding API call.
  */
-void UDPTLSessionImpl::removeCookies(const AsteriskSCF::Media::V1::SessionCookies& cookies,
+void UDPTLSessionImpl::removeCookies(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::SessionCookies& cookies,
                                    const Ice::Current&)
 {
     { // scope the lock
@@ -470,7 +471,7 @@ void UDPTLSessionImpl::replicateState(const UdptlSessionStateItemPtr& session, c
         return;
     }
 
-    mReplicationContext->getReplicator().tryOneWay()->setState(items);
+    mReplicationContext->getReplicator().tryOneWay()->setState(AsteriskSCF::Operations::createContext(), items);
 }
 
 /**
@@ -507,7 +508,7 @@ void UDPTLSessionImpl::removeState(const UdptlSessionStateItemPtr& session, cons
         return;
     }
 
-    mReplicationContext->getReplicator().tryOneWay()->removeState(items);
+    mReplicationContext->getReplicator().tryOneWay()->removeState(AsteriskSCF::Operations::createContext(), items);
 }
 
 UDPTLSessionPrx UDPTLSessionImpl::activate(const string& id)
diff --git a/src/UDPTLSink.cpp b/src/UDPTLSink.cpp
index 6c08fd6..a9ba634 100644
--- a/src/UDPTLSink.cpp
+++ b/src/UDPTLSink.cpp
@@ -139,7 +139,7 @@ void StreamSinkUDPTLImpl::write(const AsteriskSCF::Media::V1::FrameSeq& frames,
 /**
  * Implementation of the setSource method as defined in MediaIf.ice
  */
-void StreamSinkUDPTLImpl::setSource(const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
+void StreamSinkUDPTLImpl::setSource(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSourcePrx& source, const Ice::Current&)
 {
     mImpl->mSinkStateItem->source = source;
 
@@ -175,7 +175,9 @@ std::string StreamSinkUDPTLImpl::getId(const Ice::Current&)
 /**
  * Implementation of the setRemoteDetails method as defined in NetworkIf.ice
  */
-void StreamSinkUDPTLImpl::setRemoteDetails(const string& address, Ice::Int port, 
+void StreamSinkUDPTLImpl::setRemoteDetails(
+    const AsteriskSCF::System::V1::OperationContextPtr&, 
+    const string& address, Ice::Int port, 
     const Ice::Current&)
 {
     mImpl->mSessionAdapter->setRemoteDetails(address, port);
@@ -197,7 +199,7 @@ AddressInformation StreamSinkUDPTLImpl::getRemoteDetails(const Ice::Current&)
 /**
  * Implemnentation of the setFarMaxDatagram method as defined in MediaUDPTLIf.ice
  */
-void StreamSinkUDPTLImpl::setFarMaxDatagram(int datagram, const Ice::Current&)
+void StreamSinkUDPTLImpl::setFarMaxDatagram(const AsteriskSCF::System::V1::OperationContextPtr&, int datagram, const Ice::Current&)
 {
     udptl_set_far_max_datagram(mImpl->mUdptl, datagram);
 
@@ -224,7 +226,8 @@ Ice::Int StreamSinkUDPTLImpl::getFarMaxIFP(const Ice::Current&)
 /**
  * Implemnentation of the setErrorCorrectionScheme method as defined in MediaUDPTLIf.ice
  */
-void StreamSinkUDPTLImpl::setErrorCorrectionScheme(ErrorCorrectionScheme scheme, const Ice::Current&)
+void StreamSinkUDPTLImpl::setErrorCorrectionScheme(
+    const AsteriskSCF::System::V1::OperationContextPtr&, ErrorCorrectionScheme scheme, const Ice::Current&)
 {
     enum t38_ec_modes mode;
 
diff --git a/src/UDPTLSink.h b/src/UDPTLSink.h
index 4357106..7bee459 100644
--- a/src/UDPTLSink.h
+++ b/src/UDPTLSink.h
@@ -35,17 +35,17 @@ public:
      * AsteriskSCF::Media::UDPTL::V1::StreamSinkUDPTL 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&);
     AsteriskSCF::Network::V1::AddressInformation getRemoteDetails(const Ice::Current&);
 
-    void setFarMaxDatagram(Ice::Int, const Ice::Current&);
+    void setFarMaxDatagram(const AsteriskSCF::System::V1::OperationContextPtr&, Ice::Int, const Ice::Current&);
     Ice::Int getFarMaxDatagram(const Ice::Current&);
     Ice::Int getFarMaxIFP(const Ice::Current&);
-    void setErrorCorrectionScheme(AsteriskSCF::Media::UDPTL::V1::ErrorCorrectionScheme, const Ice::Current&);
+    void setErrorCorrectionScheme(const AsteriskSCF::System::V1::OperationContextPtr&, AsteriskSCF::Media::UDPTL::V1::ErrorCorrectionScheme, const Ice::Current&);
     AsteriskSCF::Media::UDPTL::V1::ErrorCorrectionScheme getErrorCorrectionScheme(const Ice::Current&);
 
     /**
diff --git a/src/UDPTLSource.cpp b/src/UDPTLSource.cpp
index 368c567..f3c828f 100644
--- a/src/UDPTLSource.cpp
+++ b/src/UDPTLSource.cpp
@@ -121,7 +121,7 @@ StreamSourceUDPTLImpl::StreamSourceUDPTLImpl(const SessionAdapterPtr& session,
 /**
  * Implementation of the addSink method as defined in MediaIf.ice
  */
-void StreamSourceUDPTLImpl::addSink(const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
+void StreamSourceUDPTLImpl::addSink(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
@@ -142,7 +142,7 @@ void StreamSourceUDPTLImpl::addSink(const AsteriskSCF::Media::V1::StreamSinkPrx&
 /**
  * Implementation of the removeSink method as defined in MediaIf.ice
  */
-void StreamSourceUDPTLImpl::removeSink(const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
+void StreamSourceUDPTLImpl::removeSink(const AsteriskSCF::System::V1::OperationContextPtr&, const AsteriskSCF::Media::V1::StreamSinkPrx& sink, const Ice::Current&)
 {
     boost::unique_lock<boost::shared_mutex> lock(mImpl->mLock);
 
diff --git a/src/UDPTLSource.h b/src/UDPTLSource.h
index 1496c02..f17c98d 100644
--- a/src/UDPTLSource.h
+++ b/src/UDPTLSource.h
@@ -31,8 +31,8 @@ public:
                           const std::string& parentSessionId,
                           struct udptl *udptl);
 
-    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/UdptlStateReplicator.h b/src/UdptlStateReplicator.h
index 845572a..cf665fb 100644
--- a/src/UdptlStateReplicator.h
+++ b/src/UdptlStateReplicator.h
@@ -47,8 +47,8 @@ public:
                                   const UdptlReplicationContextPtr& replicationContext,
                                   const ConfigurationServiceImplPtr&);
     ~UdptlStateReplicatorListenerI();
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const AsteriskSCF::Replication::UDPTL::V1::UdptlStateItemSeq&, 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::UDPTL::V1::UdptlStateItemSeq&, const Ice::Current&);
     bool operator==(const UdptlStateReplicatorListenerI &rhs);
 private:
     boost::shared_ptr<UdptlStateReplicatorListenerImpl> mImpl;
diff --git a/src/UdptlStateReplicatorApp.cpp b/src/UdptlStateReplicatorApp.cpp
index 47a4ad4..53a3a30 100644
--- a/src/UdptlStateReplicatorApp.cpp
+++ b/src/UdptlStateReplicatorApp.cpp
@@ -26,7 +26,7 @@
 #include <AsteriskSCF/CollocatedIceStorm/CollocatedIceStorm.h>
 #include <AsteriskSCF/System/Component/ConfigurationIf.h>
 #include <AsteriskSCF/Media/UDPTL/MediaUDPTLIf.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "UdptlConfigurationIf.h"
 #include "UdptlStateReplicator.h"
diff --git a/src/UdptlStateReplicatorListener.cpp b/src/UdptlStateReplicatorListener.cpp
index 5c34b68..cd454f7 100644
--- a/src/UdptlStateReplicatorListener.cpp
+++ b/src/UdptlStateReplicatorListener.cpp
@@ -177,12 +177,12 @@ UdptlStateReplicatorListenerI::~UdptlStateReplicatorListenerI()
 {
 }
 
-void UdptlStateReplicatorListenerI::stateRemoved(const Ice::StringSeq& itemKeys, const Ice::Current&)
+void UdptlStateReplicatorListenerI::stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq& itemKeys, const Ice::Current&)
 {
     mImpl->removeStateNoticeImpl(itemKeys);
 }
 
-void UdptlStateReplicatorListenerI::stateSet(const UdptlStateItemSeq& items, const Ice::Current&)
+void UdptlStateReplicatorListenerI::stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const UdptlStateItemSeq& items, const Ice::Current&)
 {
     mImpl->setStateNoticeImpl(items);
 }
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5644864..12a6e45 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -5,6 +5,7 @@ astscf_component_add_slices(MediaTransportUDPTLTest PROJECT AsteriskSCF/Replicat
 astscf_component_add_boost_libraries(MediaTransportUDPTLTest unit_test_framework thread date_time)
 astscf_component_add_slice_collection_libraries(MediaTransportUDPTLTest ASTSCF)
 astscf_component_build_icebox(MediaTransportUDPTLTest)
+target_link_libraries(MediaTransportUDPTLTest ASTSCFIceUtilCpp)
 
 astscf_component_init(MediaTransportUDPTLTestV6)
 astscf_component_add_files(MediaTransportUDPTLTestV6 TestMediaTransportUDPTL.cpp)
@@ -13,6 +14,7 @@ astscf_component_add_boost_libraries(MediaTransportUDPTLTestV6 unit_test_framewo
 astscf_component_add_slice_collection_libraries(MediaTransportUDPTLTestV6 ASTSCF)
 astscf_component_build_icebox(MediaTransportUDPTLTestV6)
 set_property(TARGET MediaTransportUDPTLTestV6 PROPERTY COMPILE_DEFINITIONS IPV6Test)
+target_link_libraries(MediaTransportUDPTLTestV6 ASTSCFIceUtilCpp)
 
 astscf_component_init(MediaTransportUDPTLIceTest)
 astscf_component_add_files(MediaTransportUDPTLIceTest TestUDPTLICE.cpp)
@@ -21,6 +23,8 @@ astscf_component_add_slices(MediaTransportUDPTLIceTest PROJECT AsteriskSCF/Confi
 astscf_component_add_boost_libraries(MediaTransportUDPTLIceTest unit_test_framework thread date_time)
 astscf_component_add_slice_collection_libraries(MediaTransportUDPTLIceTest ASTSCF)
 astscf_component_build_icebox(MediaTransportUDPTLIceTest)
+target_link_libraries(MediaTransportUDPTLIceTest ASTSCFIceUtilCpp)
+
 pjproject_link(MediaTransportUDPTLIceTest pjlib)
 
 astscf_test_icebox(MediaTransportUDPTLTest config/test_component.config)
diff --git a/test/TestMediaTransportUDPTL.cpp b/test/TestMediaTransportUDPTL.cpp
index 92dffc3..201650e 100644
--- a/test/TestMediaTransportUDPTL.cpp
+++ b/test/TestMediaTransportUDPTL.cpp
@@ -35,7 +35,7 @@
 #include <AsteriskSCF/Media/MediaIf.h>
 #include <AsteriskSCF/Media/UDPTL/MediaUDPTLIf.h>
 #include <AsteriskSCF/Media/NetworkIf.h>
-#include <AsteriskSCF/Helpers/OperationContext.h>
+#include <AsteriskSCF/Operations/OperationContext.h>
 
 #include "UdptlStateReplicationIf.h"
 
@@ -71,8 +71,8 @@ static ArgCacheType mCachedArgs;
 class TestUdptlReplicatorListener : public UdptlStateReplicatorListener
 {
 public:
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const UdptlStateItemSeq&, const Ice::Current&);
+    void stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, const Ice::StringSeq&, const Ice::Current&);
+    void stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const UdptlStateItemSeq&, const Ice::Current&);
     
     UdptlGeneralStateItemPtr mGeneral;
     UdptlSessionStateItemPtr mSession;
@@ -146,11 +146,13 @@ public:
 };
 static SharedTestData Testbed;
 
-void TestUdptlReplicatorListener::stateRemoved(const Ice::StringSeq&, const Ice::Current&)
+void TestUdptlReplicatorListener::stateRemoved(const AsteriskSCF::System::V1::OperationContextPtr&, 
+    const Ice::StringSeq&, const Ice::Current&)
 {
 }
 
-void TestUdptlReplicatorListener::stateSet(const UdptlStateItemSeq& items, const Ice::Current&)
+void TestUdptlReplicatorListener::stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, 
+    const UdptlStateItemSeq& items, const Ice::Current&)
 {
     class visitor : public AsteriskSCF::Replication::UDPTL::V1::UdptlStateItemVisitor
     {
@@ -216,7 +218,8 @@ 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;
     }
@@ -379,7 +382,7 @@ BOOST_AUTO_TEST_CASE(AddListenertoStateReplicator)
 
     try
     {
-       Testbed.mStateReplicator->addListener(Testbed.mListenerProxy);
+       Testbed.mStateReplicator->addListener(AsteriskSCF::Operations::createContext(), Testbed.mListenerProxy);
 
        added = true;
     }
@@ -433,7 +436,7 @@ BOOST_AUTO_TEST_CASE(AllocateUDPTLSession)
         // You might think "geez, this should deadlock due to state replication" but no, we use one ways for that
         boost::mutex::scoped_lock lock(Testbed.mLock);
 
-        Testbed.session = service->allocate(AsteriskSCF::createContext(), params);
+        Testbed.session = service->allocate(AsteriskSCF::Operations::createContext(), params);
 
         // Give the RTP component time to replicate this session
         Testbed.mCondition.wait(lock);
@@ -700,11 +703,11 @@ BOOST_AUTO_TEST_CASE(ConfirmRemoteUDPTLAddressSetting)
             StreamSinkUDPTLPrx sink = StreamSinkUDPTLPrx::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);
 
             AddressInformation info = sink->getRemoteDetails();
             if (info.ipAddress == address && info.port == 10000)
@@ -740,7 +743,7 @@ BOOST_AUTO_TEST_CASE(ConfirmSinkSetting)
         {
             StreamSourceUDPTLPrx source = StreamSourceUDPTLPrx::checkedCast((*i));
 
-            source->addSink(Testbed.sink);
+            source->addSink(AsteriskSCF::Operations::createContext(), Testbed.sink);
 
             StreamSinkPrx sink = source->getSinks().front();
 
@@ -784,7 +787,7 @@ BOOST_AUTO_TEST_CASE(SetupUDPTLLoopback)
 
         boost::mutex::scoped_lock lock(Testbed.mLock);
     
-        sink->setRemoteDetails(info.ipAddress, info.port);
+        sink->setRemoteDetails(AsteriskSCF::Operations::createContext(), info.ipAddress, info.port);
 
         looped = true;
 
@@ -816,7 +819,7 @@ BOOST_AUTO_TEST_CASE(SetFarMaxDatagram)
 
         boost::mutex::scoped_lock lock(Testbed.mLock);
 
-        sink->setFarMaxDatagram(1000);
+        sink->setFarMaxDatagram(AsteriskSCF::Operations::createContext(), 1000);
 
         set = true;
 
@@ -848,7 +851,7 @@ BOOST_AUTO_TEST_CASE(SetErrorCorrectionScheme)
 
         boost::mutex::scoped_lock lock(Testbed.mLock);
 
-        sink->setErrorCorrectionScheme(AsteriskSCF::Media::UDPTL::V1::REDUNDANCY);
+        sink->setErrorCorrectionScheme(AsteriskSCF::Operations::createContext(), AsteriskSCF::Media::UDPTL::V1::REDUNDANCY);
 
         set = true;
 
@@ -905,16 +908,16 @@ BOOST_AUTO_TEST_CASE(SetInvalidAddressFamilyAddress)
         {
             StreamSinkUDPTLPrx sink = StreamSinkUDPTLPrx::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)
diff --git a/test/TestUDPTLICE.cpp b/test/TestUDPTLICE.cpp
index 29d3f95..f29140f 100644
--- a/test/TestUDPTLICE.cpp
+++ b/test/TestUDPTLICE.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 UdptlStateReplicatorListener
 {
 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 UdptlStateItemSeq&, const Ice::Current&)
+    void stateSet(const AsteriskSCF::System::V1::OperationContextPtr&, const UdptlStateItemSeq&, const Ice::Current&)
     {
     }
     
@@ -178,7 +178,7 @@ BOOST_AUTO_TEST_CASE(UdptlSessionWithICEEnabled)
 
         ConfigurationGroupSeq s;
         s.push_back(iceGroup);
-        configPrx->setConfiguration(AsteriskSCF::createContext(), s);
+        configPrx->setConfiguration(AsteriskSCF::Operations::createContext(), s);
 
         UDPTLMediaServicePrx servicePrx;
         {
@@ -196,7 +196,7 @@ BOOST_AUTO_TEST_CASE(UdptlSessionWithICEEnabled)
             query->enableICE = true;
             query->enableTURN = false;
             UDPTLSessionPrx sessionPrx;
-            BOOST_REQUIRE_NO_THROW(sessionPrx = servicePrx->allocate(AsteriskSCF::createContext(), query));
+            BOOST_REQUIRE_NO_THROW(sessionPrx = servicePrx->allocate(AsteriskSCF::Operations::createContext(), query));
             BOOST_REQUIRE(sessionPrx != 0);
             sessionPrx->ice_ping(); // To silence unused arg warning.
             sessionPrx->release();
@@ -241,14 +241,14 @@ BOOST_AUTO_TEST_CASE(UdptlSessionAllocationFailure)
         iceGroup->configurationItems[UDPTLICETransportFlagsItemName] = 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
         {
             UDPTLOverICEServiceLocatorParamsPtr query = new UDPTLOverICEServiceLocatorParams;
             query->category = "udptl";
             query->enableICE = true;
             query->enableTURN = true;
-            UDPTLSessionPrx sessionPrx = servicePrx->allocate(AsteriskSCF::createContext(), query);
+            UDPTLSessionPrx sessionPrx = servicePrx->allocate(AsteriskSCF::Operations::createContext(), query);
             sessionPrx->ice_ping();
         }
         catch (const SessionAllocationFailure& ex)

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


-- 
asterisk-scf/integration/mediatransportudptl.git



More information about the asterisk-scf-commits mailing list