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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu May 5 07:46:35 CDT 2011


branch "ice-util-restructure" has been updated
       via  722acbfb23ec882ff4a986c239582488823a2a51 (commit)
      from  172345423f821652d0a36ae723b9908518c36d70 (commit)

Summary of changes:
 AmiCollector/src/AmiCollector.cpp                  |   17 ------------
 StateReplicator/CMakeLists.txt                     |   26 ------------------
 StateReplicator/src/StateReplicator.cpp            |   28 --------------------
 .../Discovery/LocatorRegistrationWrapper.h         |   24 +++++++++++-----
 include/AsteriskSCF/Helpers/PropertyHelper.h       |    2 +-
 5 files changed, 17 insertions(+), 80 deletions(-)
 delete mode 100644 AmiCollector/src/AmiCollector.cpp
 delete mode 100644 StateReplicator/CMakeLists.txt
 delete mode 100644 StateReplicator/src/StateReplicator.cpp


- Log -----------------------------------------------------------------
commit 722acbfb23ec882ff4a986c239582488823a2a51
Author: Brent Eagles <beagles at digium.com>
Date:   Thu May 5 10:15:26 2011 -0230

    Remove some obsoleted files and directories.

diff --git a/AmiCollector/src/AmiCollector.cpp b/AmiCollector/src/AmiCollector.cpp
deleted file mode 100644
index c0244fe..0000000
--- a/AmiCollector/src/AmiCollector.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010, 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 <AsteriskSCF/AmiCollector.h>
diff --git a/StateReplicator/CMakeLists.txt b/StateReplicator/CMakeLists.txt
deleted file mode 100644
index 472c21c..0000000
--- a/StateReplicator/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Asterisk Scalable Communications Framework
-#
-# Copyright (C) 2010 -- Digium, Inc.
-#
-# All rights reserved.
-#
-
-# State Replicator build system
-
-asterisk_scf_component_init(StateReplicator CXX)
-
-include_directories(include)
-
-asterisk_scf_component_add_file(StateReplicator
-    include/AsteriskSCF/StateReplicator.h)
-asterisk_scf_component_add_file(StateReplicator src/StateReplicator.cpp)
-asterisk_scf_component_add_boost_libraries(StateReplicator thread)
-
-asterisk_scf_component_build_library(StateReplicator)
-
-add_subdirectory(test)
-
-# don't install the component.  it's just there to make Visual Studio happy
-# _do_ install the header files
-asterisk_scf_headers_install(include/)
diff --git a/StateReplicator/src/StateReplicator.cpp b/StateReplicator/src/StateReplicator.cpp
deleted file mode 100644
index dfe1241..0000000
--- a/StateReplicator/src/StateReplicator.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Asterisk SCF -- An open-source communications framework.
- *
- * Copyright (C) 2010, 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 <AsteriskSCF/StateReplicator.h>
-
-namespace AsteriskSCF
-{
-namespace StateReplication
-{
-/*
- * This .cpp is a temporary solution to get a CMakeProject that consists only of header files.
- */
-
-};
-};
diff --git a/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h b/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
index 4c4c098..ca8e81a 100644
--- a/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
+++ b/include/AsteriskSCF/Discovery/LocatorRegistrationWrapper.h
@@ -37,14 +37,21 @@ template <class T>
 class LocatorRegistrationWrapper : public IceUtil::Shared
 {
 public:
+
+    /**
+     * Normally, I avoid default args, but you can't really implement one constructor in terms of another
+     * so it's less maintenance overhead to have the single constructor with the defaults.
+     **/
     LocatorRegistrationWrapper(const Ice::CommunicatorPtr& communicator, const std::string& proxyString,
             const T& service, const std::string& name,
-            const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params) :
+            const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr& params, 
+            const std::string& comparatorGUID = "") :
         mCommunicator(communicator),
         mProxyString(proxyString),
         mService(service),
         mName(name),
-        mParameters(params)
+        mParameters(params),
+        mComparatorGUID(comparatorGUID)
     {
     }
 
@@ -57,15 +64,15 @@ public:
         AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx management =
               AsteriskSCF::Core::Discovery::V1::ServiceLocatorManagementPrx::checkedCast(
                   mCommunicator->stringToProxy(mProxyString));
-        if(management)
+        if (management)
         {
             IceUtil::Mutex::Lock lock(mLock);
             mServiceManagement = 
                 AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx::uncheckedCast(
                     management->addService(mService, mName));
-            if(mServiceManagement)
+            if (mServiceManagement)
             {
-                mServiceManagement->addLocatorParams(mParameters, "");
+                mServiceManagement->addLocatorParams(mParameters, mComparatorGUID);
                 return true;
             }
         }
@@ -82,7 +89,7 @@ public:
     {
         {
             IceUtil::Mutex::Lock lock(mLock);
-            if(!mServiceManagement)
+            if (!mServiceManagement)
             {
                 return;
             }
@@ -103,11 +110,12 @@ private:
     std::string mName;
     AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr mParameters;
     AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx mServiceManagement;
+    std::string mComparatorGUID;
 };
 
 /**
-* This thread takes care of registering the bridge if the service discovery components are unavailable during
- * startup.
+* This thread takes care of registering the registration wrapper instance if the service discovery components are
+ * unavailable during startup.
  **/
 template <class T>
 class RegisterThread : public IceUtil::Thread
diff --git a/include/AsteriskSCF/Helpers/PropertyHelper.h b/include/AsteriskSCF/Helpers/PropertyHelper.h
index 032602f..b6579b8 100644
--- a/include/AsteriskSCF/Helpers/PropertyHelper.h
+++ b/include/AsteriskSCF/Helpers/PropertyHelper.h
@@ -151,7 +151,7 @@ private:
                 mArgv.push_back(i->c_str());
             }
             mArgv.push_back(static_cast<const char*>(0));
-            mArgc = static_cast<int>(mArgv.size()) -1;
+            mArgc = static_cast<int>(mArgv.size()) - 1;
         }
     };
 

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


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



More information about the asterisk-scf-commits mailing list