[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "indicate" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Apr 7 08:16:53 CDT 2011


branch "indicate" has been created
        at  503795a461d068efff9a2edd3c6f8a685badb081 (commit)

- Log -----------------------------------------------------------------
commit 503795a461d068efff9a2edd3c6f8a685badb081
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Apr 7 10:17:58 2011 -0300

    Add new indicate support.

diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 30abafe..71146f5 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -122,6 +122,11 @@ public:
 
 public: // The following operations are implementations of the SessionListener interface.
 
+    void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&)
+    {
+	// We do not care about anything besides stopped, so this really is fine being blank
+    }
+
     void connected(const SessionPrx& session, const Ice::Current&)
     {
     }
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index b383f61..1f026a2 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -33,6 +33,17 @@ public:
     }
 
     // Overrides
+    virtual void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
+	const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
+    {
+	AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr connected;
+
+	if ((connected = AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr::dynamicCast(indication)))
+	{
+	    mBridge->connected(session);
+	}
+    }
+
     virtual void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session, const Ice::Current&)
     {
         mBridge->connected(session);
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 31f6ea8..8ff99c7 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -80,6 +80,19 @@ SessionInfoPtr MockSession::addListener(const SessionListenerPrx& listener, cons
     return mSessionInfo;
 }
 
+void MockSession::indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
+{
+    AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr connect;
+
+    if ((connect = AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr::dynamicCast(indication)))
+    {
+	for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
+	{
+	    (*i)->connected(mMyPrx);
+	}
+    }
+}
+
 void MockSession::connect(const Ice::Current&)
 {
     for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
diff --git a/test/MockSession.h b/test/MockSession.h
index 0e59151..3038d5f 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -33,6 +33,7 @@ public:
     // Overrides
 
     AsteriskSCF::SessionCommunications::V1::SessionInfoPtr addListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&);
+    void indicate(const AsteriskSCF::SessionCommunications::V1::IndicationPtr&, const Ice::Current&);
     void connect(const Ice::Current&);
     void flash(const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx getEndpoint(const Ice::Current&);

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list