[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "indicate" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Apr 7 09:29:37 CDT 2011
branch "indicate" has been updated
via 6e3878b6a12ac333e817284504896984dd7bc3ee (commit)
from 8a97cd195db2ea12f4dc30494eb4e5968063126e (commit)
Summary of changes:
src/SessionRouter.cpp | 58 ++++++++++++++----------------------------------
test/MockBridge.cpp | 29 ------------------------
test/MockSession.cpp | 28 -----------------------
test/MockSession.h | 6 -----
4 files changed, 17 insertions(+), 104 deletions(-)
- Log -----------------------------------------------------------------
commit 6e3878b6a12ac333e817284504896984dd7bc3ee
Author: Joshua Colp <jcolp at digium.com>
Date: Thu Apr 7 11:32:43 2011 -0300
Remove old code.
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 71146f5..dfeb38c 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -122,61 +122,37 @@ 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&)
+ void indicated(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session,
+ const AsteriskSCF::SessionCommunications::V1::IndicationPtr& indication, 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&)
- {
- }
-
- void flashed(const SessionPrx& session, const Ice::Current&)
- {
- }
-
- void held(const SessionPrx& session, const Ice::Current&)
- {
- }
-
- void progressing(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
- {
- }
+ AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr stopped;
- void ringing(const SessionPrx& session, const Ice::Current&)
- {
- }
-
- void stopped(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr& responseCode, const Ice::Current&)
- {
- mTerminated = true;
+ if ((stopped = AsteriskSCF::SessionCommunications::V1::StoppedIndicationPtr::dynamicCast(indication)))
+ {
+ mTerminated = true;
- SessionSeq cacheSessions;
- {
- boost::shared_lock<boost::shared_mutex> lock(mLock);
- cacheSessions = mSessions;
- }
+ SessionSeq cacheSessions;
+ {
+ boost::shared_lock<boost::shared_mutex> lock(mLock);
+ cacheSessions = mSessions;
+ }
- // Forward the stop message to all sessions other than the one that originally sent it.
- for(SessionSeq::iterator s = cacheSessions.begin(); s != cacheSessions.end(); ++s)
- {
+ // Forward the stop message to all sessions other than the one that originally sent it.
+ for(SessionSeq::iterator s = cacheSessions.begin(); s != cacheSessions.end(); ++s)
+ {
try
{
if (session->ice_getIdentity() != (*s)->ice_getIdentity())
{
- (*s)->stop(responseCode);
+ (*s)->stop(stopped->response);
}
}
catch(const Ice::Exception &e)
{
lg(Error) << "Session Listener unable to forward stop to session " << (*s)->ice_toString() << " due to " << e.what();
}
- }
-
- }
-
- void unheld(const SessionPrx& session, const Ice::Current&)
- {
+ }
+ }
}
public:
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index 1f026a2..14f5a5d 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -44,35 +44,6 @@ public:
}
}
- virtual void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session, const Ice::Current&)
- {
- mBridge->connected(session);
- }
-
- virtual void flashed(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
- {
- }
-
- virtual void held(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
- {
- }
-
- virtual void progressing(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
- {
- }
-
- virtual void ringing(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
- {
- }
-
- virtual void stopped(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
- {
- }
-
- virtual void unheld(const AsteriskSCF::SessionCommunications::V1::SessionPrx&, const Ice::Current&)
- {
- }
-
private:
MockBridge *mBridge;
};
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index ffe3b4e..be48767 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -95,18 +95,6 @@ void MockSession::indicate(const AsteriskSCF::SessionCommunications::V1::Indicat
}
}
-void MockSession::connect(const Ice::Current&)
-{
- for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
- {
- (*i)->indicated(mMyPrx, new AsteriskSCF::SessionCommunications::V1::ConnectedIndication());
- }
-}
-
-void MockSession::flash(const Ice::Current&)
-{
-}
-
SessionEndpointPrx MockSession::getEndpoint(const Ice::Current&)
{
return mEndpointPrx;
@@ -123,14 +111,6 @@ AsteriskSCF::Media::V1::SessionPrx MockSession::getMediaSession(const Ice::Curre
return 0;
}
-void MockSession::hold(const Ice::Current&)
-{
-}
-
-void MockSession::progress(const ResponseCodePtr&, const Ice::Current&)
-{
-}
-
void MockSession::removeListener(const SessionListenerPrx& listener, const Ice::Current&)
{
for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
@@ -143,10 +123,6 @@ void MockSession::removeListener(const SessionListenerPrx& listener, const Ice::
}
}
-void MockSession::ring(const Ice::Current&)
-{
-}
-
void MockSession::start(const Ice::Current&)
{
cout << "Session started." << endl;
@@ -165,10 +141,6 @@ void MockSession::stop(const ResponseCodePtr& response, const Ice::Current&)
std::for_each(mListeners.begin(), mListeners.end(), SendStop(mMyPrx, response));
}
-void MockSession::unhold(const Ice::Current&)
-{
-}
-
void MockSession::setProxy(const SessionPrx& sessionPrx)
{
mMyPrx = sessionPrx;
diff --git a/test/MockSession.h b/test/MockSession.h
index 3038d5f..df4b5cf 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -34,18 +34,12 @@ public:
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&);
AsteriskSCF::SessionCommunications::V1::SessionInfoPtr getInfo(const Ice::Current&);
AsteriskSCF::Media::V1::SessionPrx getMediaSession(const Ice::Current&);
- void hold(const Ice::Current&);
- void progress(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&);
void removeListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx&, const Ice::Current&);
- void ring(const Ice::Current&);
void start(const Ice::Current&);
void stop(const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&);
- void unhold(const Ice::Current&);
AsteriskSCF::SessionCommunications::V1::BridgePrx getBridge(const Ice::Current &);
AsteriskSCF::SessionCommunications::V1::SessionInfoPtr setBridge(const AsteriskSCF::SessionCommunications::V1::BridgePrx& bridge, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current &);
void removeBridge(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current &);
-----------------------------------------------------------------------
--
asterisk-scf/integration/routing.git
More information about the asterisk-scf-commits
mailing list