[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "ice-util-restructure" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Apr 28 10:35:27 CDT 2011


branch "ice-util-restructure" has been created
        at  7a08201b7b19e4bdf73a71fa8cc9d26f0f53417a (commit)

- Log -----------------------------------------------------------------
commit 7a08201b7b19e4bdf73a71fa8cc9d26f0f53417a
Author: Brent Eagles <beagles at digium.com>
Date:   Thu Apr 28 12:49:30 2011 -0230

    Apply changes for ice-util-cpp restructuring

diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 9039c48..b239dc6 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -19,7 +19,7 @@
 #include <boost/thread.hpp>
 #include <boost/shared_ptr.hpp>
 
-#include <AsteriskSCF/SmartProxy.h>
+#include <AsteriskSCF/Discovery/SmartProxy.h>
 #include <AsteriskSCF/Core/Routing/RoutingIf.h>
 #include <AsteriskSCF/Core/Discovery/ServiceLocatorIf.h>
 #include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.h>
@@ -40,7 +40,7 @@ using namespace AsteriskSCF::Core::Routing::V1;
 using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::System::Component::V1;
 using namespace AsteriskSCF::System::Logging;
-using namespace AsteriskSCF::SmartProxy;
+using namespace AsteriskSCF::Discovery;
 
 namespace
 {
@@ -83,7 +83,7 @@ private:
     void initialize();
     void registerWithServiceLocator();
     void deregisterFromServiceLocator();
-    void setCategory(const Discovery::V1::ServiceManagementPrx& serviceManagement, const string& category);
+    void setCategory(const ServiceManagementPrx& serviceManagement, const string& category);
 
     bool mDone;
     bool mInitialized;
@@ -93,16 +93,16 @@ private:
     ServiceLocatorManagementPrx mServiceLocatorManagement;
     ServiceLocatorPrx mServiceLocator;
 
-    Discovery::V1::ServiceManagementPrx mRegistryLocatorManagement;
-    Discovery::V1::ServiceManagementPrx mAdminManagement;
-    Discovery::V1::ServiceManagementPrx mComponentServiceManagement;
-    Discovery::V1::ServiceManagementPrx mSessionRouterManagement;
+    ServiceManagementPrx mRegistryLocatorManagement;
+    ServiceManagementPrx mAdminManagement;
+    ServiceManagementPrx mComponentServiceManagement;
+    ServiceManagementPrx mSessionRouterManagement;
 
     // Our published interfaces.
     BasicSessionRouterPtr mSessionRouter;
     RoutingServiceAdminPtr mAdminInteface;
     ComponentServicePtr mComponentService;
-    AsteriskSCF::SmartProxy::SmartProxy<BridgeManagerPrx> mBridgeManager;
+    AsteriskSCF::Discovery::SmartProxy<BridgeManagerPrx> mBridgeManager;
     RoutingEventsPtr mEventPublisher;
     EndpointRegistryPtr mEndpointRegistry;
 
@@ -152,7 +152,7 @@ private:
  * Helper function to add some parameters to one of our registered interfaces in the ServiceLocator, so that
  * other components can look up our interfaces.
  */
-void BasicRoutingServiceApp::setCategory(const Discovery::V1::ServiceManagementPrx& serviceManagement, const string& category)
+void BasicRoutingServiceApp::setCategory(const ServiceManagementPrx& serviceManagement, const string& category)
 {
     // Add category as a parameter to enable other components look this component up.
     ServiceLocatorParamsPtr genericparams = new ServiceLocatorParams;
@@ -288,7 +288,7 @@ void BasicRoutingServiceApp::initialize()
 
     try
     {
-        mBridgeManager = AsteriskSCF::SmartProxy::SmartProxy<BridgeManagerPrx>(
+        mBridgeManager = AsteriskSCF::Discovery::SmartProxy<BridgeManagerPrx>(
             mServiceLocator,
             new ServiceLocatorParams(BridgeServiceDiscoveryCategory),
             lg);
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7b25cb3..8d8ed77 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,7 +3,7 @@ if(NOT logger_dir)
 endif()
 include_directories(${logger_dir}/include)
 include_directories(${API_INCLUDE_DIR})
-include_directories(${utils_dir}/SmartProxy/include)
+include_directories(${utils_dir}/include)
 find_package(Lua51 REQUIRED)
 include_directories(${LUA_INCLUDE_DIR})
 
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index f492f80..242e5c5 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -376,7 +376,7 @@ public:
     /**
      * Set the accessor to the bridge.
      */
-    void setBridgeAccessor(const AsteriskSCF::SmartProxy::SmartProxy<
+    void setBridgeAccessor(const AsteriskSCF::Discovery::SmartProxy<
             SessionCommunications::V1::BridgeManagerPrx>&  bridgeAccessor)
     {
         mBridgeManager = bridgeAccessor;
@@ -574,7 +574,7 @@ public:
     Ice::ObjectAdapterPtr mAdapter;
     EndpointRegistryPtr mEndpointRegistry;
     RoutingEventsPtr mEventPublisher;
-    AsteriskSCF::SmartProxy::SmartProxy<
+    AsteriskSCF::Discovery::SmartProxy<
         SessionCommunications::V1::BridgeManagerPrx> mBridgeManager;
 };
 
@@ -590,7 +590,7 @@ SessionRouter::~SessionRouter()
 }
 
 void SessionRouter::setBridgeManager(
-    const AsteriskSCF::SmartProxy::SmartProxy<
+    const AsteriskSCF::Discovery::SmartProxy<
         SessionCommunications::V1::BridgeManagerPrx>& bridgeAccessor)
 {
     mImpl->mBridgeManager = bridgeAccessor;
diff --git a/src/SessionRouter.h b/src/SessionRouter.h
index 6332292..7e100d5 100644
--- a/src/SessionRouter.h
+++ b/src/SessionRouter.h
@@ -18,7 +18,7 @@
 #include <Ice/Ice.h>
 #include <boost/shared_ptr.hpp>
 
-#include <AsteriskSCF/SmartProxy.h>
+#include <AsteriskSCF/Discovery/SmartProxy.h>
 #include <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.h>
 
 #include "EndpointRegistry.h"
@@ -40,7 +40,7 @@ public:
     ~SessionRouter();
 
     void setBridgeManager(
-        const AsteriskSCF::SmartProxy::SmartProxy<
+        const AsteriskSCF::Discovery::SmartProxy<
             SessionCommunications::V1::BridgeManagerPrx>& bridgeAccessor);
 
 public:

commit ba4ae430a0457506f51fad79931af15a0f921832
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Wed Apr 27 11:10:48 2011 -0500

    CMakeLists.txt cleanup across the entire tree.
    
    * Consistent formatting.
    * Removed old non-integrated build stuff.
    * Organized include_directories() calls since they affect every component in
      the directory they are executed in.
    * Keep all scripts lines for each component together.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8dedc49..5fc6950 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,30 +1,3 @@
-#
-# Asterisk Scalable Communications Framework
-#
-# Copyright (C) 2010 -- Digium, Inc.
-#
-# All rights reserved.
-#
-
-# Routing Service build system
-
-if(NOT integrated_build STREQUAL "true")
-
-   # Minimum we require is 2.8
-   cmake_minimum_required(VERSION 2.8)
-
-   # Include common AsteriskSCF build infrastructure. Make sure your submodules are pulled.
-   include(cmake/AsteriskSCF.cmake)
-
-   # Take care of slice definitions
-   add_subdirectory(slice)
-
-   # logger is integrated into our build
-   set(integrated_build true)
-   add_subdirectory(logger)
-   set(integrated_build false)
-endif()
-
 asterisk_scf_project(RoutingService 3.4)
 
 add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9b6e213..7b25cb3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,13 @@
-# Create the actual standalone basic routing component
-asterisk_scf_component_init(BasicRoutingService CXX)
+if(NOT logger_dir)
+  message(FATAL_ERROR "The logger directory could not be found ${logger_dir}")
+endif()
+include_directories(${logger_dir}/include)
+include_directories(${API_INCLUDE_DIR})
+include_directories(${utils_dir}/SmartProxy/include)
 find_package(Lua51 REQUIRED)
 include_directories(${LUA_INCLUDE_DIR})
+
+asterisk_scf_component_init(BasicRoutingService)
 asterisk_scf_component_add_file(BasicRoutingService BasicRoutingServiceApp.cpp)
 asterisk_scf_component_add_file(BasicRoutingService SessionRouter.cpp)
 asterisk_scf_component_add_file(BasicRoutingService SessionRouter.h)
@@ -14,21 +20,10 @@ asterisk_scf_component_add_file(BasicRoutingService LuaScriptProcessor.cpp)
 asterisk_scf_component_add_file(BasicRoutingService LuaScriptProcessor.h)
 asterisk_scf_component_add_file(BasicRoutingService RoutingServiceEventPublisher.cpp)
 asterisk_scf_component_add_file(BasicRoutingService RoutingServiceEventPublisher.h)
-
 asterisk_scf_component_add_ice_libraries(BasicRoutingService IceStorm)
 asterisk_scf_component_add_boost_libraries(BasicRoutingService thread date_time core regex)
-
-if(NOT logger_dir)
-   message(FATAL_ERROR "The logger directory could not be found ${logger_dir}")
-endif()
-include_directories(${logger_dir}/include)
-include_directories(${API_INCLUDE_DIR})
-
-include_directories(${utils_dir}/SmartProxy/include)
-
 asterisk_scf_component_build_icebox(BasicRoutingService)
 target_link_libraries(BasicRoutingService ${LUA_LIBRARIES})
 target_link_libraries(BasicRoutingService logging-client)
 target_link_libraries(BasicRoutingService asterisk-scf-api)
-
 asterisk_scf_component_install(BasicRoutingService)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e51d804..ad19dcd 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,6 +1,6 @@
-# Create Basic Routing Service test project.
-asterisk_scf_component_init(RoutingTest CXX)
+include_directories(${API_INCLUDE_DIR})
 
+asterisk_scf_component_init(RoutingTest)
 asterisk_scf_component_add_file(RoutingTest TestRouting.cpp)
 asterisk_scf_component_add_file(RoutingTest SharedTestData.h)
 asterisk_scf_component_add_file(RoutingTest MockBridgeManager.h)
@@ -13,13 +13,11 @@ asterisk_scf_component_add_file(RoutingTest MockSessionEndpoint.h)
 asterisk_scf_component_add_file(RoutingTest MockSessionEndpoint.cpp)
 asterisk_scf_component_add_file(RoutingTest MockEndpointLocator.h)
 asterisk_scf_component_add_file(RoutingTest MockEndpointLocator.cpp)
-
 asterisk_scf_component_add_ice_libraries(RoutingTest IceStorm)
 asterisk_scf_component_add_boost_libraries(RoutingTest unit_test_framework)
-include_directories(${API_INCLUDE_DIR})
 asterisk_scf_component_build_icebox(RoutingTest)
 target_link_libraries(RoutingTest asterisk-scf-api)
 
 if(integrated_build STREQUAL "true")
-   asterisk_scf_test_icebox(RoutingTest config/routingtest-integ.config)
+  asterisk_scf_test_icebox(RoutingTest config/routingtest-integ.config)
 endif()

commit 045fd22a8b91019e297fde1861d51414bbc0dd5b
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed Apr 27 09:52:34 2011 -0500

    Patch for recent changes to SmartProxy.

diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 111f0a1..9039c48 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -286,16 +286,19 @@ void BasicRoutingServiceApp::initialize()
         lg(Error) << "Problems in " << mAppName << " initialization(): " << exception.what();
     }
 
-    mBridgeManager = AsteriskSCF::SmartProxy::SmartProxy<BridgeManagerPrx>(
-        mServiceLocator,
-        new ServiceLocatorParams(BridgeServiceDiscoveryCategory),
-        lg);
-    mSessionRouter->setBridgeManager(mBridgeManager);
-
-    if (!mBridgeManager.isInitialized())
+    try
     {
-        lg(Debug) << "Probabaly safe to ignore ServiceNotFound during startup. Will attempt to locate Bridge Service again when it is needed.";
+        mBridgeManager = AsteriskSCF::SmartProxy::SmartProxy<BridgeManagerPrx>(
+            mServiceLocator,
+            new ServiceLocatorParams(BridgeServiceDiscoveryCategory),
+            lg);
     }
+    catch(const AsteriskSCF::Core::Discovery::V1::ServiceNotFound&)
+    {
+        lg(Debug) << "BridgeManager not found... safe to ignore ServiceNotFound during startup.";
+    }
+
+    mSessionRouter->setBridgeManager(mBridgeManager);
 }
 
 /**

commit 80509d044f08a90c8fffa8f7524b8ad741d6f250
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Apr 25 17:47:58 2011 -0500

    Changes to work with new single-build-directory CMake script.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01eadd2..8dedc49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,9 +16,6 @@ if(NOT integrated_build STREQUAL "true")
    # Include common AsteriskSCF build infrastructure. Make sure your submodules are pulled.
    include(cmake/AsteriskSCF.cmake)
 
-   # This project is C++ based and requires a minimum of 3.4 of Ice.
-   asterisk_scf_project(RoutingService 3.4 CXX)
-
    # Take care of slice definitions
    add_subdirectory(slice)
 
@@ -28,7 +25,7 @@ if(NOT integrated_build STREQUAL "true")
    set(integrated_build false)
 endif()
 
+asterisk_scf_project(RoutingService 3.4)
+
 add_subdirectory(src)
-add_subdirectory(config)
 add_subdirectory(test)
-
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
deleted file mode 100644
index 5aef64e..0000000
--- a/config/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Asterisk Scalable Communications Framework
-#
-# Copyright (C) 2010 -- Digium, Inc.
-#
-# All rights reserved.
-#
-
-configure_file(routingtest-integ.config.in routingtest-integ.config)
diff --git a/config/routingtest-integ.config.in b/config/routingtest-integ.config
similarity index 90%
rename from config/routingtest-integ.config.in
rename to config/routingtest-integ.config
index 001b4c7..74836c8 100644
--- a/config/routingtest-integ.config.in
+++ b/config/routingtest-integ.config
@@ -2,12 +2,12 @@
 
 IceBox.InheritProperties=1
 
-IceBox.Service.ServiceDiscovery=${service_locator_bindir}/src at service_locator:create
-IceBox.Service.BasicRoutingService=../src at BasicRoutingService:create
+IceBox.Service.ServiceDiscovery=service_locator:create
+IceBox.Service.BasicRoutingService=BasicRoutingService:create
 
 # Boost Test arguments can be passed here.
-# IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
-IceBox.Service.RoutingTest = ../test at RoutingTest:create
+# IceBox.Service.RoutingTest=RoutingTest:create --log_level=all
+IceBox.Service.RoutingTest=RoutingTest:create
 
 IceBox.LoadOrder=ServiceDiscovery,BasicRoutingService,RoutingTest
 
diff --git a/config/routingtest.config b/config/routingtest.config
index 7dd703d..c35f7ea 100644
--- a/config/routingtest.config
+++ b/config/routingtest.config
@@ -1,7 +1,7 @@
 # This is a configuration file for the Routing Service Test driver.
 
 
-IceBox.Service.RoutingTest = RoutingTest:create --log_level=all
+IceBox.Service.RoutingTest=RoutingTest:create --log_level=all
 
 IceBox.InheritProperties=1 
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c2935e1..e51d804 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -21,5 +21,5 @@ asterisk_scf_component_build_icebox(RoutingTest)
 target_link_libraries(RoutingTest asterisk-scf-api)
 
 if(integrated_build STREQUAL "true")
-   icebox_add_test(RoutingTest ../config/routingtest-integ.config)
+   asterisk_scf_test_icebox(RoutingTest config/routingtest-integ.config)
 endif()

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list