[asterisk-scf-commits] asterisk-scf/integration/bridging.git branch "retry_deux" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 4 09:22:18 CDT 2012


branch "retry_deux" has been updated
       via  8cd4348ac2d38f19a7d33b2af7b784ab99603cac (commit)
      from  d1a57492f1f74034d6f376c27924d42e9d1831c8 (commit)

Summary of changes:
 src/BridgeCreationExtensionPointImpl.cpp |    3 +-
 src/BridgeImpl.cpp                       |    3 +-
 src/BridgeManagerImpl.cpp                |    3 +-
 src/BridgePartyIdExtensionPoint.cpp      |    4 +-
 src/CMakeLists.txt                       |    3 -
 src/ExceptionWrapper.h                   |  110 -------
 src/OperationMonitor.cpp                 |   86 ------
 src/OperationMonitor.h                   |  482 ------------------------------
 src/SessionListener.cpp                  |    4 +-
 test/CMakeLists.txt                      |    1 -
 10 files changed, 10 insertions(+), 689 deletions(-)
 delete mode 100755 src/ExceptionWrapper.h
 delete mode 100755 src/OperationMonitor.cpp
 delete mode 100755 src/OperationMonitor.h


- Log -----------------------------------------------------------------
commit 8cd4348ac2d38f19a7d33b2af7b784ab99603cac
Author: Brent Eagles <beagles at digium.com>
Date:   Mon Apr 2 15:22:08 2012 -0230

    Moved OperationMonitor and ExceptionWrapper to ice-util-cpp.

diff --git a/src/BridgeCreationExtensionPointImpl.cpp b/src/BridgeCreationExtensionPointImpl.cpp
index 73d0367..105d6fa 100755
--- a/src/BridgeCreationExtensionPointImpl.cpp
+++ b/src/BridgeCreationExtensionPointImpl.cpp
@@ -19,13 +19,14 @@
 #include "BridgeServiceConfig.h"
 #include <AsteriskSCF/Operations/OperationContext.h>
 #include <AsteriskSCF/Operations/OperationContextCache.h>
-#include "OperationMonitor.h"
+#include <AsteriskSCF/Operations/OperationMonitor.h>
 
 using namespace AsteriskSCF::BridgeService;
 using namespace AsteriskSCF::SessionCommunications::V1;
 using namespace AsteriskSCF::SessionCommunications::ExtensionPoints::V1;
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::System::Hook::V1;
+using namespace AsteriskSCF::Operations;
 
 namespace 
 {
diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index 1057a5b..3f02425 100755
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -32,7 +32,7 @@
 #include "SessionListener.h"
 #include <AsteriskSCF/Operations/OperationContextCache.h>
 #include <AsteriskSCF/Operations/OperationContext.h>
-#include "OperationMonitor.h"
+#include <AsteriskSCF/Operations/OperationMonitor.h>
 
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::SessionCommunications::V1;
@@ -40,6 +40,7 @@ using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
 using namespace AsteriskSCF::SessionCommunications::ExtensionPoints::V1;
 using namespace AsteriskSCF::BridgeService;
 using namespace AsteriskSCF::Replication::BridgeService::V1;
+using namespace AsteriskSCF::Operations;
 using namespace AsteriskSCF;
 using namespace std;
 
diff --git a/src/BridgeManagerImpl.cpp b/src/BridgeManagerImpl.cpp
index c4e9daa..0c7d3de 100755
--- a/src/BridgeManagerImpl.cpp
+++ b/src/BridgeManagerImpl.cpp
@@ -30,7 +30,7 @@
 #include <AsteriskSCF/Operations/OperationContext.h>
 #include <AsteriskSCF/Operations/OperationContextCache.h>
 
-#include "OperationMonitor.h"
+#include <AsteriskSCF/Operations/OperationMonitor.h>
 
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::System;
@@ -42,6 +42,7 @@ using namespace AsteriskSCF::BridgeService;
 using namespace AsteriskSCF::Replication::BridgeService::V1;
 using namespace AsteriskSCF::SessionCommunications::ExtensionPoints::V1;
 using namespace AsteriskSCF::SessionCommunications::PartyIdentification::V1;
+using namespace AsteriskSCF::Operations;
 using namespace std;
 
 namespace 
diff --git a/src/BridgePartyIdExtensionPoint.cpp b/src/BridgePartyIdExtensionPoint.cpp
index a361a33..2cb15b6 100644
--- a/src/BridgePartyIdExtensionPoint.cpp
+++ b/src/BridgePartyIdExtensionPoint.cpp
@@ -19,17 +19,17 @@
 #include <AsteriskSCF/Logger.h>
 #include <AsteriskSCF/Collections/ProxySet.h>
 #include <AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.h>
+#include <AsteriskSCF/Operations/OperationMonitor.h>
 
 #include "BridgePartyIdExtensionPoint.h"
 
-#include "OperationMonitor.h"
-
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::SessionCommunications::V1;
 using namespace AsteriskSCF::SessionCommunications::ExtensionPoints::V1;
 using namespace AsteriskSCF::BridgeService;
 using namespace AsteriskSCF::Replication::BridgeService::V1;
 using namespace AsteriskSCF::Collections;
+using namespace AsteriskSCF::Operations;
 
 //
 // TODO: There is a fairly big bug here. The extension point
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 716999b..904272c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,9 +36,6 @@ astscf_component_add_files(BridgeService Tasks.h)
 astscf_component_add_files(BridgeService InternalExceptions.h)
 astscf_component_add_files(BridgeService BridgeServiceConfig.h)
 astscf_component_add_files(BridgeService ListenerManager.h)
-astscf_component_add_files(BridgeService OperationMonitor.cpp)
-astscf_component_add_files(BridgeService OperationMonitor.h)
-astscf_component_add_files(BridgeService ExceptionWrapper.h)
 astscf_component_add_files(BridgeService ReplicatorSmartProxy.h)
 astscf_component_add_slices(BridgeService PROJECT AsteriskSCF/Replication/BridgeService/BridgeReplicatorIf.ice)
 astscf_component_add_ice_libraries(BridgeService IceStorm)
diff --git a/src/ExceptionWrapper.h b/src/ExceptionWrapper.h
deleted file mode 100755
index fd31791..0000000
--- a/src/ExceptionWrapper.h
+++ /dev/null
@@ -1,110 +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/Exception.h>
-#include <Ice/LocalException.h>
-#include <exception>
-#include <string>
-#include <boost/shared_ptr.hpp>
-#include <AsteriskSCF/Operations/OperationContextCache.h>
-
-namespace AsteriskSCF
-{
-
-namespace BridgeService
-{
-
-typedef boost::shared_ptr<IceUtil::Exception> ExceptionPtr;
-class ExceptionWrapper;
-typedef boost::shared_ptr<ExceptionWrapper> ExceptionWrapperPtr;
-
-/** 
- * ExceptionWrapper is OperationContextCookie derived class for
- * storing exceptional results for use later on. 
- */
-class ExceptionWrapper
-{
-
-public:
-    /**
-     * Several conversion constructors are provided for
-     * convenience. While conversion constructors can be problematic,
-     * the nature of this class is "to wrap"... so there!
-     */
-    explicit
-    ExceptionWrapper(const IceUtil::Exception& ex) :
-        mException(ex.ice_clone())
-    {
-    }
-
-    /**
-     * Unfortunately std::exception does not provide a way to clone
-     * the most-derived type at runtime. As the ultimate goal is to
-     * send this exception to an Ice client, we need only do as well
-     * as the Ice runtime can -- create an
-     * Ice::UnknownException(). The __FILE__ and __LINE__ will not be
-     * related to the original exception, but does have value in that
-     * it shows where the std::exception->Ice exception translation
-     * occurs.
-     */
-    explicit
-    ExceptionWrapper(const std::exception& ex) :
-        mException(new Ice::UnknownException(__FILE__, __LINE__, ex.what()))
-    {
-    }
-
-    /**
-     * Intended for those catch (...) cases. Something can be passed back,
-     * but like std::exceptions, Ice will end up sending an
-     * UnknownException.
-     */
-    explicit
-    ExceptionWrapper(const std::string& msg) :
-       mException(new Ice::UnknownException(__FILE__, __LINE__, msg))
-    {
-    }
-
-    /**
-     * Accessor to get the wrapped exception.
-     */
-    ExceptionPtr exception() const
-    {
-        return mException;
-    }
-
-    static ExceptionWrapperPtr create(const Ice::Exception& x)
-    {
-        return ExceptionWrapperPtr(new ExceptionWrapper(x));
-    }
-
-    static ExceptionWrapperPtr create(const std::exception& x)
-    {
-        return ExceptionWrapperPtr(new ExceptionWrapper(x));
-    }
-
-    static ExceptionWrapperPtr create(const std::string& msg)
-    {
-        return ExceptionWrapperPtr(new ExceptionWrapper(msg));
-    }
-
-private:
-    ExceptionPtr mException;
-};
-
-} /* end of namespace BridgeService */
-} /* end of namespace AsteriskSCF */
diff --git a/src/OperationMonitor.cpp b/src/OperationMonitor.cpp
deleted file mode 100755
index db2d82c..0000000
--- a/src/OperationMonitor.cpp
+++ /dev/null
@@ -1,86 +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 "OperationMonitor.h"
-
-namespace AsteriskSCF
-{
-namespace BridgeService
-{
-
-ContextMonitorPtr ContextData::getMonitor()
-{
-    return mMonitor;
-}
-
-ExceptionWrapperPtr ContextData::getException()
-{
-    IceUtil::LockT<IceUtil::Mutex> lock(mLock);
-    return mExceptionResult;
-}
-
-void ContextData::setException(const ExceptionWrapperPtr& exception)
-{
-    IceUtil::LockT<IceUtil::Mutex> lock(mLock);
-    mExceptionResult = exception;
-    onSetException();
-    mMonitor->setCompleted();
-}
-
-bool ContextData::isCompleted()
-{
-    return mMonitor->isCompleted();
-}
-
-ContextDataPtr checkAndThrow(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
-    const AsteriskSCF::System::V1::OperationContextPtr& context)
-{
-    ContextDataPtr contextData(new ContextData);
-    AsteriskSCF::Operations::OperationContextCookiePtr oldContextData;
-    if (!cache->addOperationContext(context, contextData, oldContextData))
-    {
-        assert(oldContextData);
-        contextData = boost::dynamic_pointer_cast<ContextData>(oldContextData);
-        assert(contextData);
-        if (!contextData)
-        {
-            return ContextDataPtr();
-        }
-
-        //
-        // TODO: A safer way to do this would be to surround this with
-        // a while() loop that checks for completion status. I'm a
-        // little hesitant to do this since there are no mechanisms
-        // for clean shutdown right now.
-        //
-        contextData->getMonitor()->waitForResults();
-
-        //
-        // We can at least do this for debug builds.
-        //
-        assert(contextData->getMonitor()->isCompleted());
-        ExceptionWrapperPtr exception = contextData->getException();
-        if (exception)
-        {
-            exception->exception()->ice_throw();
-        }
-        return ContextDataPtr();
-    }
-    return contextData;
-}
-
-} /* End of namespace BridgeService */
-} /* End of namespace AsteriskSCF */
diff --git a/src/OperationMonitor.h b/src/OperationMonitor.h
deleted file mode 100755
index 5e903d8..0000000
--- a/src/OperationMonitor.h
+++ /dev/null
@@ -1,482 +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/Exception.h>
-#include <exception>
-#include <string>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <AsteriskSCF/Operations/OperationContext.h>
-#include <AsteriskSCF/Operations/OperationContextCache.h>
-#include "ExceptionWrapper.h"
-
-namespace AsteriskSCF
-{
-namespace BridgeService
-{
-
-/**
- * The ContextMonitor provides a mechanism for waiting for a result when multiple 
- * upcalls occur for the same OperationContext. Of course this is only relevant for 
- * non-AMD implementations.
- */
-class ContextMonitor : public IceUtil::Shared
-{
-public:
-    ContextMonitor() :
-        mCompleted(false),
-        mCancelled(false)
-    {
-    }
-
-    bool isCompleted() 
-    {
-        IceUtil::Monitor<IceUtil::Mutex>::Lock lock(mMonitor);
-        return mCompleted;
-    }
-
-    bool waitForResults()
-    {
-        IceUtil::Monitor<IceUtil::Mutex>::Lock lock(mMonitor);
-        while (!mCompleted && !mCancelled)
-        {
-            mMonitor.wait();
-        }
-        return mCompleted;
-    }
-
-    void setCompleted()
-    {
-        IceUtil::Monitor<IceUtil::Mutex>::Lock lock(mMonitor);
-        mCompleted = true;
-        mMonitor.notify();
-    }
-
-    /**
-     * Revisit: this was added before there was a specific use for it. If it is not referenced, 
-     * it probably should be removed (along with the related member variable of course).
-     */
-    void cancel()
-    {
-        IceUtil::Monitor<IceUtil::Mutex>::Lock lock(mMonitor);
-        mCancelled = true;
-        mMonitor.notify();
-    }
-
-private:
-    bool mCompleted;
-    bool mCancelled;
-    IceUtil::Monitor<IceUtil::Mutex> mMonitor;
-};
-typedef IceUtil::Handle<ContextMonitor> ContextMonitorPtr;
-
-class ContextData : virtual public AsteriskSCF::Operations::OperationContextCookie,
-                    virtual public boost::enable_shared_from_this<ContextData>
-{
-public:
-    ContextData() :
-        mMonitor(new ContextMonitor)
-    {
-    }
-
-    /**
-     * Get a results monitor object for this context's data.
-     */
-    ContextMonitorPtr getMonitor();
-
-    /**
-     * If the operations performed for this operation context result
-     * in an exception that should be reported back to the client,
-     * then this should be non-null and contain a wrapper to the
-     * exception to be passed back.
-     */
-    ExceptionWrapperPtr getException();
-
-    void setException(const ExceptionWrapperPtr& exception);
-
-    /**
-     * A quick, single point accessor to determine the completion
-     * statius of the related operation. The alternative would be to
-     * get the monitor and ask it.
-     */
-    bool isCompleted();
-
-    virtual void setCompleted()
-    {
-        mMonitor->setCompleted();
-        onSetCompleted();
-    }
-   
-protected:
-    IceUtil::Mutex mLock;
-    
-    ContextMonitorPtr mMonitor;
-    ExceptionWrapperPtr mExceptionResult;
-
-    virtual void onSetException()
-    {
-    }
-
-    virtual void onSetCompleted()
-    {
-    }
-};
-typedef boost::shared_ptr<ContextData> ContextDataPtr;
-
-/**
- * Template derived class of ContextData.  
- * TODO: comment on rationale. The general idea is that the casting
- * can occur on the context result data, not on what is inside it. 
- * Derived classes are also a bit more interesting because they will 
- * be specific to a certain result type.. but this whole notion needs
- * to be worded better. Hence the TODO.
- */
-
-template <typename RT>
-class ContextResultData : virtual public ContextData
-{
-public:
-    void setResult(const RT& val);
-
-protected:
-    virtual void onSetResult() {}
-
-    RT getResult()
-    {
-        return mResult;
-    }
-    RT mResult;
-};
-
-template <typename RT>
-void ContextResultData<RT>::setResult(const RT& val)
-{
-    if (isCompleted())
-    {
-        return;
-    }
-    
-    IceUtil::LockT<IceUtil::Mutex> lock(mLock);
-    mResult = val;
-    setCompleted();
-    onSetResult();
-}
-
-/**
- * Not every AMD type operation has a result value.
- */
-template <class CB>
-class AMDContextData : virtual public ContextData
-{
-public:
-    template<class T >
-    class AMDProxy : virtual public T::element_type, virtual public IceUtil::Shared
-    {
-    public:
-        void ice_response()
-        {
-            if (mParent)
-            {
-                mParent->setCompleted();
-                //
-                // The reset breaks the mutual reference count.
-                //
-                mParent.reset();
-            }
-        }
-
-        void ice_exception(const std::exception& ex)
-        {
-            if (mParent)
-            {
-                const Ice::Exception* ix = dynamic_cast<const Ice::Exception*>(&ex);
-                if (ix)
-                {
-                    mParent->setException(ExceptionWrapper::create(*ix));
-                    return;
-                }
-                mParent->setException(ExceptionWrapper::create(ex));
-                //
-                // The reset breaks the mutual reference count.
-                //
-                mParent.reset();
-            }
-        }
-    
-        void ice_exception()
-        {
-            if (mParent)
-            {
-                mParent->setException(ExceptionWrapper::create("Unexpected unknown exception"));
-                //
-                // The reset breaks the mutual reference count.
-                //
-                mParent.reset();
-            }
-        }
-
-        AMDProxy(const boost::shared_ptr<ContextData>& d) :
-            mParent(d)
-        {
-        }
-
-    private:
-        boost::shared_ptr<ContextData> mParent;
-    };
-
-    AMDContextData() {}
-    AMDContextData(const CB& cb)
-    {
-        mCallbacks.push_back(cb);
-    }
-
-    void addCB(const CB& cbPtr);
-
-    CB getProxy()
-    {
-        {
-            // 
-            // We need to do this lazy initialization because we need to setup the relationship
-            // between the AMD proxy and this object instance *after* this object instance
-            // has been fully constructed. Otherwise we can get into some nasty stuff.
-            //
-            IceUtil::LockT<IceUtil::Mutex> lock(mLock);
-            if (!mAMDProxy)
-            {
-                mAMDProxy = new AMDProxy<CB>(shared_from_this());
-            }
-        }
-        return mAMDProxy;
-    }
-
-private:
-    void onSetException();
-    void onSetCompleted();
-    CB mAMDProxy;
-    std::vector<CB> mCallbacks;
-};
-
-template <class CB>
-void AMDContextData<CB>::addCB(const CB& cbPtr)
-{
-    IceUtil::LockT<IceUtil::Mutex> lock(mLock);
-    if (isCompleted())
-    {
-        if (mExceptionResult)
-        {
-            cbPtr->ice_exception(*(mExceptionResult->exception()));
-        }
-        else
-        {
-            cbPtr->ice_response();
-        }
-        return;
-    }
-    mCallbacks.push_back(cbPtr);
-}
-
-template <class CB>
-void AMDContextData<CB>::onSetException()
-{
-    for (typename std::vector<CB>::const_iterator iter= mCallbacks.begin();
-         iter != mCallbacks.end(); ++iter)
-    {
-        (*iter)->ice_exception(*(mExceptionResult->exception()));
-    }
-}
-
-template <class CB>
-void AMDContextData<CB>::onSetCompleted()
-{
-    for (typename std::vector<CB>::const_iterator iter= mCallbacks.begin();
-         iter != mCallbacks.end(); ++iter)
-    {
-        (*iter)->ice_response();
-    }
-}
-
-/**
- *
- * AMDContextResultData has the added feature that it can be passed as
- * an AMD callback object for CB's element type. The standard AMD
- * callback methods are overridden and behave in the same manner as
- * the synchronous result's setResult/setException methods. The AMD
- * ContextResultData also stores all AMD callback objects that are
- * part of asynchronous upcalls for the same operation context.
- *
- **/
-template <typename RT, class CB>
-class AMDContextResultData : virtual public ContextResultData<RT>, virtual public ContextData
-{
-public:
-    template< typename RTi, class CBi >
-    class AMDProxy : virtual public CBi::element_type, virtual public IceUtil::Shared
-    {
-    public:
-        void ice_response(const RTi& result)
-        {
-            if (mParent)
-            {
-                mParent->setResult(result);
-                //
-                // The reset breaks the mutual reference count.
-                //
-                mParent.reset();
-            }
-        }
-
-        void ice_exception(const std::exception& ex)
-        {
-            if (mParent)
-            {
-                const Ice::Exception* ix = dynamic_cast<const Ice::Exception*>(&ex);
-                if (ix)
-                {
-                    mParent->setException(ExceptionWrapper::create(*ix));
-                    return;
-                }
-                mParent->setException(ExceptionWrapper::create(ex));
-                //
-                // The reset breaks the mutual reference count.
-                //
-                mParent.reset();
-            }
-        }
-    
-        void ice_exception()
-        {
-            if (mParent)
-            {
-                mParent->setException(ExceptionWrapper::create("Unexpected unknown exception"));
-                //
-                // The reset breaks the mutual reference count.
-                //
-                mParent.reset();
-            }
-        }
-
-        AMDProxy(const boost::shared_ptr<AMDContextResultData<RTi, CBi> >& d) :
-            mParent(d)
-        {
-        }
-
-    private:
-        boost::shared_ptr<AMDContextResultData<RTi, CBi> > mParent;
-    };
-
-    AMDContextResultData()
-    {
-    }
-
-    AMDContextResultData(const CB& cb)
-    {
-        mCallbacks.push_back(cb);
-    }
-
-    CB getProxy()
-    {
-        {
-            // 
-            // We need to do this lazy initialization because we need to setup the relationship
-            // between the AMD proxy and this object instance *after* this object instance
-            // has been fully constructed. Otherwise we can get into some nasty stuff.
-            //
-            IceUtil::Mutex::Lock lock(mLock);
-            if (!mAMDProxy)
-            {
-                mAMDProxy = new AMDProxy<RT, CB>(
-                    boost::dynamic_pointer_cast<AMDContextResultData<RT, CB> >(shared_from_this()));
-            }
-        }
-        return mAMDProxy;
-    }
-    
-    void addCB(const CB& cbPtr)
-    {
-        IceUtil::LockT<IceUtil::Mutex> lock(mLock);
-        if (ContextData::isCompleted())
-        {
-            if (mExceptionResult)
-            {
-                cbPtr->ice_exception(*(mExceptionResult->exception()));
-            }
-            else
-            {
-                cbPtr->ice_response(ContextResultData<RT>::getResult());
-            }
-            return;
-        }
-        mCallbacks.push_back(cbPtr);
-    }
-    
-private:
-    void onSetResult()
-    {
-        for (typename std::vector<CB>::const_iterator iter = mCallbacks.begin();
-             iter != mCallbacks.end(); ++iter)
-        {
-            (*iter)->ice_response(ContextResultData<RT>::getResult());
-        }
-    }
-
-    void onSetException()
-    {
-        for (typename std::vector<CB>::const_iterator iter= mCallbacks.begin();
-             iter != mCallbacks.end(); ++iter)
-        {
-            (*iter)->ice_exception(*(mExceptionResult->exception()));
-        }
-    }
-    CB mAMDProxy;
-    std::vector<CB> mCallbacks;
-};
-
-/** 
- * Simple file scope helper for the "add" methods. The signatures for
- * these methods do not include any kind of results, so we only need
- * to consider exceptions and one method will do for all of that. This
- * function returns true if the caller should proceed with the actual
- * operations or false if it can assume that it has already been done
- * and the results have been obtained (and thrown if necessary in this
- * case)
- */
-ContextDataPtr checkAndThrow(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
-    const AsteriskSCF::System::V1::OperationContextPtr& context);
-
-
-template <class DT, class AT>
-DT getContext(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
-    const AsteriskSCF::System::V1::OperationContextPtr& context,
-    const AT& amdCallback)
-{
-    DT c(new typename DT::element_type);
-    AsteriskSCF::Operations::OperationContextCookiePtr o;
-     
-    if (!cache->addOperationContext(context, c, o))
-    {
-        c = boost::dynamic_pointer_cast<typename DT::element_type>(o);
-        assert(c);
-        c->addCB(amdCallback);
-        return DT();
-    }
-    c->addCB(amdCallback);
-    return c;
-}
-
-} /* End of namespace BridgeService */
-} /* End of namespace AsteriskSCF */
diff --git a/src/SessionListener.cpp b/src/SessionListener.cpp
index f2a88f3..60f09b4 100644
--- a/src/SessionListener.cpp
+++ b/src/SessionListener.cpp
@@ -17,15 +17,15 @@
 #include "SessionListener.h"
 #include "ServiceUtil.h"
 #include "SessionOperations.h"
-#include "ExceptionWrapper.h"
 
 #include <AsteriskSCF/Operations/OperationContextCache.h>
-#include "OperationMonitor.h"
+#include <AsteriskSCF/Operations/OperationMonitor.h>
 
 using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::SessionCommunications::V1;
 using namespace AsteriskSCF::BridgeService;
 using namespace AsteriskSCF::Replication::BridgeService::V1;
+using namespace AsteriskSCF::Operations;
 using namespace AsteriskSCF;
 using namespace std;
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index ef7fc92..eae777d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -34,7 +34,6 @@ astscf_component_add_files(BridgeUnitTests ../src/MediaSplicer.cpp)
 astscf_component_add_files(BridgeUnitTests ../src/MediaMixer.cpp)
 astscf_component_add_files(BridgeUnitTests ../src/BridgeListenerMgr.cpp)
 astscf_component_add_files(BridgeUnitTests ../src/SessionListener.cpp)
-astscf_component_add_files(BridgeUnitTests ../src/OperationMonitor.cpp)
 astscf_component_add_slices(BridgeUnitTests PROJECT AsteriskSCF/Replication/BridgeService/BridgeReplicatorIf.ice)
 astscf_component_add_files(BridgeUnitTests UnitTests.cpp)
 astscf_component_add_ice_libraries(BridgeUnitTests Ice)

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list