[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Aug 20 11:38:38 CDT 2010
branch "master" has been updated
via 9ee27907e81c0afaabf44f56e368d4aef0484695 (commit)
via 91280888d06f56cc458e50f1be618766442e751d (commit)
from dd500675956796f68548d5e58856246ea8030992 (commit)
Summary of changes:
cmake | 2 +-
slice | 2 +-
src/BridgeFactoryImpl.cpp | 10 ++--
src/BridgeImpl.cpp | 13 ++--
src/BridgeImpl.h | 2 +-
test/TestBridging.cpp | 146 ++++++++++++++++++++++----------------------
6 files changed, 87 insertions(+), 88 deletions(-)
- Log -----------------------------------------------------------------
commit 9ee27907e81c0afaabf44f56e368d4aef0484695
Merge: 9128088 dd50067
Author: Ken Hunt <ken.hunt at digium.com>
Date: Fri Aug 20 11:37:10 2010 -0500
Merge branch 'master' into dev
Conflicts:
src/BridgeImpl.cpp
commit 91280888d06f56cc458e50f1be618766442e751d
Author: Ken Hunt <ken.hunt at digium.com>
Date: Fri Aug 20 11:30:14 2010 -0500
Added boost includes required for building on Windows to two cpp files.
Changed deviceId to destinationId in code, due to slice changes in
EndpointIf.
diff --git a/cmake b/cmake
index 6f93993..98cbf4a 160000
--- a/cmake
+++ b/cmake
@@ -1 +1 @@
-Subproject commit 6f939932a3c35300208434795e42f5edae14e259
+Subproject commit 98cbf4a0d71e2af47068d55a7bcbabf8616aff92
diff --git a/slice b/slice
index 1d3ca2a..e88ddfb 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit 1d3ca2a8bbaa340bf32e327c0e9d6db2f5dd3c1b
+Subproject commit e88ddfb27c75ef7e4315a598c9c2749052cc0f5b
diff --git a/src/BridgeFactoryImpl.cpp b/src/BridgeFactoryImpl.cpp
index 71cb584..d906927 100644
--- a/src/BridgeFactoryImpl.cpp
+++ b/src/BridgeFactoryImpl.cpp
@@ -1,5 +1,6 @@
#include "BridgeFactoryImpl.h"
#include <Ice/Ice.h>
+#include <boost/thread/locks.hpp>
namespace Hydra
{
@@ -88,17 +89,17 @@ Hydra::Core::Bridging::V1::BridgePrx Hydra::BridgeService::BridgeFactoryImpl::cr
}
else
{
- mLogger.getDebugStream() << __FUNCTION__ << ": id (" << t->id->endpointManagerId << ":" << t->id->deviceId << ") is invalid." << std::endl;
+ mLogger.getDebugStream() << __FUNCTION__ << ": id (" << t->id->endpointManagerId << ":" << t->id->destinationId << ") is invalid." << std::endl;
}
}
throw Hydra::Core::Endpoint::V1::InvalidEndpointId(t->id);
}
if(adminEp != 0 && adminEp->id != 0)
{
- if(adminEp->id->endpointManagerId == t->id->endpointManagerId && adminEp->id->deviceId == t->id->deviceId)
+ if(adminEp->id->endpointManagerId == t->id->endpointManagerId && adminEp->id->destinationId == t->id->destinationId)
{
mLogger.getDebugStream() << __FUNCTION__ << ": endpoint id collision between admin endpoint and initial endpoint set for id " <<
- adminEp->id->endpointManagerId << ":" << adminEp->id->deviceId << std::endl;
+ adminEp->id->endpointManagerId << ":" << adminEp->id->destinationId << std::endl;
throw Hydra::Core::Bridging::V1::EndpointCollision(adminEp->id, t->id);
}
}
@@ -107,10 +108,10 @@ Hydra::Core::Bridging::V1::BridgePrx Hydra::BridgeService::BridgeFactoryImpl::cr
//
for(Hydra::Session::V1::SessionEndpointSeq::const_iterator j = eps.begin(); j != eps.end(); ++j)
{
- if((*j)->id->endpointManagerId == t->id->endpointManagerId && (*j)->id->deviceId == t->id->deviceId)
+ if((*j)->id->endpointManagerId == t->id->endpointManagerId && (*j)->id->destinationId == t->id->destinationId)
{
mLogger.getDebugStream() << __FUNCTION__ << ": endpoint id collision between endpoints in initial endpoint set " <<
- t->id->endpointManagerId << ":" << t->id->deviceId << std::endl;
+ t->id->endpointManagerId << ":" << t->id->destinationId << std::endl;
throw Hydra::Core::Bridging::V1::EndpointCollision((*j)->id, t->id);
}
}
diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 356e7c6..d6f4ec7 100644
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -2,7 +2,7 @@
#include <System/Component/ComponentServiceIf.h>
#include <Ice/Ice.h>
#include <memory>
-
+#include <boost/thread/locks.hpp>
//
// TODO:
// Operations that are performed on all bridge endpoints might be better done as AMI requests.
@@ -143,14 +143,14 @@ void Hydra::BridgeService::BridgeImpl::addEndpoint(const Hydra::Core::Endpoint::
if(!checkEndpointId(*ep->id))
{
- mLogger.getDebugStream() << __FUNCTION__ << ": attempting to add endpoint with invalid id " << ep->id->endpointManagerId << ":" << ep->id->deviceId << "." << std::endl;
+ mLogger.getDebugStream() << __FUNCTION__ << ": attempting to add endpoint with invalid id " << ep->id->endpointManagerId << ":" << ep->id->destinationId << "." << std::endl;
throw Hydra::Core::Endpoint::V1::InvalidEndpointId(ep->id);
}
Hydra::Session::V1::SessionEndpointPtr newEndpoint(Hydra::Session::V1::SessionEndpointPtr::dynamicCast(ep));
if(!newEndpoint)
{
- mLogger.getDebugStream() << __FUNCTION__ << ": endpoint with id " << ep->id->endpointManagerId << ":" << ep->id->deviceId << " failed dynamic cast." << std::endl;
+ mLogger.getDebugStream() << __FUNCTION__ << ": endpoint with id " << ep->id->endpointManagerId << ":" << ep->id->destinationId << " failed dynamic cast." << std::endl;
throw Hydra::Core::Bridging::V1::UnsupportedEndpoint(ep->id);
}
boost::unique_lock<boost::shared_mutex> lock(mLock);
@@ -158,7 +158,7 @@ void Hydra::BridgeService::BridgeImpl::addEndpoint(const Hydra::Core::Endpoint::
Hydra::Session::V1::SessionEndpointSeq::iterator i = find(ep->id);
if(i != mEndpoints.end())
{
- mLogger.getDebugStream() << __FUNCTION__ << ": endpoint with id " << ep->id->endpointManagerId << ":" << ep->id->deviceId << " already registered." << std::endl;
+ mLogger.getDebugStream() << __FUNCTION__ << ": endpoint with id " << ep->id->endpointManagerId << ":" << ep->id->destinationId << " already registered." << std::endl;
throw Hydra::Core::Bridging::V1::EndpointAlreadyRegistered(ep->id);
}
@@ -327,14 +327,14 @@ void Hydra::BridgeService::BridgeImpl::statePreCheck()
Hydra::Session::V1::SessionEndpointSeq::iterator Hydra::BridgeService::BridgeImpl::find(const Core::Endpoint::V1::EndpointIdPtr& e)
{
- mLogger.getDebugStream() << __FUNCTION__ << ": searching endpoints for " << e->endpointManagerId << ":" << e->deviceId << "." << std::endl;
+ mLogger.getDebugStream() << __FUNCTION__ << ": searching endpoints for " << e->endpointManagerId << ":" << e->destinationId << "." << std::endl;
for(Hydra::Session::V1::SessionEndpointSeq::iterator i = mEndpoints.begin(); i != mEndpoints.end(); ++i)
{
- if(e->endpointManagerId == (*i)->id->endpointManagerId && e->deviceId == (*i)->id->deviceId)
+ if(e->endpointManagerId == (*i)->id->endpointManagerId && e->destinationId == (*i)->id->destinationId)
{
return i;
}
}
- mLogger.getDebugStream() << __FUNCTION__ << ": endpoint " << e->endpointManagerId << ":" << e->deviceId << " not found." << std::endl;
+ mLogger.getDebugStream() << __FUNCTION__ << ": endpoint " << e->endpointManagerId << ":" << e->destinationId << " not found." << std::endl;
return mEndpoints.end();
}
diff --git a/src/BridgeImpl.h b/src/BridgeImpl.h
index 1fcae60..08d21c5 100644
--- a/src/BridgeImpl.h
+++ b/src/BridgeImpl.h
@@ -15,7 +15,7 @@ namespace BridgeService
{
inline bool checkEndpointId(const Core::Endpoint::V1::EndpointId& e)
{
- if(e.endpointManagerId.size() == 0 || e.deviceId.size() == 0)
+ if(e.endpointManagerId.size() == 0 || e.destinationId.size() == 0)
{
return false;
}
diff --git a/test/TestBridging.cpp b/test/TestBridging.cpp
index 251f812..c4d0d2b 100644
--- a/test/TestBridging.cpp
+++ b/test/TestBridging.cpp
@@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(BridgeEndpointValidationAddInvalidType)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Core::Endpoint::V1::BaseEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
b->addEndpoint(p, dummy);
BOOST_CHECK("Should not have succeeded" == 0);
}
@@ -272,14 +272,14 @@ BOOST_AUTO_TEST_CASE(BridgeEndpointValidationAddValidTypeInvalidId)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "";
- p->id->deviceId = "";
+ p->id->destinationId = "";
b->addEndpoint(p, dummy);
BOOST_CHECK("Should not have succeeded" == 0);
}
catch(Hydra::Core::Endpoint::V1::InvalidEndpointId& ex)
{
BOOST_CHECK(ex.badId->endpointManagerId == "");
- BOOST_CHECK(ex.badId->deviceId == "");
+ BOOST_CHECK(ex.badId->destinationId == "");
}
}
catch(...)
@@ -308,7 +308,7 @@ BOOST_AUTO_TEST_CASE(BridgeEndpointAddValidTypeValidValue)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
b->addEndpoint(p, dummy);
BOOST_CHECK(true);
}
@@ -343,11 +343,11 @@ BOOST_AUTO_TEST_CASE(BridgeEndpointListEp)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
b->addEndpoint(p, dummy);
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = b->listEndpoints(dummy);
BOOST_CHECK(endpoints.size() == 1);
- BOOST_CHECK(endpoints.back()->id->endpointManagerId == "foo" && endpoints.back()->id->deviceId == "bar");
+ BOOST_CHECK(endpoints.back()->id->endpointManagerId == "foo" && endpoints.back()->id->destinationId == "bar");
}
catch(...)
{
@@ -381,13 +381,13 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithInvalidAdminEndpoint)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Core::Endpoint::V1::BaseEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(p, Hydra::Core::Endpoint::V1::EndpointSeq(), 0, dummy);
BOOST_CHECK("Should not have succeeded" == 0);
}
catch(const Hydra::Core::Bridging::V1::UnsupportedEndpoint& x)
{
- BOOST_CHECK(x.ep->endpointManagerId == "foo" && x.ep->deviceId == "bar");
+ BOOST_CHECK(x.ep->endpointManagerId == "foo" && x.ep->destinationId == "bar");
}
}
catch(...)
@@ -417,7 +417,7 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithInvalidAdminEndpointId)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "";
- p->id->deviceId = "";
+ p->id->destinationId = "";
Hydra::Core::Bridging::V1::BridgeMonitorPrx monitor;
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(p, Hydra::Core::Endpoint::V1::EndpointSeq(), 0, dummy);
BOOST_CHECK("Should not have succeeded" == 0);
@@ -451,12 +451,12 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithValidAdminEndpoint)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(p, Hydra::Core::Endpoint::V1::EndpointSeq(), 0, dummy);
BOOST_CHECK(b);
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = b->listEndpoints();
BOOST_CHECK(endpoints.size() == 1);
- BOOST_CHECK(endpoints.back()->id->endpointManagerId == "foo" && endpoints.back()->id->deviceId == "bar");
+ BOOST_CHECK(endpoints.back()->id->endpointManagerId == "foo" && endpoints.back()->id->destinationId == "bar");
}
catch(...)
{
@@ -508,7 +508,7 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryInitialEndpointInvalidType)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Core::Endpoint::V1::BaseEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq eps;
eps.push_back(p);
@@ -518,7 +518,7 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryInitialEndpointInvalidType)
}
catch(const Hydra::Core::Bridging::V1::UnsupportedEndpoint& ex)
{
- BOOST_CHECK(ex.ep->endpointManagerId == "foo" && ex.ep->deviceId == "bar");
+ BOOST_CHECK(ex.ep->endpointManagerId == "foo" && ex.ep->destinationId == "bar");
}
catch(...)
{
@@ -577,7 +577,7 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryInitialEndpointInvalidId)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq eps;
eps.push_back(p);
@@ -588,7 +588,7 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryInitialEndpointInvalidId)
catch(const Hydra::Core::Endpoint::V1::InvalidEndpointId& ex)
{
BOOST_CHECK(ex.badId != 0);
- BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->deviceId == "bar");
+ BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->destinationId == "bar");
}
catch(...)
{
@@ -614,14 +614,14 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithValidEndpoint)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq eps;
eps.push_back(p);
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(0, eps, 0, dummy);
BOOST_CHECK(b);
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = b->listEndpoints();
BOOST_CHECK(endpoints.size() == 1);
- BOOST_CHECK(endpoints.back()->id->endpointManagerId == "foo" && endpoints.back()->id->deviceId == "bar");
+ BOOST_CHECK(endpoints.back()->id->endpointManagerId == "foo" && endpoints.back()->id->destinationId == "bar");
}
catch(...)
{
@@ -647,20 +647,20 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithCollidingAdminAndInitialEndpoi
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(p, eps, 0, dummy);
BOOST_CHECK("Should not have succeeded." == 0);
}
catch(const Hydra::Core::Bridging::V1::EndpointCollision& ex)
{
- BOOST_CHECK(ex.first->endpointManagerId == "foo" && ex.first->deviceId == "bar");
- BOOST_CHECK(ex.second->endpointManagerId == "foo" && ex.second->deviceId == "bar");
+ BOOST_CHECK(ex.first->endpointManagerId == "foo" && ex.first->destinationId == "bar");
+ BOOST_CHECK(ex.second->endpointManagerId == "foo" && ex.second->destinationId == "bar");
}
catch(...)
{
@@ -686,21 +686,21 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithCollisions)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
eps.push_back(p);
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(0, eps, 0, dummy);
BOOST_CHECK("Should not have succeeded." == 0);
}
catch(const Hydra::Core::Bridging::V1::EndpointCollision& ex)
{
- BOOST_CHECK(ex.first->endpointManagerId == "foo" && ex.first->deviceId == "bar");
- BOOST_CHECK(ex.second->endpointManagerId == "foo" && ex.second->deviceId == "bar");
+ BOOST_CHECK(ex.first->endpointManagerId == "foo" && ex.first->destinationId == "bar");
+ BOOST_CHECK(ex.second->endpointManagerId == "foo" && ex.second->destinationId == "bar");
}
catch(...)
{
@@ -726,23 +726,23 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithValidInitialSet)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo1";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar1";
+ p->id->destinationId = "bar1";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "fooa";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Core::Bridging::V1::BridgePrx b = factory->createBridge(p, eps, 0, dummy);
BOOST_CHECK(b);
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = b->listEndpoints();
@@ -757,15 +757,15 @@ BOOST_AUTO_TEST_CASE(BridgeFactoryCreateBridgeWithValidInitialSet)
for(Hydra::Core::Endpoint::V1::EndpointSeq::const_iterator i = eps.begin(); i != eps.end(); ++i, ++j)
{
BOOST_CHECK((*i)->id->endpointManagerId == (*j)->id->endpointManagerId);
- BOOST_CHECK((*i)->id->deviceId == (*j)->id->deviceId);
+ BOOST_CHECK((*i)->id->destinationId == (*j)->id->destinationId);
Hydra::Session::V1::SessionEndpointPtr sp(Hydra::Session::V1::SessionEndpointPtr::dynamicCast(*j));
BOOST_CHECK(sp);
}
}
catch(const Hydra::Core::Bridging::V1::EndpointCollision& ex)
{
- BOOST_CHECK(ex.first->endpointManagerId == "foo" && ex.first->deviceId == "bar");
- BOOST_CHECK(ex.second->endpointManagerId == "foo" && ex.second->deviceId == "bar");
+ BOOST_CHECK(ex.first->endpointManagerId == "foo" && ex.first->destinationId == "bar");
+ BOOST_CHECK(ex.second->endpointManagerId == "foo" && ex.second->destinationId == "bar");
}
catch(...)
{
@@ -790,29 +790,29 @@ BOOST_AUTO_TEST_CASE(BridgeAddEndpoint)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Session::V1::SessionEndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo1";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar1";
+ p->id->destinationId = "bar1";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "fooa";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::BridgeService::BridgeImplPtr bridge(new Hydra::BridgeService::BridgeImpl(p, eps, 0, 0));
eps.insert(eps.begin(), p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo2";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p, dummy);
eps.push_back(p);
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = bridge->listEndpoints(dummy);
@@ -826,7 +826,7 @@ BOOST_AUTO_TEST_CASE(BridgeAddEndpoint)
for(Hydra::Session::V1::SessionEndpointSeq::const_iterator i = eps.begin(); i != eps.end(); ++i, ++j)
{
BOOST_CHECK((*i)->id->endpointManagerId == (*j)->id->endpointManagerId);
- BOOST_CHECK((*i)->id->deviceId == (*j)->id->deviceId);
+ BOOST_CHECK((*i)->id->destinationId == (*j)->id->destinationId);
Hydra::Session::V1::SessionEndpointPtr sp(Hydra::Session::V1::SessionEndpointPtr::dynamicCast(*j));
BOOST_CHECK(sp);
}
@@ -854,36 +854,36 @@ BOOST_AUTO_TEST_CASE(BridgeAddEndpointAlreadyRegistered)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Session::V1::SessionEndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo1";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar1";
+ p->id->destinationId = "bar1";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "fooa";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::BridgeService::BridgeImplPtr bridge(new Hydra::BridgeService::BridgeImpl(p, eps, 0, 0));
eps.insert(eps.begin(), p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
try
{
bridge->addEndpoint(p, dummy);
}
catch(const Hydra::Core::Bridging::V1::EndpointAlreadyRegistered& ex)
{
- BOOST_CHECK(ex.ep->endpointManagerId == "foo" && ex.ep->deviceId == "bar");
+ BOOST_CHECK(ex.ep->endpointManagerId == "foo" && ex.ep->destinationId == "bar");
}
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = bridge->listEndpoints(dummy);
@@ -897,7 +897,7 @@ BOOST_AUTO_TEST_CASE(BridgeAddEndpointAlreadyRegistered)
for(Hydra::Session::V1::SessionEndpointSeq::const_iterator i = eps.begin(); i != eps.end(); ++i, ++j)
{
BOOST_CHECK((*i)->id->endpointManagerId == (*j)->id->endpointManagerId);
- BOOST_CHECK((*i)->id->deviceId == (*j)->id->deviceId);
+ BOOST_CHECK((*i)->id->destinationId == (*j)->id->destinationId);
Hydra::Session::V1::SessionEndpointPtr sp(Hydra::Session::V1::SessionEndpointPtr::dynamicCast(*j));
BOOST_CHECK(sp);
}
@@ -927,13 +927,13 @@ BOOST_AUTO_TEST_CASE(BridgeAddInvalidEndpoint)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Core::Endpoint::V1::BaseEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "foo";
+ p->id->destinationId = "foo";
bridge->addEndpoint(p, dummy);
BOOST_CHECK("Should not have succeeded." == 0);
}
catch(const Hydra::Core::Bridging::V1::UnsupportedEndpoint& ex)
{
- BOOST_CHECK(ex.ep->endpointManagerId == "foo" && ex.ep->deviceId == "foo");
+ BOOST_CHECK(ex.ep->endpointManagerId == "foo" && ex.ep->destinationId == "foo");
}
catch(...)
{
@@ -960,13 +960,13 @@ BOOST_AUTO_TEST_CASE(BridgeAddInvalidId1)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "";
- p->id->deviceId = "";
+ p->id->destinationId = "";
bridge->addEndpoint(p, dummy);
BOOST_CHECK("Should not have succeeded." == 0);
}
catch(const Hydra::Core::Endpoint::V1::InvalidEndpointId& ex)
{
- BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->deviceId.size() == 0);
+ BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->destinationId.size() == 0);
}
catch(...)
{
@@ -996,7 +996,7 @@ BOOST_AUTO_TEST_CASE(BridgeAddInvalidId2)
}
catch(const Hydra::Core::Endpoint::V1::InvalidEndpointId& ex)
{
- BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->deviceId.size() == 0);
+ BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->destinationId.size() == 0);
}
catch(...)
{
@@ -1021,28 +1021,28 @@ BOOST_AUTO_TEST_CASE(BridgeRemoveEndpoint)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Session::V1::SessionEndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo1";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar1";
+ p->id->destinationId = "bar1";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "fooa";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::BridgeService::BridgeImplPtr bridge(new Hydra::BridgeService::BridgeImpl(p, eps, 0, 0));
eps.insert(eps.begin(), p);
Hydra::Core::Endpoint::V1::EndpointIdPtr id(new Hydra::Core::Endpoint::V1::EndpointId);
id->endpointManagerId = "foo1";
- id->deviceId = "bar";
+ id->destinationId = "bar";
Hydra::Core::Endpoint::V1::EndpointSeq endpoints = bridge->listEndpoints(dummy);
BOOST_CHECK(endpoints.size() == 4);
bridge->removeEndpoint(id, dummy);
@@ -1056,7 +1056,7 @@ BOOST_AUTO_TEST_CASE(BridgeRemoveEndpoint)
//
for(Hydra::Core::Endpoint::V1::EndpointSeq::const_iterator j = endpoints.begin(); j != endpoints.end(); ++j)
{
- BOOST_CHECK((*j)->id->endpointManagerId != id->endpointManagerId || (*j)->id->deviceId != id->deviceId);
+ BOOST_CHECK((*j)->id->endpointManagerId != id->endpointManagerId || (*j)->id->destinationId != id->destinationId);
}
}
catch(...)
@@ -1082,33 +1082,33 @@ BOOST_AUTO_TEST_CASE(BridgeRemoveEndpointUnknownEndpoint)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::Session::V1::SessionEndpointSeq eps;
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo1";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar1";
+ p->id->destinationId = "bar1";
eps.push_back(p);
p = new Hydra::Session::V1::SessionEndpoint;
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "fooa";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
Hydra::BridgeService::BridgeImplPtr bridge(new Hydra::BridgeService::BridgeImpl(p, eps, 0, 0 ));
Hydra::Core::Endpoint::V1::EndpointIdPtr id(new Hydra::Core::Endpoint::V1::EndpointId);
id->endpointManagerId = "foo1";
- id->deviceId = "unknown";
+ id->destinationId = "unknown";
bridge->removeEndpoint(id, dummy);
BOOST_CHECK("Should not have succeeded." == 0);
}
catch(const Hydra::Core::Bridging::V1::UnknownEndpoint& ex)
{
- BOOST_CHECK(ex.ep->endpointManagerId == "foo1" && ex.ep->deviceId == "unknown");
+ BOOST_CHECK(ex.ep->endpointManagerId == "foo1" && ex.ep->destinationId == "unknown");
}
catch(...)
{
@@ -1163,13 +1163,13 @@ BOOST_AUTO_TEST_CASE(BridgeRemoveEndpointInvalidId)
Hydra::BridgeService::BridgeImplPtr bridge(new Hydra::BridgeService::BridgeImpl(0, eps, 0, 0));
Hydra::Core::Endpoint::V1::EndpointIdPtr id(new Hydra::Core::Endpoint::V1::EndpointId);
id->endpointManagerId = "";
- id->deviceId = "";
+ id->destinationId = "";
bridge->removeEndpoint(id, dummy);
BOOST_CHECK("Should not have succeeded." == 0);
}
catch(const Hydra::Core::Endpoint::V1::InvalidEndpointId& ex)
{
- BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->deviceId.size() == 0);
+ BOOST_CHECK(ex.badId->endpointManagerId.size() == 0 && ex.badId->destinationId.size() == 0);
}
catch(...)
{
@@ -1217,7 +1217,7 @@ BOOST_AUTO_TEST_CASE(BridgeOperationsAfterShutdown)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p, dummy);
BOOST_CHECK("should not have succeeded." == 0);
}
@@ -1229,7 +1229,7 @@ BOOST_AUTO_TEST_CASE(BridgeOperationsAfterShutdown)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->removeEndpoint(p->id, dummy);
BOOST_CHECK("should not have succeeded." == 0);
}
@@ -1249,7 +1249,7 @@ BOOST_AUTO_TEST_CASE(BridgeOperationsAfterShutdown)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Core::Endpoint::V1::BaseEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p, dummy);
BOOST_CHECK("should not have succeeded." == 0);
}
@@ -1321,7 +1321,7 @@ BOOST_AUTO_TEST_CASE(BridgeOperationsAfterDestroy)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p, dummy);
BOOST_CHECK("should not have succeeded." == 0);
}
@@ -1333,7 +1333,7 @@ BOOST_AUTO_TEST_CASE(BridgeOperationsAfterDestroy)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->removeEndpoint(p->id, dummy);
BOOST_CHECK("should not have succeeded." == 0);
}
@@ -1353,7 +1353,7 @@ BOOST_AUTO_TEST_CASE(BridgeOperationsAfterDestroy)
Hydra::Core::Endpoint::V1::BaseEndpointPtr p(new Hydra::Core::Endpoint::V1::BaseEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p, dummy);
BOOST_CHECK("should not have succeeded." == 0);
}
@@ -1469,7 +1469,7 @@ BOOST_AUTO_TEST_CASE(BridgeFactorySuspendedState)
}
catch(const Hydra::Core::Bridging::V1::UnsupportedEndpoint& x)
{
- BOOST_CHECK(x.ep->endpointManagerId == "foo" && x.ep->deviceId == "bar");
+ BOOST_CHECK(x.ep->endpointManagerId == "foo" && x.ep->destinationId == "bar");
}
}
catch(...)
@@ -1503,7 +1503,7 @@ BOOST_AUTO_TEST_CASE(BridgeEvents)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p);
BOOST_CHECK(subServant->getLastAdded() != 0 && subServant->getLastAdded()->id->endpointManagerId == "foo");
bridge->removeEndpoint(p->id);
@@ -1542,7 +1542,7 @@ BOOST_AUTO_TEST_CASE(BridgeMonitor)
Hydra::Session::V1::SessionEndpointPtr p(new Hydra::Session::V1::SessionEndpoint);
p->id = new Hydra::Core::Endpoint::V1::EndpointId;
p->id->endpointManagerId = "foo";
- p->id->deviceId = "bar";
+ p->id->destinationId = "bar";
bridge->addEndpoint(p);
bridge->removeEndpoint(p->id);
bridge->shutdown();
-----------------------------------------------------------------------
--
asterisk-scf/integration/bridging.git
More information about the asterisk-scf-commits
mailing list