[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "partyidhook" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Sep 29 17:48:13 CDT 2011
branch "partyidhook" has been created
at baeedb5c65d0a341f14cbae68fbc7731d92a0de7 (commit)
- Log -----------------------------------------------------------------
commit baeedb5c65d0a341f14cbae68fbc7731d92a0de7
Author: Ken Hunt <ken.hunt at digium.com>
Date: Thu Sep 29 17:47:51 2011 -0500
Incorporate review feedback.
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 38d3462..0a79a7c 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -88,7 +88,10 @@ MockSession::MockSession(const string& legId,
idSeq2.push_back(connectedId);
mConnectedLine = new ConnectedLine(idSeq2);
- mRedirecting = new Redirecting(dialedId, connectedId, 1);
+ RedirectionSeq redirects;
+ RedirectionPtr redirect = new Redirection(dialedId, connectedId);
+ redirects.push_back(redirect);
+ mRedirections = new Redirections(redirects);
}
MockSession::~MockSession()
@@ -239,9 +242,9 @@ void MockSession::getConnectedLine_async(const AMD_Session_getConnectedLinePtr&
cb->ice_response(mConnectedLine);
}
-void MockSession::getRedirecting_async(const AMD_Session_getRedirectingPtr& cb, const Ice::Current& )
+void MockSession::getRedirections_async(const AMD_Session_getRedirectionsPtr& cb, const Ice::Current& )
{
- cb->ice_response(mRedirecting);
+ cb->ice_response(mRedirections);
}
/**
diff --git a/test/MockSession.h b/test/MockSession.h
index f60ae98..00026f5 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -100,7 +100,7 @@ public:
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,
+ void getRedirections_async(const AsteriskSCF::SessionCommunications::V1::AMD_Session_getRedirectionsPtr& cb,
const Ice::Current& );
public:
@@ -128,7 +128,7 @@ private:
AsteriskSCF::SessionCommunications::PartyIdentification::V1::CallerPtr mCaller;
AsteriskSCF::SessionCommunications::PartyIdentification::V1::DialedPtr mDialed;
AsteriskSCF::SessionCommunications::PartyIdentification::V1::ConnectedLinePtr mConnectedLine;
- AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectingPtr mRedirecting;
+ AsteriskSCF::SessionCommunications::PartyIdentification::V1::RedirectionsPtr mRedirections;
};
typedef IceUtil::Handle<MockSession> MockSessionPtr;
commit 93333b0292c2b4ebab094121c2a4ced16026ad63
Author: Ken Hunt <ken.hunt at digium.com>
Date: Sun Sep 11 22:50:48 2011 -0500
Support changes made to API for Media Session cookie support.
diff --git a/test/MockSession.h b/test/MockSession.h
index 990e653..f60ae98 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -56,10 +56,13 @@ public:
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&)
+ void getCookies_async(
+ const AsteriskSCF::SessionCommunications::V1::AMD_Session_getCookiesPtr& cb,
+ const AsteriskSCF::SessionCommunications::V1::SessionCookies&,
+ const Ice::Current&)
{
AsteriskSCF::SessionCommunications::V1::SessionCookies cookies;
- return cookies;
+ cb->ice_response(cookies);
};
void getBridge_async(
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/integration/routing.git
More information about the asterisk-scf-commits
mailing list