[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "retry_deux" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 3 18:23:42 CDT 2012


branch "retry_deux" has been updated
       via  84e06c9b0470a8ce38beb6878bc5702c910c7b87 (commit)
      from  1f24ad55be187f5cc529703f0583521857a8a573 (commit)

Summary of changes:
 include/AsteriskSCF/Operations/OperationMonitor.h |   34 +++++++++++----------
 1 files changed, 18 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit 84e06c9b0470a8ce38beb6878bc5702c910c7b87
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Apr 3 18:22:52 2012 -0500

    Added export macros for Windows shared library usage.

diff --git a/include/AsteriskSCF/Operations/OperationMonitor.h b/include/AsteriskSCF/Operations/OperationMonitor.h
index dad6a6d..55cfbe2 100755
--- a/include/AsteriskSCF/Operations/OperationMonitor.h
+++ b/include/AsteriskSCF/Operations/OperationMonitor.h
@@ -35,7 +35,7 @@ namespace Operations
  * upcalls occur for the same OperationContext. Of course this is only relevant for 
  * non-AMD implementations.
  */
-class ContextMonitor : public IceUtil::Shared
+class ASTSCF_DLL_EXPORT ContextMonitor : public IceUtil::Shared
 {
 public:
     ContextMonitor() :
@@ -83,10 +83,10 @@ private:
     bool mCancelled;
     IceUtil::Monitor<IceUtil::Mutex> mMonitor;
 };
-typedef IceUtil::Handle<ContextMonitor> ContextMonitorPtr;
+typedef ASTSCF_DLL_EXPORT IceUtil::Handle<ContextMonitor> ContextMonitorPtr;
 
-class ContextData : virtual public AsteriskSCF::Operations::OperationContextCookie,
-                    virtual public boost::enable_shared_from_this<ContextData>
+class ASTSCF_DLL_EXPORT ContextData : virtual public AsteriskSCF::Operations::OperationContextCookie,
+    virtual public boost::enable_shared_from_this<ContextData>
 {
 public:
     ContextData() :
@@ -145,9 +145,9 @@ protected:
     {
     }
 };
-typedef boost::shared_ptr<ContextData> ContextDataPtr;
+typedef ASTSCF_DLL_EXPORT boost::shared_ptr<ContextData> ContextDataPtr;
 
-class CancelledOperationException : public std::exception {
+class ASTSCF_DLL_EXPORT CancelledOperationException : public std::exception {
 public:
     const char* what() throw() { return "Cancelled operation"; }
 };
@@ -162,7 +162,7 @@ public:
  */
 
 template <typename RT>
-class ContextResultData : virtual public ContextData
+class ASTSCF_DLL_EXPORT ContextResultData : virtual public ContextData
 {
 public:
     void setResult(const RT& val);
@@ -198,7 +198,7 @@ protected:
 };
 
 template <typename RT>
-void ContextResultData<RT>::setResult(const RT& val)
+ASTSCF_DLL_EXPORT void ContextResultData<RT>::setResult(const RT& val)
 {
     if (isCompleted())
     {
@@ -215,7 +215,7 @@ void ContextResultData<RT>::setResult(const RT& val)
  * Not every AMD type operation has a result value.
  */
 template <class CB>
-class AMDContextData : virtual public ContextData
+class ASTSCF_DLL_EXPORT AMDContextData : virtual public ContextData
 {
 public:
     template<class T >
@@ -298,6 +298,8 @@ public:
         return mAMDProxy;
     }
 
+    typedef boost::shared_ptr<AMDContextData<CB> > Ptr;
+
 private:
     void onSetException();
     void onSetCompleted();
@@ -306,7 +308,7 @@ private:
 };
 
 template <class CB>
-void AMDContextData<CB>::addCB(const CB& cbPtr)
+ASTSCF_DLL_EXPORT void AMDContextData<CB>::addCB(const CB& cbPtr)
 {
     IceUtil::LockT<IceUtil::Mutex> lock(mLock);
     if (isCompleted())
@@ -325,7 +327,7 @@ void AMDContextData<CB>::addCB(const CB& cbPtr)
 }
 
 template <class CB>
-void AMDContextData<CB>::onSetException()
+ASTSCF_DLL_EXPORT void AMDContextData<CB>::onSetException()
 {
     for (typename std::vector<CB>::const_iterator iter= mCallbacks.begin();
          iter != mCallbacks.end(); ++iter)
@@ -335,7 +337,7 @@ void AMDContextData<CB>::onSetException()
 }
 
 template <class CB>
-void AMDContextData<CB>::onSetCompleted()
+ASTSCF_DLL_EXPORT void AMDContextData<CB>::onSetCompleted()
 {
     for (typename std::vector<CB>::const_iterator iter= mCallbacks.begin();
          iter != mCallbacks.end(); ++iter)
@@ -355,11 +357,11 @@ void AMDContextData<CB>::onSetCompleted()
  *
  **/
 template <typename RT, class CB>
-class AMDContextResultData : virtual public ContextResultData<RT>, virtual public ContextData
+class ASTSCF_DLL_EXPORT 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
+    class ASTSCF_DLL_EXPORT AMDProxy : virtual public CBi::element_type, virtual public IceUtil::Shared
     {
     public:
         void ice_response(const RTi& result)
@@ -489,12 +491,12 @@ private:
  * and the results have been obtained (and thrown if necessary in this
  * case)
  */
-ContextDataPtr checkAndThrow(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
+ASTSCF_DLL_EXPORT 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,
+ASTSCF_DLL_EXPORT DT getContext(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
     const AsteriskSCF::System::V1::OperationContextPtr& context,
     const AT& amdCallback)
 {

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


-- 
asterisk-scf/integration/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list