[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Nov 15 14:10:52 CST 2010
branch "master" has been updated
via 9aad91812cb36d4f1f4fc3cc3880b6d1f1756706 (commit)
from eb3fef246bad025b1200c8961233d478c08ae062 (commit)
Summary of changes:
src/BasicRoutingServiceApp.cpp | 68 +++++++-------
src/BridgeManagerAccessor.cpp | 18 ++--
src/BridgeManagerAccessor.h | 6 +-
src/EndpointRegistry.cpp | 58 ++++++------
src/EndpointRegistry.h | 44 +++++-----
src/LuaScriptProcessor.cpp | 26 +++---
src/LuaScriptProcessor.h | 4 +-
src/RoutingAdmin.cpp | 20 ++--
src/RoutingAdmin.h | 10 +-
src/RoutingServiceEventPublisher.cpp | 36 ++++----
src/RoutingServiceEventPublisher.h | 38 ++++----
src/ScriptProcessor.h | 2 +-
src/SessionRouter.cpp | 160 +++++++++++++++++-----------------
src/SessionRouter.h | 44 +++++-----
test/MockBridge.cpp | 42 +++++-----
test/MockBridge.h | 8 +-
test/MockBridgeManager.cpp | 4 +-
test/MockEndpointLocator.cpp | 4 +-
test/MockEndpointLocator.h | 2 +-
test/MockSession.cpp | 36 ++++----
test/MockSession.h | 2 +-
test/MockSessionEndpoint.cpp | 2 +-
test/SharedTestData.h | 8 +-
test/TestRouting.cpp | 72 ++++++++--------
24 files changed, 357 insertions(+), 357 deletions(-)
- Log -----------------------------------------------------------------
commit 9aad91812cb36d4f1f4fc3cc3880b6d1f1756706
Author: David M. Lee <dlee at digium.com>
Date: Mon Nov 15 14:03:38 2010 -0600
Updated indentation to match the style guide.
diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 5909e74..6b2684e 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -53,15 +53,15 @@ namespace BasicRoutingService
class BasicRoutingServiceApp : public IceBox::Service
{
-public:
+public:
BasicRoutingServiceApp() :
- mDone(false), mInitialized(false), mRunning(false)
+ mDone(false), mInitialized(false), mRunning(false)
{
}
~BasicRoutingServiceApp()
{
- // Smart pointers do your thing.
+ // Smart pointers do your thing.
mSessionRouter = 0;
mAdminInteface = 0;
mComponentService = 0;
@@ -116,14 +116,14 @@ static const string ComponentServiceId("BasicRoutingComponent");
static const string SessionRouterObjectId("SessionRouter");
/**
- * This class provides implementation for the ComponentService interface.
- * Every Asterisk SCF component is expected to expose the ComponentService interface.
+ * This class provides implementation for the ComponentService interface.
+ * Every Asterisk SCF component is expected to expose the ComponentService interface.
*/
class ComponentServiceImpl : public ComponentService
{
public:
- ComponentServiceImpl(BasicRoutingServiceApp &app) :
- mApp(app)
+ ComponentServiceImpl(BasicRoutingServiceApp &app) :
+ mApp(app)
{
}
@@ -133,7 +133,7 @@ public: // Overrides of the ComponentService interface.
mApp.suspend();
}
- void resume(const Ice::Current&)
+ void resume(const Ice::Current&)
{
mApp.resume();
}
@@ -149,7 +149,7 @@ private:
/**
* Helper function to add some parameters to one of our registered interfaces in the ServiceLocator, so that
- * other components can look up our interfaces.
+ * other components can look up our interfaces.
*/
void BasicRoutingServiceApp::setCategory(const Discovery::V1::ServiceManagementPrx& serviceManagement, const string& category)
{
@@ -160,15 +160,15 @@ void BasicRoutingServiceApp::setCategory(const Discovery::V1::ServiceManagementP
}
/**
- * Register this component's primary public interfaces with the Service Locator.
- * This enables other Asterisk SCF components to locate the interfaces we are publishing.
+ * Register this component's primary public interfaces with the Service Locator.
+ * This enables other Asterisk SCF components to locate the interfaces we are publishing.
*/
void BasicRoutingServiceApp::registerWithServiceLocator()
{
try
{
// Get a proxy to the management interface for the Service Locator, so we can add ourselves into the system discovery mechanisms.
- mServiceLocatorManagement = ServiceLocatorManagementPrx::checkedCast(mCommunicator->propertyToProxy("LocatorServiceManagement.Proxy"));
+ mServiceLocatorManagement = ServiceLocatorManagementPrx::checkedCast(mCommunicator->propertyToProxy("LocatorServiceManagement.Proxy"));
if (mServiceLocatorManagement == 0)
{
@@ -176,7 +176,7 @@ void BasicRoutingServiceApp::registerWithServiceLocator()
return;
}
- // Register our RoutingAdmin interface with the Service Locator.
+ // Register our RoutingAdmin interface with the Service Locator.
Ice::ObjectPrx adminObjectPrx = mAdapter->createDirectProxy(mCommunicator->stringToIdentity(RoutingAdminObjectId));
RoutingServiceAdminPrx adminPrx = RoutingServiceAdminPrx::checkedCast(adminObjectPrx);
string adminServiceGuid("BasicRoutingServiceAdmin"); // Should be unique for reporting.
@@ -184,7 +184,7 @@ void BasicRoutingServiceApp::registerWithServiceLocator()
setCategory(mAdminManagement, Routing::V1::RoutingServiceAdminDiscoveryCategory);
- // Register our RegistryLocator interface with the Service Locator.
+ // Register our RegistryLocator interface with the Service Locator.
Ice::ObjectPrx locatorObjectPrx = mAdapter->createDirectProxy(mCommunicator->stringToIdentity(RegistryLocatorObjectId));
LocatorRegistryPrx locatorRegistryPrx = LocatorRegistryPrx::checkedCast(locatorObjectPrx);
string locatorServiceGuid("BasicRoutingServiceRegistryLocator"); // Should be unique for reporting.
@@ -192,7 +192,7 @@ void BasicRoutingServiceApp::registerWithServiceLocator()
setCategory(mRegistryLocatorManagement, Routing::V1::RoutingServiceLocatorRegistryDiscoveryCategory);
- // Register the ComponentService interface with the Service Locator.
+ // Register the ComponentService interface with the Service Locator.
Ice::ObjectPrx componentServiceObjectPrx = mAdapter->createDirectProxy(mCommunicator->stringToIdentity(ComponentServiceId));
ComponentServicePrx componentServicePrx = ComponentServicePrx::checkedCast(componentServiceObjectPrx);
string componentServiceGuid("BasicRoutingService"); // Should be unique for reporting.
@@ -200,7 +200,7 @@ void BasicRoutingServiceApp::registerWithServiceLocator()
setCategory(mComponentServiceManagement, Routing::V1::ComponentServiceDiscoveryCategory);
- // Register the SessionRouter interface with the Service Locator.
+ // Register the SessionRouter interface with the Service Locator.
Ice::ObjectPrx sessionRouterObjectPrx = mAdapter->createDirectProxy(mCommunicator->stringToIdentity(SessionRouterObjectId));
AsteriskSCF::SessionCommunications::V1::SessionRouterPrx sessionRouterPrx = AsteriskSCF::SessionCommunications::V1::SessionRouterPrx::checkedCast(sessionRouterObjectPrx);
string sessionRouterGuid("SessionRouter"); // Should be unique
@@ -216,9 +216,9 @@ void BasicRoutingServiceApp::registerWithServiceLocator()
}
/**
- * Deregister this component's primary public interfaces from the Service Locator.
+ * Deregister this component's primary public interfaces from the Service Locator.
* This is done at shutdown, and whenever we want to keep other services from locating
- * our interfaces.
+ * our interfaces.
*/
void BasicRoutingServiceApp::deregisterFromServiceLocator()
{
@@ -236,27 +236,27 @@ void BasicRoutingServiceApp::deregisterFromServiceLocator()
}
/**
- * Create the primary functional objects of this component.
- * @param appName Name of the application or component.
+ * Create the primary functional objects of this component.
+ * @param appName Name of the application or component.
*/
void BasicRoutingServiceApp::initialize()
{
try
{
- // Create the adapter.
+ // Create the adapter.
mAdapter = mCommunicator->createObjectAdapter("BasicRoutingServiceAdapter");
- mEventPublisher = new RoutingServiceEventPublisher(mAdapter);
+ mEventPublisher = new RoutingServiceEventPublisher(mAdapter);
// setup the logger
ConfiguredIceLoggerPtr mIceLogger = createIceLogger(mAdapter);
getLoggerFactory().setLogOutput(mIceLogger->getLogger());
- // Create and configure the EndpointRegistry.
+ // Create and configure the EndpointRegistry.
ScriptProcessor* scriptProcesor(new LuaScriptProcessor());
mEndpointRegistry = new EndpointRegistry(scriptProcesor, mEventPublisher);
- // Publish the LocatorRegistry interface.
+ // Publish the LocatorRegistry interface.
mAdapter->add(mEndpointRegistry, mCommunicator->stringToIdentity(RegistryLocatorObjectId));
// Create publish the SessionRouter interface.
@@ -276,7 +276,7 @@ void BasicRoutingServiceApp::initialize()
mAdapter->activate();
// Get a proxy to the interface for the Service Locator.
- mServiceLocator = ServiceLocatorPrx::checkedCast(mCommunicator->propertyToProxy("LocatorService.Proxy"));
+ mServiceLocator = ServiceLocatorPrx::checkedCast(mCommunicator->propertyToProxy("LocatorService.Proxy"));
mInitialized = true;
}
@@ -316,15 +316,15 @@ void BasicRoutingServiceApp::start(const string& name, const Ice::CommunicatorPt
}
// Plug back into the Asterisk SCF discovery system so that the interfaces we provide
- // can be located.
+ // can be located.
registerWithServiceLocator();
mRunning = true;
lg(Info) << "Started";
}
-/**
- * Things we do to resume operation after a pause().
+/**
+ * Things we do to resume operation after a pause().
*/
void BasicRoutingServiceApp::resume()
{
@@ -333,7 +333,7 @@ void BasicRoutingServiceApp::resume()
mAdapter->activate();
// Plug back into the Asterisk SCF discovery system so that the interfaces we provide
- // can be located.
+ // can be located.
registerWithServiceLocator();
}
@@ -371,11 +371,11 @@ void BasicRoutingServiceApp::stop()
} // end AsteriskSCF
-extern "C"
+extern "C"
{
- ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
- {
- return new AsteriskSCF::BasicRoutingService::BasicRoutingServiceApp;
- }
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+{
+ return new AsteriskSCF::BasicRoutingService::BasicRoutingServiceApp;
+}
}
diff --git a/src/BridgeManagerAccessor.cpp b/src/BridgeManagerAccessor.cpp
index f2f2d89..ab85026 100644
--- a/src/BridgeManagerAccessor.cpp
+++ b/src/BridgeManagerAccessor.cpp
@@ -30,25 +30,25 @@ namespace BasicRoutingService
{
/**
- * The private implementation of BridgeManagerAccessor.
+ * The private implementation of BridgeManagerAccessor.
*/
class BridgeManagerAccessorPriv
{
public:
- BridgeManagerAccessorPriv(const ServiceLocatorPrx& locator) :
+ BridgeManagerAccessorPriv(const ServiceLocatorPrx& locator) :
mServiceLocator(locator), mInitialized(false)
{
initialize();
}
/**
- * Initialization. Primarily involves acquring access to specific IceStorm topic.
+ * Initialization. Primarily involves acquring access to specific IceStorm topic.
*/
void initialize()
{
try
{
- // Use the locator to find the BridgeManger.
+ // Use the locator to find the BridgeManger.
ServiceLocatorParamsPtr nameparam = new ServiceLocatorParams;
nameparam->category = BridgeServiceDiscoveryCategory;
Ice::ObjectPrx bridgeManagerObject = mServiceLocator->locate(nameparam);
@@ -56,7 +56,7 @@ public:
}
catch(const Ice::Exception &e)
{
- cout << "Exception locating " << BridgeServiceDiscoveryCategory << ": " << e.what() << endl;
+ cout << "Exception locating " << BridgeServiceDiscoveryCategory << ": " << e.what() << endl;
return;
}
@@ -69,7 +69,7 @@ public:
}
/**
- * Utiltity to check for initialization state.
+ * Utiltity to check for initialization state.
*/
bool verifyInitialized()
{
@@ -78,7 +78,7 @@ public:
return true;
}
- // Try again to initialize.
+ // Try again to initialize.
initialize();
if (!mInitialized)
@@ -104,9 +104,9 @@ private:
};
/**
- * Class constructor.
+ * Class constructor.
*/
-BridgeManagerAccessor::BridgeManagerAccessor(const ServiceLocatorPrx& locator) :
+BridgeManagerAccessor::BridgeManagerAccessor(const ServiceLocatorPrx& locator) :
mImpl(new BridgeManagerAccessorPriv(locator))
{
}
diff --git a/src/BridgeManagerAccessor.h b/src/BridgeManagerAccessor.h
index f921541..0892930 100644
--- a/src/BridgeManagerAccessor.h
+++ b/src/BridgeManagerAccessor.h
@@ -28,18 +28,18 @@ namespace BasicRoutingService
class BridgeManagerAccessorPriv;
/**
- * A wrapper for the Bridge Manager proxy.
+ * A wrapper for the Bridge Manager proxy.
*/
class BridgeManagerAccessor
{
public:
- BridgeManagerAccessor(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator);
+ BridgeManagerAccessor(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorPrx& locator);
const SessionCommunications::V1::BridgeManagerPrx& getBridgeManager() const;
bool isInitialized();
private:
- boost::shared_ptr<BridgeManagerAccessorPriv> mImpl; // pimpl idiom applied.
+ boost::shared_ptr<BridgeManagerAccessorPriv> mImpl; // pimpl idiom applied.
};
typedef boost::shared_ptr<BridgeManagerAccessor> BridgeManagerAccessorPtr;
diff --git a/src/EndpointRegistry.cpp b/src/EndpointRegistry.cpp
index 6209162..6eecc72 100644
--- a/src/EndpointRegistry.cpp
+++ b/src/EndpointRegistry.cpp
@@ -13,7 +13,7 @@
* the GNU General Public License Version 2. See the LICENSE.txt file
* at the top of the source tree.
*/
-#include <boost/regex.hpp>
+#include <boost/regex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/shared_mutex.hpp>
@@ -41,7 +41,7 @@ struct RegisteredLocator
{
public:
RegisteredLocator() {}
- RegisteredLocator(const EndpointLocatorPrx& l, const RegExSeq &inputStringList) :
+ RegisteredLocator(const EndpointLocatorPrx& l, const RegExSeq &inputStringList) :
locator(l)
{
setRegEx(inputStringList);
@@ -68,13 +68,13 @@ typedef map<std::string, RegisteredLocator>::iterator EndpointLocatorMapIterator
typedef map<std::string, RegisteredLocator> EndpointLocatorMap;
/**
- * Provides the private implementation of the EndpointRegistry.
+ * Provides the private implementation of the EndpointRegistry.
*/
class EndpointRegistryPriv
{
public:
- EndpointRegistryPriv(ScriptProcessor* scriptProcessor, const RoutingEventsPtr& eventPublisher) :
- mScriptProcessor(scriptProcessor), mEventPublisher(eventPublisher)
+ EndpointRegistryPriv(ScriptProcessor* scriptProcessor, const RoutingEventsPtr& eventPublisher) :
+ mScriptProcessor(scriptProcessor), mEventPublisher(eventPublisher)
{
}
@@ -119,19 +119,19 @@ public:
/**
* Constructor.
*/
-EndpointRegistry::EndpointRegistry(ScriptProcessor* scriptProcessor, const RoutingEventsPtr& eventPublisher) :
+EndpointRegistry::EndpointRegistry(ScriptProcessor* scriptProcessor, const RoutingEventsPtr& eventPublisher) :
mImpl(new EndpointRegistryPriv(scriptProcessor, eventPublisher))
{
}
/**
* Register an EndpointLocator that can provide endpoints.
- * @param id A unique identifier for the added EndpointLocator.
- * @param destinationIdRangeList A set of regular expressions that define the valid endpoint ids
- * the locator being added supports.
+ * @param id A unique identifier for the added EndpointLocator.
+ * @param destinationIdRangeList A set of regular expressions that define the valid endpoint ids
+ * the locator being added supports.
*/
-void EndpointRegistry::addEndpointLocator(const std::string& locatorId, const RegExSeq& regexList, const EndpointLocatorPrx& locator,
- const Ice::Current&)
+void EndpointRegistry::addEndpointLocator(const std::string& locatorId, const RegExSeq& regexList, const EndpointLocatorPrx& locator,
+ const Ice::Current&)
{
try
{
@@ -169,7 +169,7 @@ void EndpointRegistry::addEndpointLocator(const std::string& locatorId, const Re
/**
* Remove an EndpointLocator.
- * @param The unique id of the locator to remove.
+ * @param The unique id of the locator to remove.
*/
void EndpointRegistry::removeEndpointLocator(const std::string& locatorId, const Ice::Current&)
{
@@ -208,13 +208,13 @@ void EndpointRegistry::removeEndpointLocator(const std::string& locatorId, const
}
/**
- * Modify the range of device ids managed by a previously added EndpointLocator.
- * @param id A unique identifier for the added EndpointLocator.
- * @param A list of reqular expressions that define the the valid endpoint ids. This
- * set of regular expressions completely replaces the current set.
+ * Modify the range of device ids managed by a previously added EndpointLocator.
+ * @param id A unique identifier for the added EndpointLocator.
+ * @param A list of reqular expressions that define the the valid endpoint ids. This
+ * set of regular expressions completely replaces the current set.
*/
-void EndpointRegistry::setEndpointLocatorDestinationIds(const std::string& locatorId,
- const AsteriskSCF::Core::Routing::V1::RegExSeq& regExList, const Ice::Current&)
+void EndpointRegistry::setEndpointLocatorDestinationIds(const std::string& locatorId,
+ const AsteriskSCF::Core::Routing::V1::RegExSeq& regExList, const Ice::Current&)
{
try
{
@@ -233,7 +233,7 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(const std::string& locat
throw DestinationNotFoundException(locatorId);
}
- // Replace the regular expression.
+ // Replace the regular expression.
existing->second.setRegEx(regExList);
mImpl->mEventPublisher->setEndpointLocatorDestinationIdsEvent(locatorId, regExList, Event::SUCCESS);
@@ -248,8 +248,8 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(const std::string& locat
}
/**
- * Returns the endpoints that match the specified destination id.
- * @param id String identifier of the the destination.
+ * Returns the endpoints that match the specified destination id.
+ * @param id String identifier of the the destination.
*/
AsteriskSCF::Core::Endpoint::V1::EndpointSeq EndpointRegistry::lookup(const std::string& destination, const Ice::Current&)
{
@@ -274,7 +274,7 @@ AsteriskSCF::Core::Endpoint::V1::EndpointSeq EndpointRegistry::lookup(const std:
for(EndpointLocatorMapIterator entry = locatorMap.begin(); entry != locatorMap.end(); ++entry)
{
- // Test to see if the destination matches any of this entry's regular expressions.
+ // Test to see if the destination matches any of this entry's regular expressions.
for(vector<boost::regex>::iterator reg = entry->second.regexList.begin(); reg != entry->second.regexList.end(); ++reg)
{
if (boost::regex_match(modifiedDestination, *reg))
@@ -305,14 +305,14 @@ AsteriskSCF::Core::Endpoint::V1::EndpointSeq EndpointRegistry::lookup(const std:
}
/**
- * Configure this object with a ScriptProcessor.
+ * Configure this object with a ScriptProcessor.
*/
void EndpointRegistry::setScriptProcessor(ScriptProcessor* scriptProcessor)
-{
+{
if (scriptProcessor == mImpl->mScriptProcessor.get())
{
// Calling this method with a pointer to the scriptProcessor that's already held in the shared_ptr would
- // result in deleting the very object we're trying to set.
+ // result in deleting the very object we're trying to set.
return;
}
@@ -322,7 +322,7 @@ void EndpointRegistry::setScriptProcessor(ScriptProcessor* scriptProcessor)
}
/**
- * Drop references to all EndpointLocators that have been registered.
+ * Drop references to all EndpointLocators that have been registered.
* Note: Admin function.
*/
void EndpointRegistry::clearEndpointLocators()
@@ -332,10 +332,10 @@ void EndpointRegistry::clearEndpointLocators()
}
/**
- * Sends a policy string to the script processor. The default implementation is a no-op,
- * but site-specific scripts may make use it.
+ * Sends a policy string to the script processor. The default implementation is a no-op,
+ * but site-specific scripts may make use it.
* Note: Admin function.
- * @param policy A site-specific policy specification.
+ * @param policy A site-specific policy specification.
*/
void EndpointRegistry::setPolicy(const std::string& policy)
{
diff --git a/src/EndpointRegistry.h b/src/EndpointRegistry.h
index 090a145..d85a015 100644
--- a/src/EndpointRegistry.h
+++ b/src/EndpointRegistry.h
@@ -33,59 +33,59 @@ public:
EndpointRegistry(ScriptProcessor* scriptProcessor, const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher );
/**
- * Configure the EndpointRegistry to use a different scriptProcessor than the
- * one created with.
+ * Configure the EndpointRegistry to use a different scriptProcessor than the
+ * one created with.
*/
void setScriptProcessor(ScriptProcessor* scriptProcessor);
-public:
+public:
// LocatorRegistry overrides
/**
* Register an EndpointLocator that can provide endpoints.
- * @param id A unique identifier for the added EndpointLocator.
- * @param destinationIdRangeList A set of regular expressions that define the valid endpoint ids
- * the locator being added supports.
+ * @param id A unique identifier for the added EndpointLocator.
+ * @param destinationIdRangeList A set of regular expressions that define the valid endpoint ids
+ * the locator being added supports.
*/
- void addEndpointLocator(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
- const AsteriskSCF::Core::Routing::V1::EndpointLocatorPrx& locator, const Ice::Current&);
+ void addEndpointLocator(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
+ const AsteriskSCF::Core::Routing::V1::EndpointLocatorPrx& locator, const Ice::Current&);
/**
* Remove an EndpointLocator from the registry. The EndpointLocator must have been previously added
- * via a call to addEndpointLocator.
- * @param The unique id of the locator to remove.
+ * via a call to addEndpointLocator.
+ * @param The unique id of the locator to remove.
*/
void removeEndpointLocator(const std::string& locatorId, const Ice::Current& );
/**
- * Modify the range of ids managed by a previously added EndpointLocator.
- * @param id A unique identifier for the added EndpointLocator.
- * @param A list of reqular expressions that define the the valid endpoint ids. This
- * set of regular expressions completely replaces the current set.
+ * Modify the range of ids managed by a previously added EndpointLocator.
+ * @param id A unique identifier for the added EndpointLocator.
+ * @param A list of reqular expressions that define the the valid endpoint ids. This
+ * set of regular expressions completely replaces the current set.
*/
- void setEndpointLocatorDestinationIds(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
- const Ice::Current&);
+ void setEndpointLocatorDestinationIds(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
+ const Ice::Current&);
// EndpointLocator overrides
/**
- * Returns the endpoints that match the specified destination id.
- * @param id String identifier of the the destination.
+ * Returns the endpoints that match the specified destination id.
+ * @param id String identifier of the the destination.
*/
AsteriskSCF::Core::Endpoint::V1::EndpointSeq lookup(const std::string& destination, const Ice::Current&);
public:
/**
- * Drop references to all EndpointLocators that have been registered.
+ * Drop references to all EndpointLocators that have been registered.
*/
void clearEndpointLocators();
/**
- * Sends a policy string to the script processor. The default implementation is a no-op,
- * but site-specific scripts may make use it.
- * @param policy A site-specific policy specification.
+ * Sends a policy string to the script processor. The default implementation is a no-op,
+ * but site-specific scripts may make use it.
+ * @param policy A site-specific policy specification.
*/
void setPolicy(const std::string& policy);
diff --git a/src/LuaScriptProcessor.cpp b/src/LuaScriptProcessor.cpp
index 216d667..c4ce529 100644
--- a/src/LuaScriptProcessor.cpp
+++ b/src/LuaScriptProcessor.cpp
@@ -45,18 +45,18 @@ public:
typedef std::vector<RawEndpointId> RawEndpointVector;
/**
- * Provides the private implementation of the LuaScriptProcessor.
+ * Provides the private implementation of the LuaScriptProcessor.
*/
class LuaScriptProcessorPriv
{
public:
- LuaScriptProcessorPriv() :
+ LuaScriptProcessorPriv() :
mInitialized(false)
{
initialize();
}
- ~LuaScriptProcessorPriv()
+ ~LuaScriptProcessorPriv()
{
boost::shared_lock<boost::shared_mutex> lock(mLock);
@@ -139,7 +139,7 @@ public:
}
catch (...)
{
- // TBD... Most likely a script error of some type.
+ // TBD... Most likely a script error of some type.
lg(Error) << "Lua Script error in call to lookup().";
}
}
@@ -192,31 +192,31 @@ private:
/**
* Constructor.
*/
-LuaScriptProcessor::LuaScriptProcessor() :
+LuaScriptProcessor::LuaScriptProcessor() :
mImpl(new LuaScriptProcessorPriv())
{
}
/**
- * Check with the script confirmLookup method to see if a lookup should be allowed.
+ * Check with the script confirmLookup method to see if a lookup should be allowed.
* Also allows the script to alter the destination.
- * @param destination The destination to be looked up.
+ * @param destination The destination to be looked up.
* @param modifiedDestination The destination as modified by the script.
- * @return true if the lookup is allowed.
+ * @return true if the lookup is allowed.
*/
bool LuaScriptProcessor::confirmLookup(const std::string& destination, std::string& modifiedDestination)
{
- return mImpl->confirmLookup(destination, modifiedDestination);
+ return mImpl->confirmLookup(destination, modifiedDestination);
}
/**
- * Sets a policy for the script. The default script implementation is a no-op.
- * This allows for site-specific policy implementations.
- * @param policy New value for the policy setting.
+ * Sets a policy for the script. The default script implementation is a no-op.
+ * This allows for site-specific policy implementations.
+ * @param policy New value for the policy setting.
*/
void LuaScriptProcessor::setPolicy(const string& policy)
{
- mImpl->setPolicy(policy);
+ mImpl->setPolicy(policy);
}
} // end BasicRoutingService
diff --git a/src/LuaScriptProcessor.h b/src/LuaScriptProcessor.h
index ffa05c8..aa34bfd 100644
--- a/src/LuaScriptProcessor.h
+++ b/src/LuaScriptProcessor.h
@@ -25,9 +25,9 @@ namespace AsteriskSCF
namespace BasicRoutingService
{
class LuaScriptProcessorPriv;
-
+
/**
- * Wrapper for the Lua script processor.
+ * Wrapper for the Lua script processor.
*/
class LuaScriptProcessor : public ScriptProcessor
{
diff --git a/src/RoutingAdmin.cpp b/src/RoutingAdmin.cpp
index c7b1a95..1974426 100644
--- a/src/RoutingAdmin.cpp
+++ b/src/RoutingAdmin.cpp
@@ -13,7 +13,7 @@
* the GNU General Public License Version 2. See the LICENSE.txt file
* at the top of the source tree.
*/
-#include <boost/regex.hpp>
+#include <boost/regex.hpp>
#include "RoutingAdmin.h"
#include "EndpointRegistry.h"
@@ -26,30 +26,30 @@ namespace AsteriskSCF
namespace BasicRoutingService
{
-RoutingAdmin::RoutingAdmin(const EndpointRegistryPtr& endpointRegistry) :
+RoutingAdmin::RoutingAdmin(const EndpointRegistryPtr& endpointRegistry) :
mEndpointRegistry(endpointRegistry)
{
}
/**
- * Drop references to all EndpointLocators that have been registered.
+ * Drop references to all EndpointLocators that have been registered.
*/
void RoutingAdmin::clearEndpointLocators(const Ice::Current&)
{
- // For now we just forward to the registry. Some type of authentication may be required
- // in the future, or perhaps the access to the interface is controlled externally.
+ // For now we just forward to the registry. Some type of authentication may be required
+ // in the future, or perhaps the access to the interface is controlled externally.
mEndpointRegistry->clearEndpointLocators();
}
/**
- * Sends a policy string to the script processor. The default implementation is a no-op,
- * but site-specific scripts may make use it.
- * @param policy A site-specific policy specification.
+ * Sends a policy string to the script processor. The default implementation is a no-op,
+ * but site-specific scripts may make use it.
+ * @param policy A site-specific policy specification.
*/
void RoutingAdmin::setPolicy(const std::string& policy, const Ice::Current&)
{
- // For now we just forward to the registry. Some type of authentication may be required
- // in the future, or perhaps the access to the interface is controlled externally.
+ // For now we just forward to the registry. Some type of authentication may be required
+ // in the future, or perhaps the access to the interface is controlled externally.
mEndpointRegistry->setPolicy(policy);
}
diff --git a/src/RoutingAdmin.h b/src/RoutingAdmin.h
index fdec8af..dece098 100644
--- a/src/RoutingAdmin.h
+++ b/src/RoutingAdmin.h
@@ -25,7 +25,7 @@ namespace BasicRoutingService
class EndpointRegistryPriv;
/**
- * This class exists to provide separation between the EndpointRegistry and the administrative functions.
+ * This class exists to provide separation between the EndpointRegistry and the administrative functions.
*/
class RoutingAdmin : public AsteriskSCF::Core::Routing::V1::RoutingServiceAdmin
{
@@ -35,14 +35,14 @@ public:
public: // RoutingServiceAdmin overrides
/**
- * Drop references to all EndpointLocators that have been registered.
+ * Drop references to all EndpointLocators that have been registered.
*/
void clearEndpointLocators(const ::Ice::Current&);
/**
- * Sends a policy string to the script processor. The default implementation is a no-op,
- * but site-specific scripts may make use it.
- * @param policy A site-specific policy specification.
+ * Sends a policy string to the script processor. The default implementation is a no-op,
+ * but site-specific scripts may make use it.
+ * @param policy A site-specific policy specification.
*/
void setPolicy(const ::std::string& policy, const ::Ice::Current&);
diff --git a/src/RoutingServiceEventPublisher.cpp b/src/RoutingServiceEventPublisher.cpp
index e0dd732..8aae895 100644
--- a/src/RoutingServiceEventPublisher.cpp
+++ b/src/RoutingServiceEventPublisher.cpp
@@ -34,19 +34,19 @@ namespace BasicRoutingService
{
/**
- * The private implementation of RoutingServiceEventPublisher.
+ * The private implementation of RoutingServiceEventPublisher.
*/
class RoutingServiceEventPublisherPriv
{
public:
- RoutingServiceEventPublisherPriv(const Ice::ObjectAdapterPtr& adapter) :
+ RoutingServiceEventPublisherPriv(const Ice::ObjectAdapterPtr& adapter) :
mAdapter(adapter), mInitialized(false)
{
initialize();
}
/**
- * Initialization. Primarily involves acquring access to specific IceStorm topic.
+ * Initialization. Primarily involves acquring access to specific IceStorm topic.
*/
void initialize()
{
@@ -71,7 +71,7 @@ public:
IceStorm::TopicPrx topic;
try
- {
+ {
topic = topicManager->retrieve(Event::TopicId);
}
catch(const IceStorm::NoSuchTopic&)
@@ -95,7 +95,7 @@ public:
}
/**
- * Utiltity to check for initialization state.
+ * Utiltity to check for initialization state.
*/
bool isInitialized()
{
@@ -104,7 +104,7 @@ public:
return true;
}
- // Try again to initialize.
+ // Try again to initialize.
initialize();
if (!mInitialized)
@@ -124,9 +124,9 @@ private:
};
/**
- * Class constructor.
+ * Class constructor.
*/
-RoutingServiceEventPublisher::RoutingServiceEventPublisher(const Ice::ObjectAdapterPtr& adapter) :
+RoutingServiceEventPublisher::RoutingServiceEventPublisher(const Ice::ObjectAdapterPtr& adapter) :
mImpl(new RoutingServiceEventPublisherPriv(adapter))
{
}
@@ -134,8 +134,8 @@ RoutingServiceEventPublisher::RoutingServiceEventPublisher(const Ice::ObjectAdap
/**
* Send a message to the service's event topic to report a lookup event.
*/
-void RoutingServiceEventPublisher::lookupEvent(const std::string& destination,
- AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current &)
+void RoutingServiceEventPublisher::lookupEvent(const std::string& destination,
+ AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current &)
{
if (!mImpl->isInitialized())
{
@@ -156,9 +156,9 @@ void RoutingServiceEventPublisher::lookupEvent(const std::string& destination,
/**
* Send a message to the service's event topic to report the addEndpointLocator event.
*/
-void RoutingServiceEventPublisher::addEndpointLocatorEvent(const std::string& locatorId,
- const ::AsteriskSCF::Core::Routing::V1::RegExSeq& regexList, AsteriskSCF::Core::Routing::V1::Event::OperationResult result,
- const Ice::Current &)
+void RoutingServiceEventPublisher::addEndpointLocatorEvent(const std::string& locatorId,
+ const ::AsteriskSCF::Core::Routing::V1::RegExSeq& regexList, AsteriskSCF::Core::Routing::V1::Event::OperationResult result,
+ const Ice::Current &)
{
if (!mImpl->isInitialized())
{
@@ -178,8 +178,8 @@ void RoutingServiceEventPublisher::addEndpointLocatorEvent(const std::string& lo
/**
* Send a message to the service's event topic to report the removeEndpointLocator event.
*/
-void RoutingServiceEventPublisher::removeEndpointLocatorEvent(const std::string& locatorId,
- AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current &)
+void RoutingServiceEventPublisher::removeEndpointLocatorEvent(const std::string& locatorId,
+ AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current &)
{
if (!mImpl->isInitialized())
{
@@ -199,9 +199,9 @@ void RoutingServiceEventPublisher::removeEndpointLocatorEvent(const std::string&
/**
* Send a message to the service's event topic to report the setEndpointLocatorDestinationIds event.
*/
-void RoutingServiceEventPublisher::setEndpointLocatorDestinationIdsEvent(const std::string& locatorId,
- const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList, AsteriskSCF::Core::Routing::V1::Event::OperationResult result,
- const Ice::Current &)
+void RoutingServiceEventPublisher::setEndpointLocatorDestinationIdsEvent(const std::string& locatorId,
+ const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList, AsteriskSCF::Core::Routing::V1::Event::OperationResult result,
+ const Ice::Current &)
{
if (!mImpl->isInitialized())
{
diff --git a/src/RoutingServiceEventPublisher.h b/src/RoutingServiceEventPublisher.h
index bc01924..b3972b6 100644
--- a/src/RoutingServiceEventPublisher.h
+++ b/src/RoutingServiceEventPublisher.h
@@ -27,48 +27,48 @@ namespace BasicRoutingService
class RoutingServiceEventPublisherPriv;
/**
- * Publishes key events to the rest of the system.
+ * Publishes key events to the rest of the system.
*/
class RoutingServiceEventPublisher : public ::AsteriskSCF::Core::Routing::V1::Event::RoutingEvents
{
public:
- RoutingServiceEventPublisher(const Ice::ObjectAdapterPtr& adapter);
+ RoutingServiceEventPublisher(const Ice::ObjectAdapterPtr& adapter);
// Overrides
/**
* Send a message to the service's event topic to report a lookup event.
- * @param destination The destination to be looked up.
- * @param result Informs event listeners of the operations success or failure.
+ * @param destination The destination to be looked up.
+ * @param result Informs event listeners of the operations success or failure.
*/
void lookupEvent(const std::string& destination, AsteriskSCF::Core::Routing::V1::Event::OperationResult result,
- const Ice::Current&);
+ const Ice::Current&);
/**
* Send a message to the service's event topic to report an addEndpointLocator event.
- * @param locatorId The identity of the EndpointLocator being added.
- * @param regexList List of regex strings used to identify the destinations available by this locator.
- * @param result Informs event listeners of the operations success or failure.
+ * @param locatorId The identity of the EndpointLocator being added.
+ * @param regexList List of regex strings used to identify the destinations available by this locator.
+ * @param result Informs event listeners of the operations success or failure.
*/
- void addEndpointLocatorEvent(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
- AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current&);
+ void addEndpointLocatorEvent(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
+ AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current&);
/**
* Send a message to the service's event topic to report a removeEndpointLocator event.
- * @param locatorId The identity of the EndpointLocator being removed.
- * @param result Informs event listeners of the operations success or failure.
+ * @param locatorId The identity of the EndpointLocator being removed.
+ * @param result Informs event listeners of the operations success or failure.
*/
void removeEndpointLocatorEvent(const std::string& locatorId, AsteriskSCF::Core::Routing::V1::Event::OperationResult result,
- const Ice::Current&);
+ const Ice::Current&);
/**
* Send a message to the service's event topic to report a aetEndpointLocatorDestinationIds event.
- * @param locatorId The identity of the EndpointLocator whose destination specifications should be changed.
- * @param regexList New list of regex strings to be used to identify the destinations available by this locator.
- * @param result Informs event listeners of the operations success or failure.
+ * @param locatorId The identity of the EndpointLocator whose destination specifications should be changed.
+ * @param regexList New list of regex strings to be used to identify the destinations available by this locator.
+ * @param result Informs event listeners of the operations success or failure.
*/
- void setEndpointLocatorDestinationIdsEvent(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
- AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current&);
+ void setEndpointLocatorDestinationIdsEvent(const std::string& locatorId, const AsteriskSCF::Core::Routing::V1::RegExSeq& regexList,
+ AsteriskSCF::Core::Routing::V1::Event::OperationResult result, const Ice::Current&);
/**
@@ -82,7 +82,7 @@ public:
void setPolicyEvent(const std::string& policy, const Ice::Current&);
private:
- boost::shared_ptr<RoutingServiceEventPublisherPriv> mImpl; // pimpl idiom applied.
+ boost::shared_ptr<RoutingServiceEventPublisherPriv> mImpl; // pimpl idiom applied.
};
} // end BasicRoutingService
diff --git a/src/ScriptProcessor.h b/src/ScriptProcessor.h
index 062d45a..3d549e6 100644
--- a/src/ScriptProcessor.h
+++ b/src/ScriptProcessor.h
@@ -22,7 +22,7 @@ namespace AsteriskSCF
namespace BasicRoutingService
{
/**
- * Interface for all script processors.
+ * Interface for all script processors.
*/
class ScriptProcessor
{
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 966440d..9aec3aa 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -36,7 +36,7 @@ Logger &lg = getLoggerFactory().getLogger("AsteriskSCF.BasicRoutingService");
}
/**
- * TBD... This code should be refactored for AMD and use AMI on outgoing calls.
+ * TBD... This code should be refactored for AMD and use AMI on outgoing calls.
*/
namespace AsteriskSCF
{
@@ -46,12 +46,12 @@ namespace BasicRoutingService
class SessionListenerImpl : public SessionListener
{
public:
- SessionListenerImpl(Ice::ObjectAdapterPtr adapter, const SessionPrx& session) :
+ SessionListenerImpl(Ice::ObjectAdapterPtr adapter, const SessionPrx& session) :
mAdapter(adapter), mTerminated(false), mListenerPrx(0)
{
}
- SessionListenerImpl(Ice::ObjectAdapterPtr adapter, SessionSeq& sessionSequence) :
+ SessionListenerImpl(Ice::ObjectAdapterPtr adapter, SessionSeq& sessionSequence) :
mAdapter(adapter), mTerminated(false), mListenerPrx(0)
{
}
@@ -64,7 +64,7 @@ public:
{
}
- void flashed(const SessionPrx& session, const Ice::Current&)
+ void flashed(const SessionPrx& session, const Ice::Current&)
{
}
@@ -114,7 +114,7 @@ public:
/**
* Adds a session to be tracked by the listener. This operation doesn't actually call addListener on the Session.
- * When we ask an endpoint to create a session, we pass our listener in to the creation process.
+ * When we ask an endpoint to create a session, we pass our listener in to the creation process.
* So the listener has been attached to the session, but we just need to keep track of it in this object.
*/
void addSession(SessionPrx session)
@@ -124,7 +124,7 @@ public:
}
/**
- * Add a session to be tracked by this listener, and attach this listener to the session.
+ * Add a session to be tracked by this listener, and attach this listener to the session.
*/
void addSessionAndListen(SessionPrx session)
{
@@ -159,7 +159,7 @@ public:
}
/**
- * Stop listening to all sessions we're monitoring.
+ * Stop listening to all sessions we're monitoring.
*/
void unregister()
{
@@ -212,14 +212,14 @@ private:
typedef IceInternal::Handle<SessionListenerImpl> SessionListenerImplPtr;
/**
- * This class uses RAII to manage the lifecycle of a session listener.
- * It's sort of a smart pointer for the listener, but it's tightly
- * coupled to the specifics of our private impl.
+ * This class uses RAII to manage the lifecycle of a session listener.
+ * It's sort of a smart pointer for the listener, but it's tightly
+ * coupled to the specifics of our private impl.
*/
class SessionListenerAllocator
{
public:
- SessionListenerAllocator(Ice::ObjectAdapterPtr adapter, const SessionPrx& session)
+ SessionListenerAllocator(Ice::ObjectAdapterPtr adapter, const SessionPrx& session)
: mSessionListener(new SessionListenerImpl(adapter, session)),
mAdapter(adapter)
{
@@ -230,7 +230,7 @@ public:
mSessionListener->addSessionAndListen(session);
}
- SessionListenerAllocator(Ice::ObjectAdapterPtr adapter, SessionSeq& sessionSequence)
+ SessionListenerAllocator(Ice::ObjectAdapterPtr adapter, SessionSeq& sessionSequence)
: mSessionListener(new SessionListenerImpl(adapter, sessionSequence)),
mAdapter(adapter)
{
@@ -240,15 +240,15 @@ public:
for(SessionSeq::iterator s = sessionSequence.begin(); s != sessionSequence.end(); ++s)
{
- mSessionListener->addSessionAndListen(*s);
+ mSessionListener->addSessionAndListen(*s);
}
}
~SessionListenerAllocator()
{
- // Our private SessionListener implementation adds itself as a servant. It
- // can't really undo that without getting itself deleted. So undo it
- // in proper order.
+ // Our private SessionListener implementation adds itself as a servant. It
+ // can't really undo that without getting itself deleted. So undo it
+ // in proper order.
try
{
lg(Debug) << "About to unregister the listener..." << std::endl ;
@@ -263,7 +263,7 @@ public:
try
{
// Only the adapter holds a smart pointer for this servant, so this will
- // cause it to be delted.
+ // cause it to be delted.
lg(Debug) << "Removing listener from object adapter." ;
mAdapter->remove(mSessionListener->getProxy()->ice_getIdentity());
}
@@ -273,10 +273,10 @@ public:
}
}
- SessionListenerImpl* operator->()
- {
- return mSessionListener;
- }
+ SessionListenerImpl* operator->()
+ {
+ return mSessionListener;
+ }
private:
SessionListenerImpl *mSessionListener;
@@ -285,18 +285,18 @@ private:
class SessionRouterPriv
{
-public:
+public:
SessionRouterPriv(const Ice::ObjectAdapterPtr& objectAdapter, const EndpointRegistryPtr& endpointRegistry,
- const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher) :
- mAdapter(objectAdapter),
- mEndpointRegistry(endpointRegistry),
- mEventPublisher(eventPublisher)
+ const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher) :
+ mAdapter(objectAdapter),
+ mEndpointRegistry(endpointRegistry),
+ mEventPublisher(eventPublisher)
{
}
- ~SessionRouterPriv()
+ ~SessionRouterPriv()
{
- }
+ }
void setBridgeAccessor(BridgeManagerAccessorPtr bridgeAccessor)
{
@@ -308,7 +308,7 @@ public:
EndpointSeq endpoints;
try
{
- // Lookup the destination.
+ // Lookup the destination.
endpoints = mEndpointRegistry->lookup(destination, current);
if (endpoints.empty())
@@ -323,7 +323,7 @@ public:
}
catch (const Ice::Exception &)
{
- // Probably couldn't access the EndpointLocator of the registered channel.
+ // Probably couldn't access the EndpointLocator of the registered channel.
throw EndpointUnreachableException(destination);
}
@@ -356,12 +356,12 @@ public:
};
SessionRouter::SessionRouter(const Ice::ObjectAdapterPtr& objectAdapter, const EndpointRegistryPtr& endpointRegistry,
- const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher) :
+ const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher) :
mImpl(new SessionRouterPriv(objectAdapter, endpointRegistry, eventPublisher))
{
}
-SessionRouter::~SessionRouter()
+SessionRouter::~SessionRouter()
{
mImpl.reset();
}
@@ -372,18 +372,18 @@ void SessionRouter::setBridgeManagerAccessor(const BridgeManagerAccessorPtr& bri
}
/**
- * Route the session by looking up the destination endpoint and configuring a complimentary session for the destination.
+ * Route the session by looking up the destination endpoint and configuring a complimentary session for the destination.
* TBD - Need to rework with asynch support.
*/
-void SessionRouter::routeSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const std::string& destination,
- const Ice::Current& current)
+void SessionRouter::routeSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source, const std::string& destination,
+ const Ice::Current& current)
{
lg(Debug) << "routeSession() entered with destination " << destination << std::endl;
- // Create a listener for the source to handle early termination.
- // The wrapper we're using will remove the listener and free it when
- // this method is left.
- SessionListenerAllocator listener(mImpl->mAdapter, source);
+ // Create a listener for the source to handle early termination.
+ // The wrapper we're using will remove the listener and free it when
+ // this method is left.
+ SessionListenerAllocator listener(mImpl->mAdapter, source);
// Route the destination
lg(Debug) << "routeSession(): Routing destination " << destination << std::endl;
@@ -391,13 +391,13 @@ void SessionRouter::routeSession(const AsteriskSCF::SessionCommunications::V1::S
// Add a session
SessionSeq newSessions;
- for (EndpointSeq::iterator e = endpoints.begin(); e != endpoints.end(); ++e)
+ for (EndpointSeq::iterator e = endpoints.begin(); e != endpoints.end(); ++e)
{
try
{
SessionEndpointPrx sessionEndpoint = SessionEndpointPrx::checkedCast(*e);
- // Create a session on the destination.
+ // Create a session on the destination.
lg(Debug) << "routeSession(): Creating a session at destination " << destination;
SessionPrx destSession = sessionEndpoint->createSession(destination, listener->getProxy());
lg(Debug) << " Session proxy: " << destSession->ice_toString() << std::endl;
@@ -422,7 +422,7 @@ void SessionRouter::routeSession(const AsteriskSCF::SessionCommunications::V1::S
throw SourceTerminatedPreBridgingException(source->getEndpoint()->getId());
}
// We're through listening, and we will probably interfere with the Bridge's functionality if
- // we keep listening.
+ // we keep listening.
listener->unregister();
// Create the bridge
@@ -445,7 +445,7 @@ void SessionRouter::routeSession(const AsteriskSCF::SessionCommunications::V1::S
throw BridgingException(source->getEndpoint()->getId(), destination);
}
-
+
// Forward the start to all the destinations routed to.
lg(Debug) << "routeSession(): Sending start() to newly routed destination.";
@@ -455,13 +455,13 @@ void SessionRouter::routeSession(const AsteriskSCF::SessionCommunications::V1::S
/**
* Replace one session in a Bridge with a new
- * session routable by the destination param.
- * @param source The session initiating the routing event.
- * @param destination The address or id of the destination to be routed.
+ * session routable by the destination param.
+ * @param source The session initiating the routing event.
+ * @param destination The address or id of the destination to be routed.
*/
-void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sessionToReplace,
- const ::std::string& destination,
- const Ice::Current& current)
+void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sessionToReplace,
+ const ::std::string& destination,
+ const Ice::Current& current)
{
lg(Debug) << "connectBridgedSessionsWithDestination() entered with destination " << destination << std::endl;
@@ -507,8 +507,8 @@ void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sess
}
catch(const Ice::Exception &e)
{
- lg(Error) << "Unable to get list of sesssions for bridge in connectBridgedSessionsWithDestination(). " ;
- throw e; // rethrow
+ lg(Error) << "Unable to get list of sesssions for bridge in connectBridgedSessionsWithDestination(). " ;
+ throw e; // rethrow
}
SessionSeq remainingSessions;
@@ -520,11 +520,11 @@ void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sess
}
}
- // Create a listener for the sessions not being replaced to handle early termination.
- // The wrapper we're using will remove the listener and free it when
- // this method is left.
+ // Create a listener for the sessions not being replaced to handle early termination.
+ // The wrapper we're using will remove the listener and free it when
+ // this method is left.
lg(Debug) << "connectBridgedSessionsWithDestination(): Attaching listener";
- SessionListenerAllocator listener(mImpl->mAdapter, remainingSessions);
+ SessionListenerAllocator listener(mImpl->mAdapter, remainingSessions);
// Route the destination
lg(Debug) << "connectBridgedSessionsWithDestination(): Routing destination " << destination;
@@ -532,13 +532,13 @@ void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sess
// Add a session
SessionSeq newSessions;
- for (EndpointSeq::iterator e = endpoints.begin(); e != endpoints.end(); ++e)
+ for (EndpointSeq::iterator e = endpoints.begin(); e != endpoints.end(); ++e)
{
try
{
SessionEndpointPrx sessionEndpoint = SessionEndpointPrx::checkedCast(*e);
- // Create a session on the destination.
+ // Create a session on the destination.
SessionPrx destSession = sessionEndpoint->createSession(destination, listener->getProxy());
listener->addSession(destSession);
newSessions.push_back(destSession);
@@ -564,7 +564,7 @@ void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sess
throw SourceTerminatedPreBridgingException(remainingSessions[0]->getEndpoint()->getId());
}
// We're through listening, and we will probably interfere with the Bridge's functionality if
- // we keep listening.
+ // we keep listening.
listener->unregister();
// Modify the bridge
@@ -585,21 +585,21 @@ void SessionRouter::connectBridgedSessionsWithDestination(const SessionPrx& sess
} // SessionRouter::connectBridgedSessionsWithDestination(...)
/**
- * Replace one session in a Bridge with sessions from another bridge.
+ * Replace one session in a Bridge with sessions from another bridge.
* No routing is actually performed. This operation exists here for consistency,
- * since connectBridgedSessionsWithDestination(...) is implemented by this interface.
- * @param sessionToReplace The session that is to be replaced in a
+ * since connectBridgedSessionsWithDestination(...) is implemented by this interface.
+ * @param sessionToReplace The session that is to be replaced in a
* bridge. The bridge obejct associated with this session will survive, and
- * all sessions bridged to this session will be kept in the bridge.
+ * all sessions bridged to this session will be kept in the bridge.
* @param bridgedSession This session is assumed to be bridged to the sessions
* that are to be moved to another bridge. The bridgedSession itself will not
* be connected to the other bridge. The sessions being moved will be removed from
- * their current bridge before being added to the bridge currenltly attached to
- * sessionToReplace.
+ * their current bridge before being added to the bridge currenltly attached to
+ * sessionToReplace.
*/
-void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
- const SessionPrx& bridgedSession,
- const Ice::Current&)
+void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
+ const SessionPrx& bridgedSession,
+ const Ice::Current&)
{
lg(Debug) << "connectBridgedSessions() entered... " << std::endl;
@@ -653,18 +653,18 @@ void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
}
catch(const Ice::Exception &e)
{
- lg(Error) << "connectBridgedSessions(): Unable to get list of sesssions for bridge in connectBridgedSessions(). " ;
- throw e; // rethrow
+ lg(Error) << "connectBridgedSessions(): Unable to get list of sesssions for bridge in connectBridgedSessions(). " ;
+ throw e; // rethrow
}
- // Create a listener for the sessions not being replaced to handle early termination.
- // The wrapper we're using will remove the listener and free it when
- // this method is left.
+ // Create a listener for the sessions not being replaced to handle early termination.
+ // The wrapper we're using will remove the listener and free it when
+ // this method is left.
lg(Debug) << "connectBridgedSessions(): Adding listener to " << preserveSessions.size() << " session(s)." ;
- SessionListenerAllocator listener(mImpl->mAdapter, preserveSessions);
+ SessionListenerAllocator listener(mImpl->mAdapter, preserveSessions);
- // Get the bridge for the sessions being moved.
+ // Get the bridge for the sessions being moved.
BridgePrx oldBridge(0);
count = 0;
@@ -703,7 +703,7 @@ void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
{
try
{
- // Remove the sessions being moved from their old bridge.
+ // Remove the sessions being moved from their old bridge.
SessionSeq allSessions = oldBridge->listSessions();
for(SessionSeq::iterator s = allSessions.begin(); s != allSessions.end(); ++s)
{
@@ -719,7 +719,7 @@ void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
catch(const Ice::Exception&)
{
lg(Warning) << "connectBridgedSessions(): Unable to remove sessions in connectBridgedSessions(). " ;
- // We won't give up because of this.
+ // We won't give up because of this.
}
}
@@ -730,11 +730,11 @@ void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
throw SourceTerminatedPreBridgingException(preserveSessions[0]->getEndpoint()->getId());
}
// We're through listening, and we will probably interfere with the Bridge's functionality if
- // we keep listening.
+ // we keep listening.
lg(Debug) << "connectBridgedSessions(): Removing listener. " ;
listener->unregister();
- // Now replace the sessions.
+ // Now replace the sessions.
try
{
lg(Debug) << "connectBridgedSessions(): Asking bridge to replace sessions." ;
@@ -742,8 +742,8 @@ void SessionRouter::connectBridgedSessions(const SessionPrx& sessionToReplace,
}
catch(const Ice::Exception& e)
{
- lg(Error) << "connectBridgedSessions(): Unable to replace session for bridge in connectBridgedSessions(). " ;
- throw e; // rethrow
+ lg(Error) << "connectBridgedSessions(): Unable to replace session for bridge in connectBridgedSessions(). " ;
+ throw e; // rethrow
}
} // SessionRouter::connectBridgedSessions(...)
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index 87d0fd0..3453436 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -29,52 +29,52 @@ namespace BasicRoutingService
class SessionRouterPriv;
/**
- * This class routes sessions.
+ * This class routes sessions.
*/
class SessionRouter : public AsteriskSCF::SessionCommunications::V1::SessionRouter
{
public:
SessionRouter(const Ice::ObjectAdapterPtr& objectAdapter, const EndpointRegistryPtr& endpointRegistry,
- const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher);
+ const AsteriskSCF::Core::Routing::V1::Event::RoutingEventsPtr& eventPublisher);
~SessionRouter();
void setBridgeManagerAccessor(const BridgeManagerAccessorPtr& bridgeAccessor);
-public:
+public:
// SessionRouter overrides
/**
* Execute the routing functionality for the given session. The given session
- * will be bridged with the destination if it is successfully routed.
- * @param source The session initiating the routing event.
- * @param destination The address or id of the destination to be routed.
+ * will be bridged with the destination if it is successfully routed.
+ * @param source The session initiating the routing event.
+ * @param destination The address or id of the destination to be routed.
*/
- void routeSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source,
- const std::string& destination,
- const Ice::Current&);
+ void routeSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& source,
+ const std::string& destination,
+ const Ice::Current&);
/**
- * Replace a session in a bridge with a destination. The desintation will be routed.
- * @param sessionToReplace The session to be replaced in a bridge. The affected Bridge interface is
- * obtained via an accessor on this interface.
+ * Replace a session in a bridge with a destination. The desintation will be routed.
+ * @param sessionToReplace The session to be replaced in a bridge. The affected Bridge interface is
+ * obtained via an accessor on this interface.
* @param destination The address or id of a destination to be used as a replacement for the specified session.
*/
- void connectBridgedSessionsWithDestination(const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
- const ::std::string& destination,
- const Ice::Current&);
+ void connectBridgedSessionsWithDestination(const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
+ const ::std::string& destination,
+ const Ice::Current&);
/**
* Replace a session in a bridge with another session. If the newSession is already participating in a Bridge,
- * it will be removed from it's current bridge prior to be used as a replacement.
- * @param sessionToReplace The session to be replaced in a bridge. The affected Bridge interface is
- * obtained via an accessor on this interface.
+ * it will be removed from it's current bridge prior to be used as a replacement.
+ * @param sessionToReplace The session to be replaced in a bridge. The affected Bridge interface is
+ * obtained via an accessor on this interface.
* @param newSession The session to be used as a replacement for the specified session.
*/
- void connectBridgedSessions(const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
- const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,
- const Ice::Current&);
+ void connectBridgedSessions(const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
+ const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession,
+ const Ice::Current&);
-private:
+private:
boost::shared_ptr<SessionRouterPriv> mImpl;
};
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index f47ec8e..cb716a6 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -30,7 +30,7 @@ namespace RoutingTest
class BridgeSessionListener : public SessionListener
{
public:
- BridgeSessionListener(MockBridge *bridge)
+ BridgeSessionListener(MockBridge *bridge)
{
}
@@ -70,35 +70,35 @@ private:
typedef IceUtil::Handle<BridgeSessionListener> BridgeSessionListenerPtr;
-MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener)
+MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener)
{
- mListener = new BridgeSessionListener(this);
- Ice::ObjectPrx listernerObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(mListener);
- mListenerPrx = SessionListenerPrx::checkedCast(listernerObjectPrx);
+ mListener = new BridgeSessionListener(this);
+ Ice::ObjectPrx listernerObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(mListener);
+ mListenerPrx = SessionListenerPrx::checkedCast(listernerObjectPrx);
- Ice::ObjectPrx bridgeObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(this);
- mBridgePrx = BridgePrx::checkedCast(bridgeObjectPrx);
+ Ice::ObjectPrx bridgeObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(this);
+ mBridgePrx = BridgePrx::checkedCast(bridgeObjectPrx);
- addSessions(sessions);
+ addSessions(sessions);
}
MockBridge::~MockBridge()
{
- SharedTestData::instance.adapterIn->remove(mListenerPrx->ice_getIdentity());
- SharedTestData::instance.adapterIn->remove(mBridgePrx->ice_getIdentity());
+ SharedTestData::instance.adapterIn->remove(mListenerPrx->ice_getIdentity());
+ SharedTestData::instance.adapterIn->remove(mBridgePrx->ice_getIdentity());
- mListener = 0;
+ mListener = 0;
}
void MockBridge::addSessions(const SessionSeq& newSessions, const Ice::Current&)
{
- mSessions.reserve( mSessions.size() + newSessions.size());
- mSessions.insert( mSessions.end(), newSessions.begin(), newSessions.end());
+ mSessions.reserve( mSessions.size() + newSessions.size());
+ mSessions.insert( mSessions.end(), newSessions.begin(), newSessions.end());
- for (SessionSeq::const_iterator s = newSessions.begin(); s != newSessions.end(); ++s)
- {
- (*s)->setBridge(mBridgePrx, mListenerPrx);
- }
+ for (SessionSeq::const_iterator s = newSessions.begin(); s != newSessions.end(); ++s)
+ {
+ (*s)->setBridge(mBridgePrx, mListenerPrx);
+ }
}
void MockBridge::removeSessions(const SessionSeq& sessions, const Ice::Current&)
@@ -135,17 +135,17 @@ void MockBridge::removeListener(const AsteriskSCF::SessionCommunications::V1::Br
{
}
-void MockBridge::destroy(const Ice::Current&)
+void MockBridge::destroy(const Ice::Current&)
{
}
-void MockBridge::shutdown(const Ice::Current&)
+void MockBridge::shutdown(const Ice::Current&)
{
}
void MockBridge::replaceSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
- const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
- const Ice::Current&)
+ const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
+ const Ice::Current&)
{
SharedTestData::instance.mSessionReplaced = true;
diff --git a/test/MockBridge.h b/test/MockBridge.h
index 0492c54..1854c72 100644
--- a/test/MockBridge.h
+++ b/test/MockBridge.h
@@ -29,8 +29,8 @@ typedef IceUtil::Handle<BridgeSessionListener> BridgeSessionListenerPtr;
class MockBridge : public AsteriskSCF::SessionCommunications::V1::Bridge
{
public:
- MockBridge(const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions,
- const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx& listener);
+ MockBridge(const AsteriskSCF::SessionCommunications::V1::SessionSeq& sessions,
+ const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx& listener);
~MockBridge();
// Overrides
@@ -44,8 +44,8 @@ public:
void removeListener(const AsteriskSCF::SessionCommunications::V1::BridgeListenerPrx&, const Ice::Current& );
void replaceSession(const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace,
- const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
- const Ice::Current&);
+ const AsteriskSCF::SessionCommunications::V1::SessionSeq& newSessions,
+ const Ice::Current&);
// Implementation
void connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session);
diff --git a/test/MockBridgeManager.cpp b/test/MockBridgeManager.cpp
index 72a246c..7a4184e 100644
--- a/test/MockBridgeManager.cpp
+++ b/test/MockBridgeManager.cpp
@@ -32,7 +32,7 @@ void MockBridgeManager::addListener(const BridgeManagerListenerPrx&, const Ice::
{
}
-BridgePrx MockBridgeManager::createBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener, const Ice::Current&)
+BridgePrx MockBridgeManager::createBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener, const Ice::Current&)
{
MockBridge *mockBridge = new MockBridge(sessions, listener);
BridgePtr bridge(mockBridge);
@@ -48,7 +48,7 @@ void MockBridgeManager::removeListener(const BridgeManagerListenerPrx&, const Ic
{
}
-BridgeSeq MockBridgeManager::listBridges(const Ice::Current&)
+BridgeSeq MockBridgeManager::listBridges(const Ice::Current&)
{
return mBridges;
}
diff --git a/test/MockEndpointLocator.cpp b/test/MockEndpointLocator.cpp
index e5e2718..0b321d1 100644
--- a/test/MockEndpointLocator.cpp
+++ b/test/MockEndpointLocator.cpp
@@ -53,7 +53,7 @@ AsteriskSCF::Core::Endpoint::V1::EndpointSeq MockEndpointLocator::lookup(const s
if (endpoints.size() == 0)
{
- throw DestinationNotFoundException(destination);
+ throw DestinationNotFoundException(destination);
}
return endpoints;
}
@@ -87,7 +87,7 @@ MockSessionEndpointPtr MockEndpointLocator::addEndpoint(const string& id)
}
/**
- * Like lookup, but for the local channel we are simulating.
+ * Like lookup, but for the local channel we are simulating.
*/
MockSessionEndpointPtr MockEndpointLocator::localLookup(const string& id)
{
diff --git a/test/MockEndpointLocator.h b/test/MockEndpointLocator.h
index f3a6370..0c725b1 100644
--- a/test/MockEndpointLocator.h
+++ b/test/MockEndpointLocator.h
@@ -39,7 +39,7 @@ public:
MockSessionEndpointPtr addEndpoint(const std::string& id);
/**
- * Like lookup, but for the local channel we are simulating.
+ * Like lookup, but for the local channel we are simulating.
*/
MockSessionEndpointPtr localLookup(const std::string& id);
diff --git a/test/MockSession.cpp b/test/MockSession.cpp
index 87355c3..5d17961 100644
--- a/test/MockSession.cpp
+++ b/test/MockSession.cpp
@@ -30,18 +30,18 @@ namespace RoutingTest
{
/**
-* A functor to send stop() to a SessionListener.
-*/
+ * A functor to send stop() to a SessionListener.
+ */
class SendStop
{
public:
- SendStop(const SessionPrx& myProxy, const ResponseCodePtr& response)
+ SendStop(const SessionPrx& myProxy, const ResponseCodePtr& response)
: mMyProxy(myProxy),
mResponse(response)
{
}
- void operator()(const SessionListenerPrx& l)
+ void operator()(const SessionListenerPrx& l)
{
l->stopped(mMyProxy, mResponse);
}
@@ -51,18 +51,18 @@ private:
ResponseCodePtr mResponse;
};
-MockSession::MockSession(const string& legId,
- const string& sessionId,
- const AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx& endpointPrx)
+MockSession::MockSession(const string& legId,
+ const string& sessionId,
+ const AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx& endpointPrx)
: mLegId(legId),
- mId(sessionId),
- mEndpointPrx(endpointPrx),
+ mId(sessionId),
+ mEndpointPrx(endpointPrx),
mSessionInfo(new AsteriskSCF::SessionCommunications::V1::SessionInfo()),
mBridgeSet(false),
mBridgeReplaced(false),
mBridgePrx(0)
{
- mSessionInfo->role = legId; // for testing
+ mSessionInfo->role = legId; // for testing
}
MockSession::~MockSession()
@@ -94,7 +94,7 @@ void MockSession::flash(const Ice::Current&)
{
}
-SessionEndpointPrx MockSession::getEndpoint(const Ice::Current&)
+SessionEndpointPrx MockSession::getEndpoint(const Ice::Current&)
{
return mEndpointPrx;
}
@@ -140,7 +140,7 @@ void MockSession::start(const Ice::Current&)
for(vector<SessionListenerPrx>::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
{
- // Auto-answer!
+ // Auto-answer!
(*i)->connected(mMyPrx);
}
}
@@ -163,12 +163,12 @@ void MockSession::setProxy(const SessionPrx& sessionPrx)
BridgePrx MockSession::getBridge(const Ice::Current &)
{
- return mBridgePrx;
+ return mBridgePrx;
}
-SessionInfoPtr MockSession::setBridge(const BridgePrx& bridge,
- const SessionListenerPrx& listener,
- const Ice::Current ¤t)
+SessionInfoPtr MockSession::setBridge(const BridgePrx& bridge,
+ const SessionListenerPrx& listener,
+ const Ice::Current ¤t)
{
mBridgePrx = bridge;
mBridgeSet = true;
@@ -178,8 +178,8 @@ SessionInfoPtr MockSession::setBridge(const BridgePrx& bridge,
return mSessionInfo;
}
-void MockSession::removeBridge(const SessionListenerPrx& listener,
- const Ice::Current ¤t)
+void MockSession::removeBridge(const SessionListenerPrx& listener,
+ const Ice::Current ¤t)
{
mBridgePrx = 0;
mBridgeSet = false;
diff --git a/test/MockSession.h b/test/MockSession.h
index 03a8a93..3bdcdd8 100644
--- a/test/MockSession.h
+++ b/test/MockSession.h
@@ -30,7 +30,7 @@ public:
~MockSession();
public:
- // Overrides
+ // Overrides
AsteriskSCF::SessionCommunications::V1::SessionInfoPtr addListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&);
void connect(const Ice::Current&);
diff --git a/test/MockSessionEndpoint.cpp b/test/MockSessionEndpoint.cpp
index 675b0d8..0f26071 100644
--- a/test/MockSessionEndpoint.cpp
+++ b/test/MockSessionEndpoint.cpp
@@ -45,7 +45,7 @@ SessionPrx MockSessionEndpoint::createSession(const string& dest, const SessionL
session->setProxy(sessionPrx);
- return sessionPrx;
+ return sessionPrx;
}
SessionSeq MockSessionEndpoint::getSessions(const Ice::Current&)
diff --git a/test/SharedTestData.h b/test/SharedTestData.h
index 819c622..e1770eb 100644
--- a/test/SharedTestData.h
+++ b/test/SharedTestData.h
@@ -28,14 +28,14 @@ namespace AsteriskSCF
{
namespace RoutingTest
{
-/**
+/**
* Pseudo singleton for sharing data among test artifacts.
*/
struct SharedTestData
{
- static SharedTestData instance;
+ static SharedTestData instance;
- // Communicator for outgoing stuff.
+ // Communicator for outgoing stuff.
Ice::CommunicatorPtr communicatorOut;
// Communicator for incoming stuff. This is where we add the test servants.
@@ -48,7 +48,7 @@ struct SharedTestData
AsteriskSCF::Core::Routing::V1::LocatorRegistryPrx locatorRegistry;
AsteriskSCF::SessionCommunications::V1::SessionRouterPrx sessionRouter;
- // Our own EndpointLocator to server up endpoints to the RoutingService, emulating a channel.
+ // Our own EndpointLocator to server up endpoints to the RoutingService, emulating a channel.
MockEndpointLocatorPtr endpointLocator;
AsteriskSCF::Core::Routing::V1::EndpointLocatorPrx endpointLocatorPrx;
AsteriskSCF::Core::Routing::V1::RegExSeq regExIds;
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 2b08a74..c37ed79 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -61,8 +61,8 @@ public:
};
void RoutingServiceTest::start(std::string const &name,
- Ice::CommunicatorPtr const &communicator,
- Ice::StringSeq const &args)
+ Ice::CommunicatorPtr const &communicator,
+ Ice::StringSeq const &args)
{
std::vector<char const *> argv;
argv.push_back(name.c_str());
@@ -87,10 +87,10 @@ void RoutingServiceTest::stop()
extern "C"
{
- ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
- {
- return new RoutingServiceTest;
- }
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+{
+ return new RoutingServiceTest;
+}
}
/**
@@ -126,25 +126,25 @@ struct GlobalIceFixture
Ice::PropertiesPtr props = SharedTestData::instance.communicatorIn->getProperties();
SharedTestData::instance.adapterIn = SharedTestData::instance.communicatorIn->createObjectAdapterWithEndpoints("TestRoutingAdapterIn", "default -p 10070");
- // Serve up our own EndpointLocator, since we're emulating a channel.
+ // Serve up our own EndpointLocator, since we're emulating a channel.
MockEndpointLocator *locator = new MockEndpointLocator();
SharedTestData::instance.endpointLocator = locator;
SharedTestData::instance.adapterIn->add(SharedTestData::instance.endpointLocator, SharedTestData::instance.communicatorIn->stringToIdentity(LocatorObjectId));
SharedTestData::instance.adapterIn->activate();
- // Now that the adapter has been activated, get a local proxy to our EndpointLocator.
+ // Now that the adapter has been activated, get a local proxy to our EndpointLocator.
Ice::ObjectPrx locatorObjectPrx = SharedTestData::instance.adapterIn->createDirectProxy(SharedTestData::instance.communicatorIn->stringToIdentity(LocatorObjectId));
SharedTestData::instance.endpointLocatorPrx = EndpointLocatorPrx::checkedCast(locatorObjectPrx);
// Now set up outgoing adapter. This will be used for proxies we want to call out to the
- // the unit under test on.
+ // the unit under test on.
SharedTestData::instance.communicatorOut = Ice::initialize(initData);
SharedTestData::instance.adapterOut = SharedTestData::instance.communicatorOut->createObjectAdapterWithEndpoints("TestRoutingAdapterOut", "default -p 10071");
// Get ref to Routing Service so we can test it. Getting direct for now, but
- // need to test acquiring reference via ServiceLocator as well.
- Ice::PropertiesPtr communicatorProps = SharedTestData::instance.communicatorOut->getProperties();
+ // need to test acquiring reference via ServiceLocator as well.
+ Ice::PropertiesPtr communicatorProps = SharedTestData::instance.communicatorOut->getProperties();
string locatorProp = communicatorProps->getProperty("LocatorRegistry.Proxy");
Ice::ObjectPrx locatorObj = SharedTestData::instance.communicatorOut->propertyToProxy("LocatorRegistry.Proxy");
SharedTestData::instance.locatorRegistry = LocatorRegistryPrx::checkedCast(locatorObj);
@@ -152,7 +152,7 @@ struct GlobalIceFixture
// Get the ServiceLocator and ServiceLocator manager
- if (!SharedTestData::instance.locatorRegistry)
+ if (!SharedTestData::instance.locatorRegistry)
{
throw "Invalid LocatorRegistry";
}
@@ -160,7 +160,7 @@ struct GlobalIceFixture
Ice::ObjectPrx routerObj = SharedTestData::instance.communicatorOut->propertyToProxy("SessionRouter.Proxy");
SharedTestData::instance.sessionRouter = SessionRouterPrx::checkedCast(routerObj);
- if (!SharedTestData::instance.sessionRouter)
+ if (!SharedTestData::instance.sessionRouter)
{
throw "Invalid SessionRouter";
}
@@ -183,9 +183,9 @@ struct GlobalIceFixture
void RegisterWithServiceLocator()
{
- // Get a proxy to the management interface for the Service Locator, so we can add
- // our mock BridgeManager to the system.
- SharedTestData::instance.serviceLocatorManagement = ServiceLocatorManagementPrx::checkedCast(SharedTestData::instance.communicatorIn->propertyToProxy("LocatorServiceManagement.Proxy"));
+ // Get a proxy to the management interface for the Service Locator, so we can add
+ // our mock BridgeManager to the system.
+ SharedTestData::instance.serviceLocatorManagement = ServiceLocatorManagementPrx::checkedCast(SharedTestData::instance.communicatorIn->propertyToProxy("LocatorServiceManagement.Proxy"));
if (SharedTestData::instance.serviceLocatorManagement == 0)
{
@@ -214,7 +214,7 @@ struct GlobalIceFixture
SharedTestData::instance.endpointLocator->addEndpoint("104");
// Initialize the regular expressions for the ids that this channel will support.
- // Use two strings just for kicks.
+ // Use two strings just for kicks.
SharedTestData::instance.regExIds.push_back("101");
SharedTestData::instance.regExIds.push_back("10[234]"); // 102, 103 or 104
}
@@ -224,12 +224,12 @@ struct GlobalIceFixture
BOOST_TEST_MESSAGE("Tearing down Routing Test global test fixture");
- if (SharedTestData::instance.communicatorIn)
+ if (SharedTestData::instance.communicatorIn)
{
SharedTestData::instance.communicatorIn->shutdown();
SharedTestData::instance.communicatorIn = 0;
}
- if (SharedTestData::instance.communicatorOut)
+ if (SharedTestData::instance.communicatorOut)
{
SharedTestData::instance.communicatorOut->shutdown();
SharedTestData::instance.communicatorOut = 0;
@@ -243,8 +243,8 @@ BOOST_GLOBAL_FIXTURE(GlobalIceFixture);
struct PerTestFixture
{
-public:
- PerTestFixture()
+public:
+ PerTestFixture()
{
try
{
@@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE(AddAndRemoveEndpointLocator)
/**
* Test adding a locator twice with the service's Locator Registry.
* This was supposed to throw exception in the past, but is now allowed. The second
- * registration replaces the existing registration.
+ * registration replaces the existing registration.
*/
BOOST_AUTO_TEST_CASE(AddEndpointLocatorTwice)
{
@@ -391,8 +391,8 @@ BOOST_FIXTURE_TEST_CASE(LookupOwnEndpoint, PerTestFixture)
}
-/**
- * This tests if we can route a session.
+/**
+ * This tests if we can route a session.
*/
BOOST_FIXTURE_TEST_CASE(RouteSession, PerTestFixture)
{
@@ -411,7 +411,7 @@ BOOST_FIXTURE_TEST_CASE(RouteSession, PerTestFixture)
BOOST_TEST_MESSAGE("Routing the session...");
SharedTestData::instance.sessionRouter->routeSession(session, "102");
-
+
BOOST_CHECK(SharedTestData::instance.mBridgeConnected);
BridgePrx bridge = session->getBridge();
@@ -419,12 +419,12 @@ BOOST_FIXTURE_TEST_CASE(RouteSession, PerTestFixture)
SessionSeq sessions = bridge->listSessions();
BOOST_CHECK(sessions.size() == 2);
-
+
for(SessionSeq::iterator s = sessions.begin(); s != sessions.end(); ++s)
{
SessionInfoPtr sessionInfo = (*s)->getInfo();
- // For testing we put the leg id in the role field.
+ // For testing we put the leg id in the role field.
BOOST_CHECK(sessionInfo->role == "101" || sessionInfo->role == "102");
// For testing, we put the number of listeners in the connectedTime field.
@@ -449,8 +449,8 @@ BOOST_FIXTURE_TEST_CASE(RouteSession, PerTestFixture)
}
}
-/**
- * This tests blind transfer.
+/**
+ * This tests blind transfer.
*/
BOOST_FIXTURE_TEST_CASE(BlindTransfer, PerTestFixture)
{
@@ -475,19 +475,19 @@ BOOST_FIXTURE_TEST_CASE(BlindTransfer, PerTestFixture)
... 50 lines suppressed ...
--
asterisk-scf/integration/routing.git
More information about the asterisk-scf-commits
mailing list