[asterisk-scf-commits] asterisk-scf/integration/test_channel.git branch "sip-threading" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue May 10 17:29:11 CDT 2011


branch "sip-threading" has been created
        at  3404992bd9dc27aef8461cfe0302254167e415bf (commit)

- Log -----------------------------------------------------------------
commit 3404992bd9dc27aef8461cfe0302254167e415bf
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue May 10 17:28:08 2011 -0500

    Adjust for changes in SessionCommunicationsIf.ice

diff --git a/src/TestEndpoint.cpp b/src/TestEndpoint.cpp
index 9d50d43..fda9295 100644
--- a/src/TestEndpoint.cpp
+++ b/src/TestEndpoint.cpp
@@ -140,18 +140,23 @@ public:
         mInfo->currentState = "ready";
     }
 
-    AsteriskSCF::SessionCommunications::V1::SessionInfoPtr addListener(
-        const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
+    void addListener_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_addListenerPtr& cb,
+            const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
             const Ice::Current&)
     {
         mListeners->addListener(listener);
         mEndpointManager->log(mId, __FUNCTION__);
-        return mInfo;
+        cb->ice_response(mInfo);
     }
 
-    void indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&)
+    void indicate_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_indicatePtr& cb,
+            const AsteriskSCF::SessionCommunications::V1::IndicationPtr&,
+            const Ice::Current&)
     {
-    mEndpointManager->log(mId, __FUNCTION__);
+        mEndpointManager->log(mId, __FUNCTION__);
+        cb->ice_response();
     }
 
     void connect(const Ice::Current&)
@@ -164,19 +169,25 @@ public:
         mEndpointManager->log(mId, __FUNCTION__);
     }
 
-    AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx getEndpoint(const Ice::Current&)
+    void getEndpoint_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_getEndpointPtr& cb,
+            const Ice::Current&)
     {
         mEndpointManager->log(mId, __FUNCTION__);
-        return mEndpointPrx;
+        cb->ice_response(mEndpointPrx);
     }
 
-    AsteriskSCF::SessionCommunications::V1::SessionInfoPtr getInfo(const Ice::Current&)
+    void getInfo_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_getInfoPtr& cb,
+            const Ice::Current&)
     {
         mEndpointManager->log(mId, __FUNCTION__);
-        return 0;
+        cb->ice_response(0);
     }
 
-    AsteriskSCF::Media::V1::SessionPrx getMediaSession(const Ice::Current& current)
+    void getMediaSession_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_getMediaSessionPtr& cb,
+            const Ice::Current& current)
     {
         mEndpointManager->log(mId, __FUNCTION__);
         boost::unique_lock<boost::shared_mutex> lock(mMutex);
@@ -186,8 +197,8 @@ public:
                 current.adapter->add(new MediaSessionI(mId + "Media", current.adapter),
                     current.adapter->getCommunicator()->stringToIdentity(mId + "Media")));
         }
-        return mMediaSession;
-    };
+        cb->ice_response(mMediaSession);
+    }
 
     void hold(const Ice::Current&)
     {
@@ -199,8 +210,9 @@ public:
         mEndpointManager->log(mId, __FUNCTION__);
     }
 
-    void removeListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
-        const Ice::Current&)
+    void removeListener(
+            const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
+            const Ice::Current&)
     {
         mListeners->removeListener(listener);
         mEndpointManager->log(mId, __FUNCTION__);
@@ -226,17 +238,20 @@ public:
         mEndpointManager->log(mId, __FUNCTION__);
     }
 
-    AsteriskSCF::SessionCommunications::V1::BridgePrx getBridge(const Ice::Current&)
+    void getBridge_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_getBridgePtr& cb,
+            const Ice::Current&)
     {
         mEndpointManager->log(mId, __FUNCTION__);
-        return mCurrentBridge;
+        cb->ice_response(mCurrentBridge);
     }
 
     /**
      * This method is marked as "amd" in the slice, but we are not bothering with actually
      * dispatching the message in the test endpoint, at least not for now anyway.
      */
-    void setBridge_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_setBridgePtr& cb,
+    void setBridge_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_setBridgePtr& cb,
             const AsteriskSCF::SessionCommunications::V1::BridgePrx& newBridge,
             const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
             const Ice::Current&)
@@ -248,16 +263,22 @@ public:
         cb->ice_response(mInfo);
     }
 
-    void removeBridge(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)
+    void removeBridge_async(
+            const AsteriskSCF::SessionCommunications::V1::AMD_Session_removeBridgePtr& cb,
+            const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
+            const Ice::Current&)
     {
         boost::unique_lock<boost::shared_mutex> lock(mMutex);
         if(!mCurrentBridge)
         {
-            throw AsteriskSCF::SessionCommunications::V1::NotBridged();
+            cb->ice_exception(AsteriskSCF::SessionCommunications::V1::NotBridged());
+            //XXX Are we supposed to throw or just return here?
+            return;
         }
         mListeners->removeListener(listener);
         mCurrentBridge = 0;
         mEndpointManager->log(mId, __FUNCTION__);
+        cb->ice_response();
     }
 
     void echo()

commit 285080414aa697bfed60d317c61fb5545ac15116
Author: Mark Michelson <mmichelson at digium.com>
Date:   Mon May 9 16:33:44 2011 -0500

    Adjust for AMD changes in Session::setBridge

diff --git a/src/TestEndpoint.cpp b/src/TestEndpoint.cpp
index ec84632..9d50d43 100644
--- a/src/TestEndpoint.cpp
+++ b/src/TestEndpoint.cpp
@@ -232,14 +232,20 @@ public:
         return mCurrentBridge;
     }
 
-    AsteriskSCF::SessionCommunications::V1::SessionInfoPtr setBridge(const AsteriskSCF::SessionCommunications::V1::BridgePrx& newBridge,
-        const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)
+    /**
+     * This method is marked as "amd" in the slice, but we are not bothering with actually
+     * dispatching the message in the test endpoint, at least not for now anyway.
+     */
+    void setBridge_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_setBridgePtr& cb,
+            const AsteriskSCF::SessionCommunications::V1::BridgePrx& newBridge,
+            const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener,
+            const Ice::Current&)
     {
         boost::unique_lock<boost::shared_mutex> lock(mMutex);
         mCurrentBridge = newBridge;
         mListeners->addListener(listener);
         mEndpointManager->log(mId, __FUNCTION__);
-        return mInfo;
+        cb->ice_response(mInfo);
     }
 
     void removeBridge(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)

commit e7c0727c3dee7cb81456f793aee477fd9d7efa98
Author: David M. Lee <dlee at digium.com>
Date:   Fri May 6 11:26:47 2011 -0500

    Fixed some unused param warnings.

diff --git a/src/TestEndpoint.cpp b/src/TestEndpoint.cpp
index 2ba23de..ec84632 100644
--- a/src/TestEndpoint.cpp
+++ b/src/TestEndpoint.cpp
@@ -539,7 +539,7 @@ public:
         adapter->addFacet(mCommands, adapter->getCommunicator()->stringToIdentity(id), "Commands");
     }
 
-    virtual void lookup_async(const ::AsteriskSCF::Core::Routing::V1::AMD_EndpointLocator_lookupPtr& cb, const ::std::string& destination, const ::Ice::Current&)
+    virtual void lookup_async(const ::AsteriskSCF::Core::Routing::V1::AMD_EndpointLocator_lookupPtr& cb, const ::std::string&, const ::Ice::Current&)
     {
         AsteriskSCF::Core::Endpoint::V1::EndpointSeq result;
         result.push_back(mEndpointProxy);

commit c0a4ce182691df0bbcafb9b2474ac3ec2e3f7c04
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed Dec 22 17:37:58 2010 -0600

    Changes for AMD operation on EndpointLocator interface.

diff --git a/src/TestEndpoint.cpp b/src/TestEndpoint.cpp
index 33d04b2..2ba23de 100644
--- a/src/TestEndpoint.cpp
+++ b/src/TestEndpoint.cpp
@@ -73,41 +73,41 @@ public:
     //
     void connected()
     {
-	mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
+    mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
     }
 
     void flashed()
     {
-	mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::FlashedIndication());
+    mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::FlashedIndication());
     }
 
     void held()
     {
-	mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::HeldIndication());
+    mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::HeldIndication());
     }
 
     void progressing(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response)
     {
-	AsteriskSCF::SessionCommunications::V1::ProgressingIndicationPtr indication(new AsteriskSCF::SessionCommunications::V1::ProgressingIndication());
+    AsteriskSCF::SessionCommunications::V1::ProgressingIndicationPtr indication(new AsteriskSCF::SessionCommunications::V1::ProgressingIndication());
         indication->response = response;
         mPublisher->indicated(mSession, indication);
     }
 
     void ringing()
     {
-	mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::RingingIndication());
+    mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::RingingIndication());
     }
 
     void stopped(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& response)
     {
-	AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr indication(new AsteriskSCF::SessionCommunications::V1::StoppedIndication());
-	indication->response = response;
-	mPublisher->indicated(mSession, indication);
+    AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr indication(new AsteriskSCF::SessionCommunications::V1::StoppedIndication());
+    indication->response = response;
+    mPublisher->indicated(mSession, indication);
     }
 
     void unheld()
     {
-	mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::UnheldIndication());
+    mPublisher->indicated(mSession, new AsteriskSCF::SessionCommunications::V1::UnheldIndication());
     }
 
     void setProxy(const AsteriskSCF::SessionCommunications::V1::SessionPrx& prx)
@@ -151,7 +151,7 @@ public:
 
     void indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&)
     {
-	mEndpointManager->log(mId, __FUNCTION__);
+    mEndpointManager->log(mId, __FUNCTION__);
     }
 
     void connect(const Ice::Current&)
@@ -539,11 +539,11 @@ public:
         adapter->addFacet(mCommands, adapter->getCommunicator()->stringToIdentity(id), "Commands");
     }
 
-    AsteriskSCF::Core::Endpoint::V1::EndpointSeq lookup(const std::string&, const Ice::Current&)
+    virtual void lookup_async(const ::AsteriskSCF::Core::Routing::V1::AMD_EndpointLocator_lookupPtr& cb, const ::std::string& destination, const ::Ice::Current&)
     {
         AsteriskSCF::Core::Endpoint::V1::EndpointSeq result;
         result.push_back(mEndpointProxy);
-        return result;
+        cb->ice_response(result);
     }
 
 private:

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


-- 
asterisk-scf/integration/test_channel.git



More information about the asterisk-scf-commits mailing list