[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
Wed Aug 10 19:15:30 CDT 2011


branch "master" has been updated
       via  6aa3e3ccdd378af050a1fd101483ff294f8ea05d (commit)
      from  d385c84a1e71127cf0df930af45e244a6930a5e3 (commit)

Summary of changes:
 test/CMakeLists.txt          |    2 ++
 test/MockSessionEndpoint.cpp |   29 +++++++++++++++++++++++++++++
 test/MockSessionEndpoint.h   |   15 ++++++++++++++-
 3 files changed, 45 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 6aa3e3ccdd378af050a1fd101483ff294f8ea05d
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed Aug 10 19:14:48 2011 -0500

    Updates to account for changes to the SessionEndpoint API for default session cookies and listeners.

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 49d760c..a3c697d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,5 @@
 include_directories(${astscf-ice-util-cpp_dir}/include)
+include_directories(${logger_dir}/include)
 
 astscf_component_init(RoutingTest)
 astscf_component_add_files(RoutingTest TestRouting.cpp)
@@ -18,3 +19,4 @@ astscf_component_add_boost_libraries(RoutingTest unit_test_framework)
 astscf_component_add_slice_collection_libraries(RoutingTest ASTSCF)
 astscf_component_build_icebox(RoutingTest)
 astscf_test_icebox(RoutingTest config/routingtest.conf)
+target_link_libraries(RoutingTest astscf-ice-util-cpp)
diff --git a/test/MockSessionEndpoint.cpp b/test/MockSessionEndpoint.cpp
index 8bf3f85..06e5992 100644
--- a/test/MockSessionEndpoint.cpp
+++ b/test/MockSessionEndpoint.cpp
@@ -28,6 +28,13 @@ namespace AsteriskSCF
 namespace RoutingTest
 {
 
+MockSessionEndpoint::MockSessionEndpoint(const std::string& id) :
+    mId(id), 
+    mCounter(0),
+    mDefaultSessionListeners(SharedTestData::instance.adapterIn, "MockSessionDefaultListeners")  
+{
+}
+
 SessionPrx MockSessionEndpoint::createSession(const string& dest, const SessionListenerPrx&, const Ice::Current&)
 {
     string sessionId = dest + "_" + mId + "_" + boost::lexical_cast<string>(++mCounter);
@@ -56,6 +63,28 @@ void MockSessionEndpoint::setProxy(const SessionEndpointPrx& proxy)
     mProxy = proxy;
 }
 
+void MockSessionEndpoint::addDefaultSessionListener(const SessionListenerPrx& listener, const Ice::Current& current)
+{
+    mDefaultSessionListeners.add(listener);
+}
+
+void MockSessionEndpoint::removeDefaultSessionListener(const SessionListenerPrx& listener, const Ice::Current&)
+{
+    mDefaultSessionListeners.remove(listener);
+}
+
+void MockSessionEndpoint::addDefaultSessionCookies(
+        const AsteriskSCF::SessionCommunications::V1::SessionCookies& cookies,
+        const Ice::Current&)
+{
+}
+
+void MockSessionEndpoint::removeDefaultSessionCookies(
+        const AsteriskSCF::SessionCommunications::V1::SessionCookies& cookies,
+        const Ice::Current&)
+{
+}
+
 void MockSessionEndpoint::perTestCleanup()
 {
     for(SessionSeq::iterator i = mSessionPrxList.begin(); i != mSessionPrxList.end(); ++i)
diff --git a/test/MockSessionEndpoint.h b/test/MockSessionEndpoint.h
index 55a2de6..d83bb3b 100644
--- a/test/MockSessionEndpoint.h
+++ b/test/MockSessionEndpoint.h
@@ -17,6 +17,7 @@
 
 #include <Ice/Ice.h>
 #include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.h>
+#include <AsteriskSCF/Collections/Set.h>
 #include "MockSession.h"
 
 namespace AsteriskSCF
@@ -31,7 +32,7 @@ class MockSessionEndpoint : public AsteriskSCF::SessionCommunications::V1::Sessi
 {
 public:
     // Constructors
-    MockSessionEndpoint(const std::string& id) : mId(id), mCounter(0) {}
+    MockSessionEndpoint(const std::string& id);
 
 public:
     // Overrides
@@ -39,6 +40,17 @@ public:
     AsteriskSCF::SessionCommunications::V1::SessionPrx createSession(const std::string& dest, const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&);
     AsteriskSCF::SessionCommunications::V1::SessionSeq getSessions(const Ice::Current&);
 
+    void addDefaultSessionListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, 
+           const Ice::Current& current);
+    void removeDefaultSessionListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, 
+           const Ice::Current&);
+    void addDefaultSessionCookies(
+          const AsteriskSCF::SessionCommunications::V1::SessionCookies& cookies,
+          const Ice::Current&);
+    void removeDefaultSessionCookies(
+          const AsteriskSCF::SessionCommunications::V1::SessionCookies& cookies,
+          const Ice::Current&);
+
 public:
     // Implementation
 
@@ -52,6 +64,7 @@ private:
     std::string mId;
     AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx mProxy;
     int mCounter;
+    AsteriskSCF::Collections::ProxySet<AsteriskSCF::SessionCommunications::V1::SessionListenerPrx> mDefaultSessionListeners;
 };
 typedef IceUtil::Handle<MockSessionEndpoint> MockSessionEndpointPtr;
 

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list