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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Sun May 15 12:50:27 CDT 2011


branch "master" has been updated
       via  011153c93ff48091d153d12e8fcfd09170a5b28f (commit)
      from  1e1f90023b16565e11678b9e3ddd282a2d22cd9b (commit)

Summary of changes:
 src/CMakeLists.txt                       |    6 ++----
 src/ServiceLocatorManagement.cpp         |    4 ++--
 src/ServiceLocatorStateListener.cpp      |   17 ++++++++---------
 src/ServiceLocatorStateReplicator.h      |   26 +++++++++++++++++---------
 src/ServiceLocatorStateReplicatorApp.cpp |    7 +------
 src/ServiceManagement.cpp                |    4 ++--
 6 files changed, 32 insertions(+), 32 deletions(-)


- Log -----------------------------------------------------------------
commit 011153c93ff48091d153d12e8fcfd09170a5b28f
Author: Brent Eagles <beagles at digium.com>
Date:   Sun May 15 15:20:18 2011 -0230

    Apply changes for ice-util-cpp restructuring

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b1ec31b..29f8732 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,11 +1,9 @@
 if(NOT logger_dir)
   message(FATAL_ERROR "The logger directory could not be found ${logger_dir}")
 endif()
-include_directories(${utils_dir}/AmiCollector/include)
-include_directories(${logger_dir}/include)
 include_directories(${API_INCLUDE_DIR})
-include_directories(${utils_dir}/StateReplicator/include)
-include_directories(${utils_dir}/SmartProxy/include)
+include_directories(${utils_dir}/include)
+include_directories(${logger_dir}/include)
 
 asterisk_scf_slice_include_directories(${API_SLICE_DIR})
 
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 51b23bb..b1cfe2a 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -23,7 +23,7 @@
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 #include <AsteriskSCF/logger.h>
-#include <AsteriskSCF/ResponseCollector.h>
+#include <AsteriskSCF/Async/ResponseCollector.h>
 
 #include "ServiceLocatorStateReplicationIf.h"
 
@@ -157,7 +157,7 @@ private:
  */
 class LocateCollector :
     public IceUtil::Shared,
-    public ResponseCollector<const LocateParam&>
+    public AsteriskSCF::Async::ResponseCollector<const LocateParam&>
 
 {
 };
diff --git a/src/ServiceLocatorStateListener.cpp b/src/ServiceLocatorStateListener.cpp
index d4df1e5..b5f9733 100644
--- a/src/ServiceLocatorStateListener.cpp
+++ b/src/ServiceLocatorStateListener.cpp
@@ -20,7 +20,7 @@
 #include <boost/shared_ptr.hpp>
 
 #include <AsteriskSCF/System/Component/ReplicaIf.h>
-#include <AsteriskSCF/SmartProxy.h>
+// #include <AsteriskSCF/Discovery/SmartProxy.h>
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
@@ -36,8 +36,10 @@ using namespace AsteriskSCF::ServiceDiscovery;
 class ServiceLocatorStateReplicatorItem
 {
 public:
-    ServiceLocatorStateReplicatorItem(ServiceLocatorManagementImplPtr locatorManagement) :
-	  mLocatorManagement(locatorManagement) { }
+    ServiceLocatorStateReplicatorItem(const ServiceLocatorManagementImplPtr& locatorManagement) :
+	  mLocatorManagement(locatorManagement) 
+    { 
+    }
 
     ~ServiceLocatorStateReplicatorItem()
     {
@@ -174,12 +176,9 @@ public:
     ServiceLocatorManagementImplPtr mLocatorManagement;
 };
 
-ServiceLocatorStateReplicatorListenerI::ServiceLocatorStateReplicatorListenerI(ServiceLocatorManagementImplPtr management)
-    : mImpl(new ServiceLocatorStateReplicatorListenerImpl(management)) {}
-
-ServiceLocatorStateReplicatorListenerI::~ServiceLocatorStateReplicatorListenerI()
+ServiceLocatorStateReplicatorListenerI::ServiceLocatorStateReplicatorListenerI(const ServiceLocatorManagementImplPtr& management)
+    : mImpl(new ServiceLocatorStateReplicatorListenerImpl(management)) 
 {
-    delete mImpl;
 }
 
 void ServiceLocatorStateReplicatorListenerI::stateRemoved(const Ice::StringSeq& itemKeys, const Ice::Current&)
@@ -192,7 +191,7 @@ void ServiceLocatorStateReplicatorListenerI::stateSet(const ServiceLocatorStateI
     mImpl->setStateNoticeImpl(items);
 }
 
-bool ServiceLocatorStateReplicatorListenerI::operator==(ServiceLocatorStateReplicatorListenerI &rhs)
+bool ServiceLocatorStateReplicatorListenerI::operator==(const ServiceLocatorStateReplicatorListenerI &rhs)
 {
     return mImpl->mId == rhs.mImpl->mId;
 }
diff --git a/src/ServiceLocatorStateReplicator.h b/src/ServiceLocatorStateReplicator.h
index 0dea777..cb102d3 100644
--- a/src/ServiceLocatorStateReplicator.h
+++ b/src/ServiceLocatorStateReplicator.h
@@ -22,21 +22,29 @@
 #include "ServiceLocatorStateReplicationIf.h"
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
-#include <AsteriskSCF/StateReplicator.h>
+#include <AsteriskSCF/Replication/StateReplicator.h>
 
-using namespace AsteriskSCF::Core::Discovery::V1;
+#include <boost/shared_ptr.hpp>
 
-typedef AsteriskSCF::StateReplication::StateReplicator<ServiceLocatorStateReplicator, ServiceLocatorStateItemPtr, std::string, ServiceLocatorStateReplicatorListenerPrx> ServiceLocatorStateReplicatorI;
+struct ServiceLocatorStateReplicatorListenerImpl;
+
+typedef AsteriskSCF::Replication::StateReplicator<
+        AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicator, 
+        AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemPtr, 
+        std::string, 
+        AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicatorListenerPrx> 
+            ServiceLocatorStateReplicatorI;
 typedef IceUtil::Handle<ServiceLocatorStateReplicatorI> ServiceLocatorStateReplicatorIPtr;
 
-class ServiceLocatorStateReplicatorListenerI : public ServiceLocatorStateReplicatorListener
+class ServiceLocatorStateReplicatorListenerI : 
+    public AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateReplicatorListener
 {
 public:
-    ServiceLocatorStateReplicatorListenerI(AsteriskSCF::ServiceDiscovery::ServiceLocatorManagementImplPtr);
-    ~ServiceLocatorStateReplicatorListenerI();
+    ServiceLocatorStateReplicatorListenerI(const AsteriskSCF::ServiceDiscovery::ServiceLocatorManagementImplPtr&);
     void stateRemoved(const Ice::StringSeq&, const Ice::Current&);
-    void stateSet(const ServiceLocatorStateItemSeq&, const Ice::Current&);
-    bool operator==(ServiceLocatorStateReplicatorListenerI &rhs);
+    void stateSet(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorStateItemSeq&, const Ice::Current&);
+    bool operator==(const ServiceLocatorStateReplicatorListenerI& rhs);
 private:
-    struct ServiceLocatorStateReplicatorListenerImpl *mImpl;
+    boost::shared_ptr<ServiceLocatorStateReplicatorListenerImpl> mImpl;
 };
+
diff --git a/src/ServiceLocatorStateReplicatorApp.cpp b/src/ServiceLocatorStateReplicatorApp.cpp
index ea85544..cc2aab4 100644
--- a/src/ServiceLocatorStateReplicatorApp.cpp
+++ b/src/ServiceLocatorStateReplicatorApp.cpp
@@ -21,9 +21,9 @@
 
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/System/Component/ComponentServiceIf.h>
-#include "ServiceLocatorStateReplicator.h"
 #include <AsteriskSCF/logger.h>
 #include <AsteriskSCF/Logger/IceLogger.h>
+#include "ServiceLocatorStateReplicator.h"
 
 using namespace std;
 using namespace AsteriskSCF::Core;
@@ -31,11 +31,6 @@ using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::System::Component::V1;
 using namespace AsteriskSCF::System::Logging;
 
-namespace
-{
-const Logger &lg = getLoggerFactory().getLogger("AsteriskSCF.System.Discovery");
-}
-
 class ServiceLocatorStateReplicatorService : public IceBox::Service
 {
 public:
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 4e2f30a..3406157 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -24,7 +24,7 @@
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorEventsIf.h>
 #include <AsteriskSCF/logger.h>
-#include <AsteriskSCF/ResponseCollector.h>
+#include <AsteriskSCF/Async/ResponseCollector.h>
 
 #include "ServiceLocatorStateReplicationIf.h"
 
@@ -189,7 +189,7 @@ ServiceManagementPrx ServiceManagementImpl::getServiceManagementPrx()
  */
 class CountedIsSupported :
     public IsSupportedCallback,
-    public ResponseCollector<bool>
+    public AsteriskSCF::Async::ResponseCollector<bool>
 {
 public:
     CountedIsSupported(const IsSupportedCallbackPtr& callback, size_t numVotes) :

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


-- 
asterisk-scf/release/servicediscovery.git



More information about the asterisk-scf-commits mailing list