[asterisk-scf-commits] asterisk-scf/release/routing.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon May 9 18:23:01 CDT 2011


branch "master" has been updated
       via  a6c250edee3612162b4c78d3a72296b58a5e5432 (commit)
      from  a70e94cdaa91af18fd64718000c188d06420ca69 (commit)

Summary of changes:
 src/RoutingStateReplicatorListener.cpp~HEAD |  215 ---------------------------
 src/RoutingStateReplicatorListener.h~HEAD   |   54 -------
 2 files changed, 0 insertions(+), 269 deletions(-)
 delete mode 100644 src/RoutingStateReplicatorListener.cpp~HEAD
 delete mode 100644 src/RoutingStateReplicatorListener.h~HEAD


- Log -----------------------------------------------------------------
commit a6c250edee3612162b4c78d3a72296b58a5e5432
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon May 9 18:22:21 2011 -0500

    Removed extraneous files.

diff --git a/src/RoutingStateReplicatorListener.cpp~HEAD b/src/RoutingStateReplicatorListener.cpp~HEAD
deleted file mode 100644
index dc48b3c..0000000
--- a/src/RoutingStateReplicatorListener.cpp~HEAD
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010-2011, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk SCF project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE.txt file
- * at the top of the source tree.
- */
-
-#include <IceUtil/UUID.h>
-
-#include <boost/thread.hpp>
-
-#include <AsteriskSCF/logger.h>
-
-#include "RoutingStateReplicatorListener.h"
-#include "OperationReplicaCache.h"
-#include "RouteSessionOperation.h"
-#include "EndpointRegistry.h"
-
-using namespace AsteriskSCF::BasicRoutingService::V1;
-using namespace AsteriskSCF::System::Logging;
-
-namespace
-{
-Logger lg = getLoggerFactory().getLogger("AsteriskSCF.BasicRoutingService");
-}
-
-namespace AsteriskSCF
-{
-namespace BasicRoutingService
-{
-/** 
- * Private details of our RoutingStateReplicatorListener implementation. 
- */
-class RoutingStateReplicatorListenerPriv
-{
-public:
-   RoutingStateReplicatorListenerPriv(const EndpointRegistryPtr& registry, const boost::shared_ptr<OperationReplicaCache>& opCache)
-        : mId(IceUtil::generateUUID()),
-          mEndpointRegistry(registry),
-          mOperationReplicaCache(opCache)
-   {
-   }
-
-    void stateRemovedForItems(const RoutingStateItemSeq& items, const Ice::Current& current)
-    {
-        // Method local visitor implementation for handling removal of state items. 
-	    class visitor : public AsteriskSCF::BasicRoutingService::V1::RoutingStateItemVisitor
-	    {
-	    public:
-	        visitor(RoutingStateReplicatorListenerPriv *impl) : mImpl(impl)
-	        {
-	        }
-
-	    private:
-	        RoutingStateReplicatorListenerPriv *mImpl;
-
-            void visitRouteSessionOpStart(const ::AsteriskSCF::BasicRoutingService::V1::RouteSessionOpStartPtr& opState)
-            {
-                // The operation cache keeps all the collected state for an operation under the transaction id. 
-                mImpl->mOperationReplicaCache->getRouteSessionCache()->dropOperation(opState->operationId);
-            }
-
-            void visitRouteSessionOpWaitLookupState(const ::AsteriskSCF::BasicRoutingService::V1::RouteSessionOpWaitLookupStatePtr& opState)
-            {
-                // Removing the Start state for this operation will clean it up. 
-            }
-
-            void visitRouteSessionOpBridgingState(const ::AsteriskSCF::BasicRoutingService::V1::RouteSessionOpBridgingStatePtr& opState)
-            {
-                // Removing the Start state for this operation will clean it up. 
-            }
-
-            void visitConnectBridgedSessionsWithDestinationOpStart(const ::AsteriskSCF::BasicRoutingService::V1::ConnectBridgedSessionsWithDestinationOpStartPtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getConnectBridgedSessionsWithDestCache()->dropOperation(opState->operationId);
-            }
-
-            void visitConnectBridgedSessionsWithDestinationOpWaitLookupState(const ::AsteriskSCF::BasicRoutingService::V1::ConnectBridgedSessionsWithDestinationOpWaitLookupStatePtr& opState)
-            {
-                // Removing the Start state for this operation will clean it up. 
-            }
-
-            void visitConnectBridgedSessionsWithDestinationOpBridgingState(const ::AsteriskSCF::BasicRoutingService::V1::ConnectBridgedSessionsWithDestinationOpBridgingStatePtr& opState)
-            {
-                // Removing the Start state for this operation will clean it up. 
-            }
-
-            void visitEndpointLocatorState(const ::AsteriskSCF::BasicRoutingService::V1::EndpointLocatorStatePtr& item)
-            {
-                mImpl->mEndpointRegistry->removeEndpointLocator(item->key, ::Ice::Current());
-            }
-
-        }; // end method-local visitor def
-
-        // Create the visitor. Smart pointer will cleanup when this method exits. 
-        AsteriskSCF::BasicRoutingService::V1::RoutingStateItemVisitorPtr v = new visitor(this);
-
-        for (RoutingStateItemSeq::const_iterator item = items.begin(); item != items.end(); ++item)
-        {
-	        (*item)->visit(v);
-        }
-    }
-
-    void stateRemoved(const Ice::StringSeq& itemKeys, const Ice::Current& current)
-    {
-        lg(Error) << "Routing Service does not use key-based removes for state replication.";
-    }
-
-    void stateSet(const RoutingStateItemSeq& items, const Ice::Current& current)
-    {
-        // Method-local visitor class for handling new state. 
-
-	    class visitor : public AsteriskSCF::BasicRoutingService::V1::RoutingStateItemVisitor
-	    {
-	    public:
-	        visitor(RoutingStateReplicatorListenerPriv *impl, const Ice::Current& current)  
-                        :  mImpl(impl), mCurrent(current)
-	        {
-	        }
-
-	    private:
-	        RoutingStateReplicatorListenerPriv *mImpl;
-            const Ice::Current& mCurrent;
-
-            void visitRouteSessionOpStart(const ::AsteriskSCF::BasicRoutingService::V1::RouteSessionOpStartPtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getRouteSessionCache()->cacheOperationState(opState);
-            }
-
-            void visitRouteSessionOpWaitLookupState(const ::AsteriskSCF::BasicRoutingService::V1::RouteSessionOpWaitLookupStatePtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getRouteSessionCache()->cacheOperationState(opState);
-            }
-
-            void visitRouteSessionOpBridgingState(const ::AsteriskSCF::BasicRoutingService::V1::RouteSessionOpBridgingStatePtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getRouteSessionCache()->cacheOperationState(opState);
-            }
-
-            void visitConnectBridgedSessionsWithDestinationOpStart(const ::AsteriskSCF::BasicRoutingService::V1::ConnectBridgedSessionsWithDestinationOpStartPtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getConnectBridgedSessionsWithDestCache()->cacheOperationState(opState);
-            }
-
-            void visitConnectBridgedSessionsWithDestinationOpWaitLookupState(const ::AsteriskSCF::BasicRoutingService::V1::ConnectBridgedSessionsWithDestinationOpWaitLookupStatePtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getConnectBridgedSessionsWithDestCache()->cacheOperationState(opState);
-            }
-
-            void visitConnectBridgedSessionsWithDestinationOpBridgingState(const ::AsteriskSCF::BasicRoutingService::V1::ConnectBridgedSessionsWithDestinationOpBridgingStatePtr& opState)
-            {
-                mImpl->mOperationReplicaCache->getConnectBridgedSessionsWithDestCache()->cacheOperationState(opState);
-            }
-
-            void visitEndpointLocatorState(const ::AsteriskSCF::BasicRoutingService::V1::EndpointLocatorStatePtr& item)
-            {
-                mImpl->mEndpointRegistry->addEndpointLocator(item->key, item->regExList, item->locator, mCurrent);
-            }
-
-        }; // end method-local visitor def
-
-        // Create the visitor. Smart pointer will cleanup when this method exits. 
-        AsteriskSCF::BasicRoutingService::V1::RoutingStateItemVisitorPtr v = new visitor(this, current);
-
-        for (RoutingStateItemSeq::const_iterator item = items.begin(); item != items.end(); ++item)
-        {
-	        (*item)->visit(v);
-        }
-    }
-
-    std::string mId;
-    EndpointRegistryPtr mEndpointRegistry;
-    boost::shared_ptr<OperationReplicaCache> mOperationReplicaCache;
-};
-
-RoutingStateReplicatorListenerImpl::RoutingStateReplicatorListenerImpl(const EndpointRegistryPtr& registry, const boost::shared_ptr<OperationReplicaCache>& opCache)
-    : mImpl(new RoutingStateReplicatorListenerPriv(registry, opCache)) 
-{
-}
-
-RoutingStateReplicatorListenerImpl::~RoutingStateReplicatorListenerImpl()
-{
-}
-
-void RoutingStateReplicatorListenerImpl::stateRemoved(const Ice::StringSeq& itemKeys, const Ice::Current& current)
-{
-    mImpl->stateRemoved(itemKeys, current);
-}
-
-void RoutingStateReplicatorListenerImpl::stateRemovedForItems(const RoutingStateItemSeq& items, const Ice::Current& current)
-{
-    mImpl->stateRemovedForItems(items, current);
-}
-
-void RoutingStateReplicatorListenerImpl::stateSet(const RoutingStateItemSeq& items, const Ice::Current& current)
-{
-    mImpl->stateSet(items, current);
-}
-
-bool RoutingStateReplicatorListenerImpl::operator==(RoutingStateReplicatorListenerImpl &rhs)
-{
-    return mImpl->mId == rhs.mImpl->mId;
-}
-
-};
-};
diff --git a/src/RoutingStateReplicatorListener.h~HEAD b/src/RoutingStateReplicatorListener.h~HEAD
deleted file mode 100644
index 61b8ea2..0000000
--- a/src/RoutingStateReplicatorListener.h~HEAD
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010-2011, Digium, Inc.
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk SCF project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE.txt file
- * at the top of the source tree.
- */
-
-#pragma once
-
-#include <Ice/Ice.h>
-#include <boost/shared_ptr.hpp>
-
-#include <AsteriskSCF/StateReplicator.h>
-
-#include "BasicRoutingStateReplicationIf.h"
-#include "OperationReplicaCache.h"
-
-namespace AsteriskSCF
-{
-namespace BasicRoutingService
-{
-class RoutingStateReplicatorListenerPriv;
-
-/** 
- * Our RoutingStateReplicatorListener implementation. 
- * This object listens for updates from the state replicator when 
- * this service is in standby mode, and ensures that this instance of the
- * service has the latest dynamic state in case it is activated. 
- */
-class RoutingStateReplicatorListenerImpl : public AsteriskSCF::BasicRoutingService::V1::RoutingStateReplicatorListener
-{
-public:
-    RoutingStateReplicatorListenerImpl(const EndpointRegistryPtr& registry, const boost::shared_ptr<OperationReplicaCache>& opCache);
-    ~RoutingStateReplicatorListenerImpl();
-    void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateRemovedForItems(const AsteriskSCF::BasicRoutingService::V1::RoutingStateItemSeq&, const Ice::Current&);
-    void stateSet(const AsteriskSCF::BasicRoutingService::V1::RoutingStateItemSeq&, const Ice::Current&);
-    bool operator==(RoutingStateReplicatorListenerImpl &rhs);
-
-private:
-    boost::shared_ptr<RoutingStateReplicatorListenerPriv> mImpl;
-};
-
-};
-};

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list