[asterisk-scf-commits] asterisk-scf/release/routing.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jun 21 15:02:44 CDT 2011


branch "master" has been updated
       via  d4cf21b5c31af415fae377e08a7af82f842e027d (commit)
      from  d20df1dbdcb0d015f1c6a5950299f20f63d215a5 (commit)

Summary of changes:
 src/SessionListener.cpp |    1 +
 src/SessionListener.h   |    1 +
 src/SessionRouter.cpp   |    1 +
 test/MockBridge.cpp     |    3 ++-
 test/MockSession.cpp    |   12 ++++++------
 test/MockSession.h      |   10 ++++++++++
 6 files changed, 21 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit d4cf21b5c31af415fae377e08a7af82f842e027d
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Jun 21 17:01:52 2011 -0300

    Merge session cookies support.

diff --git a/src/SessionListener.cpp b/src/SessionListener.cpp
index 6ac29ab..34c4337 100644
--- a/src/SessionListener.cpp
+++ b/src/SessionListener.cpp
@@ -48,6 +48,7 @@ SessionListenerImpl::~SessionListenerImpl()
 
 void SessionListenerImpl::indicated(const SessionPrx& session, 
                                     const IndicationPtr& event,
+                                    const SessionCookies&,
                                     const Ice::Current&)
 {
     StoppedIndicationPtr stoppedIndication = StoppedIndicationPtr::dynamicCast(event);
diff --git a/src/SessionListener.h b/src/SessionListener.h
index 2f749cb..0e41940 100644
--- a/src/SessionListener.h
+++ b/src/SessionListener.h
@@ -41,6 +41,7 @@ public: // Overrides for SessionListener
 
     void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session, 
                    const ::AsteriskSCF::SessionCommunications::V1::IndicationPtr& event,
+                   const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
                    const Ice::Current&);
 
 public: // Impl operations
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index ad775e3..a291f47 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -56,6 +56,7 @@ namespace AsteriskSCF
 {
 namespace BasicRoutingService
 {
+
 typedef map<AsteriskSCF::Threading::WorkQueue::Work*, boost::shared_ptr<AsteriskSCF::Threading::WorkQueue::Work> > OperationMap;
 
 /**
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index 80d76ba..d50090b 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -34,7 +34,8 @@ public:
 
     // Overrides
     virtual void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
-	const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, const Ice::Current&)
+	const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, 
+	const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
     {
 	AsteriskSCF::SessionCommunications::V1::ConnectedIndicationPtr connected;
 
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 358e87a..7f904c0 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -43,7 +43,7 @@ public:
     {
 	AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped(new  AsteriskSCF::SessionCommunications::V1::StoppedIndication());
 	stopped->response = mResponse;
-	l->indicated(mMyProxy, stopped);
+	l->indicated(mMyProxy, stopped, AsteriskSCF::SessionCommunications::V1::SessionCookies());
     }
 
 private:
@@ -98,10 +98,10 @@ void MockSession::indicate_async(
 
     if ((connect = AsteriskSCF::SessionCommunications::V1::ConnectIndicationPtr::dynamicCast(indication)))
     {
-        for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
-        {
-            (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
-        }
+	for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
+	{
+	    (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication(), AsteriskSCF::SessionCommunications::V1::SessionCookies());
+	}
     }
     cb->ice_response();
 }
@@ -147,7 +147,7 @@ void MockSession::start(const Ice::Current&)
     for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
     {
         // Auto-answer!
-	(*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
+	(*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication(), AsteriskSCF::SessionCommunications::V1::SessionCookies());
     }
 }
 
diff --git a/test/MockSession.h b/test/MockSession.h
index 68b56cd..099b483 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -52,6 +52,16 @@ public:
     void removeListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&, const Ice::Current&);
     void start(const Ice::Current&);
     void stop(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&);
+    void removeBridge(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current &);
+    void setCookies(const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&) { };
+    void removeCookies(const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&) { };
+
+    AsteriskSCF::SessionCommunications::V1::SessionCookies getCookies(const AsteriskSCF::SessionCommunications::V1::SessionCookies&, const Ice::Current&)
+    {
+	AsteriskSCF::SessionCommunications::V1::SessionCookies cookies;
+	return cookies;
+    };
+
     void getBridge_async(
             const AsteriskSCF::SessionCommunications::V1::AMD_Session_getBridgePtr& cb,
             const Ice::Current &);

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list