[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
Sun Sep 11 21:44:31 CDT 2011


branch "master" has been updated
       via  1072e384835ab7fb56ad5b7af6603e11875e47ee (commit)
      from  0fccd642fced2875e655ed443af8dd04a553d247 (commit)

Summary of changes:
 test/MockSession.cpp |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 test/MockSession.h   |   16 ++++++++++++++++
 2 files changed, 66 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 1072e384835ab7fb56ad5b7af6603e11875e47ee
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Sun Sep 11 21:41:52 2011 -0500

    Support API changes made for Pary Identification.

diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 319eff5..38d3462 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -20,6 +20,7 @@
 #include "SharedTestData.h"
 
 using namespace AsteriskSCF::SessionCommunications::V1;
+using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
 using namespace std;
 
 namespace AsteriskSCF
@@ -63,6 +64,31 @@ MockSession::MockSession(const string& legId,
       mBridgePrx(0)
 {
     mSessionInfo->role = legId; // for testing
+
+    NamePtr name = new Name("bar");
+    NumberPtr number = new Number("100");
+    IdPtr testId = new Id(name, number);
+    IdSeq idSeq;
+    idSeq.push_back(testId);
+    mCaller = new Caller(idSeq);
+
+    mSessionOwnerId = new SessionOwnerId(idSeq);
+
+    NamePtr dialedName = new Name("foo");
+    NumberPtr dialedNumber = new Number("104");
+    IdPtr dialedId = new Id(dialedName, dialedNumber);
+    IdSeq dialedSeq;
+    dialedSeq.push_back(dialedId);
+    mDialed = new Dialed(dialedNumber);
+
+    NamePtr redirName = new Name("scud");
+    NumberPtr redirNumber = new Number("666");
+    IdPtr connectedId = new Id(redirName, redirNumber);
+    IdSeq idSeq2;
+    idSeq2.push_back(connectedId);
+    mConnectedLine = new ConnectedLine(idSeq2);
+
+        mRedirecting = new Redirecting(dialedId, connectedId, 1);
 }
 
 MockSession::~MockSession()
@@ -193,6 +219,30 @@ void MockSession::removeSessionController_async(
     cb->ice_response();
 }
 
+void MockSession::getCaller_async(const AMD_Session_getCallerPtr& cb, const Ice::Current&)
+{
+    cb->ice_response(mCaller);
+}
+
+void MockSession::getDialed_async(const AMD_Session_getDialedPtr& cb, const Ice::Current&)
+{
+    cb->ice_response(mDialed);
+}
+
+void MockSession::getSessionOwnerId_async(const AMD_Session_getSessionOwnerIdPtr& cb, const ::Ice::Current&)
+{
+    cb->ice_response(mSessionOwnerId);
+}
+
+void MockSession::getConnectedLine_async(const AMD_Session_getConnectedLinePtr& cb, const ::Ice::Current&)
+{
+    cb->ice_response(mConnectedLine);
+}
+
+void MockSession::getRedirecting_async(const AMD_Session_getRedirectingPtr& cb, const Ice::Current& )
+{
+    cb->ice_response(mRedirecting);
+}
 
 /**
  * We're not actually dispatching this AMD
diff --git a/test/MockSession.h b/test/MockSession.h
index 55b821a..990e653 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -89,6 +89,17 @@ public:
         const AsteriskSCF::SessionCommunications::V1::SessionControllerPrx&,
         const Ice::Current&);
 
+    void getCaller_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getCallerPtr& cb, 
+                         const Ice::Current&);
+    void getDialed_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getDialedPtr& cb, 
+                         const Ice::Current&);
+    void getSessionOwnerId_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getSessionOwnerIdPtr& cb, 
+                            const ::Ice::Current&);
+    void getConnectedLine_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getConnectedLinePtr& cb,  
+                                const ::Ice::Current&);
+    void getRedirecting_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getRedirectingPtr& cb, 
+                              const Ice::Current& );
+
 public:
     void setProxy(const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionPrx);
     const std::string& getId() const {return mId;}
@@ -110,6 +121,11 @@ private:
     bool mBridgeSet;
     bool mBridgeReplaced;
     AsteriskSCF::SessionCommunications::V1::BridgePrx mBridgePrx;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::SessionOwnerIdPtr  mSessionOwnerId;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr mCaller;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::DialedPtr mDialed;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr mConnectedLine;
+    AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectingPtr mRedirecting;
 };
 typedef IceUtil::Handle<MockSession> MockSessionPtr;
 

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list