[hydra-commits] hydra/servicediscovery.git branch "master" updated.

Commits to the Hydra project code repositories hydra-commits at lists.digium.com
Fri Aug 6 06:17:43 CDT 2010


branch "master" has been updated
       via  a3e959f403c977c1cbebee6892c927b5dd338d75 (commit)
       via  19abe0e7424f2834b3e489ca6f7186f9965e9ca4 (commit)
       via  c17131d5e4a8dfe290793470f43261ebb6bbd672 (commit)
      from  0d57efb4e8d5daa87b7b69f766649813679762f8 (commit)

Summary of changes:
 .gitmodules                      |    3 +
 CMakeLists.txt                   |    2 +-
 slice                            |    1 +
 slice/CMakeLists.txt             |    5 -
 slice/service_locator.ice        |  157 --------------------------------------
 slice/service_locator_events.ice |   67 ----------------
 src/CMakeLists.txt               |    4 +-
 src/ServiceLocator.cpp           |    6 +-
 src/ServiceLocatorManagement.cpp |   12 ++--
 src/ServiceLocatorManagement.h   |   12 ++--
 src/ServiceManagement.cpp        |   14 ++--
 src/ServiceManagement.h          |    8 +-
 test/CMakeLists.txt              |    4 +-
 test/TestServiceLocator.cpp      |    6 +-
 14 files changed, 38 insertions(+), 263 deletions(-)
 create mode 160000 slice
 delete mode 100644 slice/CMakeLists.txt
 delete mode 100644 slice/service_locator.ice
 delete mode 100644 slice/service_locator_events.ice


- Log -----------------------------------------------------------------
commit a3e959f403c977c1cbebee6892c927b5dd338d75
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Aug 6 08:33:15 2010 -0300

    Update based on slice submodule and renaming.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 381b628..9cbf688 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ include(cmake/Hydra_v4.cmake)
 hydra_project(service_locator 3.4 CXX)
 
 # Take care of slice definitions
-add_subdirectory(slice)
+add_subdirectory(slice EXCLUDE_FROM_ALL)
 
 # Take care of the source code for this project
 add_subdirectory(src)
diff --git a/slice b/slice
index e1421ed..4bcec48 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit e1421edc4796f51231c4b34bfc65efe19fe17edd
+Subproject commit 4bcec48e26831c99d66af8c46c6ed68b2dcd0687
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 653b6ea..d7a331c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Create the actual standalone service locator component
 hydra_component_init(service_locator CXX)
-hydra_component_add_slice(service_locator service_locator)
-hydra_component_add_slice(service_locator service_locator_events)
+hydra_component_add_slice(service_locator ServiceLocatorI)
+hydra_component_add_slice(service_locator ServiceLocatorEventsI)
 hydra_component_add_file(service_locator ServiceLocator.cpp)
 hydra_component_add_file(service_locator ServiceLocatorManagement.cpp)
 hydra_component_add_file(service_locator ServiceManagement.cpp)
diff --git a/src/ServiceLocator.cpp b/src/ServiceLocator.cpp
index ce614c7..eca0a41 100644
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@ -19,15 +19,15 @@
 #include <Ice/Ice.h>
 #include <IceStorm/IceStorm.h>
 
-#include "service_locator.h"
-#include "service_locator_events.h"
+#include "Core/ServiceLocatorI.h"
+#include "Core/ServiceLocatorEventsI.h"
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
 
 using namespace std;
 using namespace Hydra::System::Discovery;
-using namespace Hydra::System::Discovery::V1;
+using namespace Hydra::Core::Discovery::V1;
 
 /**
  * Implementation of the Ice::Application class
diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 549e1cc..a54ae06 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -20,15 +20,15 @@
 
 #include <boost/thread/shared_mutex.hpp>
 
-#include "service_locator.h"
-#include "service_locator_events.h"
+#include "Core/ServiceLocatorI.h"
+#include "Core/ServiceLocatorEventsI.h"
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
 
 using namespace std;
 using namespace Hydra::System::Discovery;
-using namespace Hydra::System::Discovery::V1;
+using namespace Hydra::Core::Discovery::V1;
 
 /**
  * Small internal class which is used to store information about a comparator.
@@ -41,7 +41,7 @@ public:
 	 *
 	 * @param compare A proxy to the comparator service we are wrapping.
 	 */
-	ServiceLocatorComparator(const Hydra::System::Discovery::V1::ServiceLocatorParamsComparePrx& compare) : mCompare(compare) { };
+	ServiceLocatorComparator(const Hydra::Core::Discovery::V1::ServiceLocatorParamsComparePrx& compare) : mCompare(compare) { };
 
 	/**
 	 * API call which forwards an isSupported over ICE to a remote comparator.
@@ -50,12 +50,12 @@ public:
 	 *
 	 * @return A boolean value with true indicating the parameters are supported while false indicates otherwise.
 	 */
-	bool isSupported(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr& params) { return mCompare->isSupported(params); };
+	bool isSupported(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr& params) { return mCompare->isSupported(params); };
 private:
 	/**
 	 * A proxy to the comparator service that we are wrapping.
 	 */
-	Hydra::System::Discovery::V1::ServiceLocatorParamsComparePrx mCompare;
+	Hydra::Core::Discovery::V1::ServiceLocatorParamsComparePrx mCompare;
 };
 
 /**
diff --git a/src/ServiceLocatorManagement.h b/src/ServiceLocatorManagement.h
index 30be1f6..118bc4c 100644
--- a/src/ServiceLocatorManagement.h
+++ b/src/ServiceLocatorManagement.h
@@ -40,16 +40,16 @@ class ServiceLocatorManagementImplPriv;
 /**
  * Implementation of the ServiceLocatorManagement interface as defined in service_locator.ice
  */
-class ServiceLocatorManagementImpl : public Hydra::System::Discovery::V1::ServiceLocatorManagement
+class ServiceLocatorManagementImpl : public Hydra::Core::Discovery::V1::ServiceLocatorManagement
 {
 public:
 	ServiceLocatorManagementImpl(Ice::ObjectAdapterPtr adapter, const Hydra::System::Discovery::EventsPrx& service_discovery_topic);
-	Ice::ObjectPrx locate(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr&);
-	Ice::ObjectProxySeq locateAll(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr&);
-	Hydra::System::Discovery::V1::ServiceManagementPrx addService(const Ice::ObjectPrx&, const std::string&, const Ice::Current&);
-	void addCompare(const std::string&, const Hydra::System::Discovery::V1::ServiceLocatorParamsComparePrx&, const Ice::Current&);
+	Ice::ObjectPrx locate(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr&);
+	Ice::ObjectProxySeq locateAll(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr&);
+	Hydra::Core::Discovery::V1::ServiceManagementPrx addService(const Ice::ObjectPrx&, const std::string&, const Ice::Current&);
+	void addCompare(const std::string&, const Hydra::Core::Discovery::V1::ServiceLocatorParamsComparePrx&, const Ice::Current&);
 	void removeCompare(const std::string&, const Ice::Current&);
-	bool isSupported(const std::string&, const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr&);
+	bool isSupported(const std::string&, const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr&);
 	void removeService(ServiceManagementImplPtr);
 private:
 	/**
diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index b7bee8f..45c77b1 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -20,29 +20,29 @@
 
 #include <boost/thread/shared_mutex.hpp>
 
-#include "service_locator.h"
-#include "service_locator_events.h"
+#include "Core/ServiceLocatorI.h"
+#include "Core/ServiceLocatorEventsI.h"
 
 #include "ServiceLocatorManagement.h"
 #include "ServiceManagement.h"
 
 using namespace std;
 using namespace Hydra::System::Discovery;
-using namespace Hydra::System::Discovery::V1;
+using namespace Hydra::Core::Discovery::V1;
 
 /**
  * Small internal class which is used to store information about supported parameters.
  */
 class ServiceLocatorParamsSpec {
 public:
-	ServiceLocatorParamsSpec(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr& params, const std::string& compare_guid, ServiceLocatorManagementImpl* management)
+	ServiceLocatorParamsSpec(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr& params, const std::string& compare_guid, ServiceLocatorManagementImpl* management)
 		: mParams(params), mCompareGuid(compare_guid), mManagement(management) { };
-	bool isSupported(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr&);
+	bool isSupported(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr&);
 private:
 	/**
 	 * A pointer to a parameters structure which describes what is supported.
 	 */
-	Hydra::System::Discovery::V1::ServiceLocatorParamsPtr mParams;
+	Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr mParams;
 
 	/**
 	 * A string containing the comparator uuid that should be used when comparing the parameters
@@ -98,7 +98,7 @@ public:
 	/**
 	 * A local proxy to this management service.
 	 */
-	Hydra::System::Discovery::V1::ServiceManagementPrx mManagementPrx;
+	Hydra::Core::Discovery::V1::ServiceManagementPrx mManagementPrx;
 
 	/**
 	 * A vector of locator parameters that this service supports.
diff --git a/src/ServiceManagement.h b/src/ServiceManagement.h
index 68ccc03..3f04a76 100644
--- a/src/ServiceManagement.h
+++ b/src/ServiceManagement.h
@@ -30,17 +30,17 @@ class ServiceManagementImplPriv;
 /**
  * An implementation of the ServiceManagement interface as defined in service_locator.ice
  */
-class ServiceManagementImpl : public Hydra::System::Discovery::V1::ServiceManagement
+class ServiceManagementImpl : public Hydra::Core::Discovery::V1::ServiceManagement
 {
 public:
         ServiceManagementImpl(ServiceLocatorManagementImpl*, const Ice::ObjectPrx&, Ice::ObjectAdapterPtr, const Hydra::System::Discovery::EventsPrx&, const std::string&);
-	void addLocatorParams(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr&, const std::string&, const Ice::Current&);
+	void addLocatorParams(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr&, const std::string&, const Ice::Current&);
 	void suspend(const Ice::Current&);
 	void unsuspend(const Ice::Current&);
 	void unregister(const Ice::Current&);
 	Ice::ObjectPrx GetService();
-	Hydra::System::Discovery::V1::ServiceManagementPrx GetServiceManagementPrx();
-	bool isSupported(const Hydra::System::Discovery::V1::ServiceLocatorParamsPtr&);
+	Hydra::Core::Discovery::V1::ServiceManagementPrx GetServiceManagementPrx();
+	bool isSupported(const Hydra::Core::Discovery::V1::ServiceLocatorParamsPtr&);
 private:
         /**
 	 * Private implementation data for ServiceManagementImpl.
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 200abb7..589bba3 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,7 +1,7 @@
 # Create the actual standalone service locator test driver component
 hydra_component_init(service_locator_test CXX)
-hydra_component_add_slice(service_locator_test service_locator)
-hydra_component_add_slice(service_locator_test service_locator_events)
+hydra_component_add_slice(service_locator_test ServiceLocatorI)
+hydra_component_add_slice(service_locator_test ServiceLocatorEventsI)
 hydra_component_add_file(service_locator_test TestServiceLocator.cpp)
 hydra_component_add_ice_libraries(service_locator_test IceStorm)
 hydra_component_add_boost_libraries(service_locator_test unit_test_framework)
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 115c339..eeac3a1 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -7,11 +7,11 @@
 
 #include <Ice/Ice.h>
 
-#include "service_locator.h"
-#include "service_locator_events.h"
+#include "Core/ServiceLocatorI.h"
+#include "Core/ServiceLocatorEventsI.h"
 
 using namespace std;
-using namespace Hydra::System::Discovery::V1;
+using namespace Hydra::Core::Discovery::V1;
 
 /* A basic compare service implementation that always returns true, this is registered as both a compare service
  * and a regular service during testing.

commit 19abe0e7424f2834b3e489ca6f7186f9965e9ca4
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 18:23:33 2010 -0300

    Add a submodule for slice definitions.

diff --git a/.gitmodules b/.gitmodules
index 0f6d7db..b35270a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
 [submodule "cmake"]
 	path = cmake
 	url = git at git.asterisk.org:hydra/cmake
+[submodule "slice"]
+	path = slice
+	url = git at git.asterisk.org:hydra/slice
diff --git a/slice b/slice
new file mode 160000
index 0000000..e1421ed
--- /dev/null
+++ b/slice
@@ -0,0 +1 @@
+Subproject commit e1421edc4796f51231c4b34bfc65efe19fe17edd

commit c17131d5e4a8dfe290793470f43261ebb6bbd672
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Aug 5 18:22:55 2010 -0300

    Remove old slice directory.

diff --git a/slice/CMakeLists.txt b/slice/CMakeLists.txt
deleted file mode 100644
index c0ecd31..0000000
--- a/slice/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# Compile our service locator slice definition so we can then use it
-hydra_compile_slice(service_locator.ice lib "Slice Defined API" Core)
-
-# Can't forget about events
-hydra_compile_slice(service_locator_events.ice lib "Slice Defined API" Core)
diff --git a/slice/service_locator.ice b/slice/service_locator.ice
deleted file mode 100644
index ae0bea9..0000000
--- a/slice/service_locator.ice
+++ /dev/null
@@ -1,157 +0,0 @@
-#include <Ice/BuiltinSequences.ice>
-
-module Hydra
-{
-
-module System
-{
-
-module Discovery
-{
-
-module V1
-{
-
-	/**
-	 * Exception used for service locator requests to indicate that no service could be found.
-	 */
-	exception ServiceNotFound { };
-
-	/**
-	 * Exception used for indicating that a comparator is already registered with a given guid.
-	 */
-	exception DuplicateCompare { };
-
-	/**
-	 * Exception used for indicating that a comparator was not found.
-	 */
-	exception CompareNotFound { };
-
-	/**
-	 * Generic service locator parameters class that more specific parameter classes can extend.
-	 */
-	["preserved"] class ServiceLocatorParams
-	{
-		/**
-		 * Basic category for the service, such as bridge or channel service.
-		 */
-		string category;
-	};
-
-	/**
-	 * Interface used to perform service locator requests.
-	 */
-	interface ServiceLocator
-	{
-		/**
-		 * Method which performs a locator request using provided parameters but only returns a single
-		 * proxy.
-		 *
-		 * @param params A concrete class containing parameters describing the service that is trying to be found.
-		 *
-		 * @return A proxy to the service matching the given parameters.
-		 */
-		idempotent Object *locate(ServiceLocatorParams params) throws ServiceNotFound;
-
-		/**
-		 * Method which performs a location request using provided parameters but can return multiple
-		 * proxies.
-		 *
-		 * @param params A concrete class containing parameters describing the service that is trying to be found.
-		 *
-		 * @return A sequence of proxies which match the given parameters.
-		 */
-		idempotent Ice::ObjectProxySeq locateAll(ServiceLocatorParams params) throws ServiceNotFound;
-	};
-
-	/**
-	 * Interface to the service locator component which allows manipulation of registered service.
-	 */
-	interface ServiceManagement
-	{
-		/**
-		 * Method which adds supported discovery parameters to a registered service.
-		 *
-		 * @param params A concrete class containing parameters describing what is supported.
-		 *
-		 * @param compareguid The unique identifier of a comparator which can perform a lower level
-		 *              comparison to determine whether supplied parameters in a locator request
-		 *              are truly supported or not. This is optional.
-		 */
-		void addLocatorParams(ServiceLocatorParams params, string compareguid);
-
-		/**
-		 * Method which suspends this service from being considered when a locator request
-		 * is performed.
-		 */
-		void suspend();
-
-		/**
-		 * Method which unsuspends this service. Once this method is called the service will
-		 * be able to found again when a locator request is performed.
-		 */
-		void unsuspend();
-
-		/**
-		 * Method which unregisters this service from the service locator.
-		 */
-		void unregister();
-	};
-
-	/**
-	 * Interface to an external component which performs a service locator parameters comparison.
-	 */
-	interface ServiceLocatorParamsCompare
-	{
-		/**
-		 * Method which determines whether provided parameters are supported by the
-		 * comparator or not.
-		 *
-		 * @param params A concrete class containing parameters describing the service that is trying to be found.
-		 *
-		 * @return A boolean value with true meaning the parameters are supported and false if not.
-		 *
-		 */
-		bool isSupported(ServiceLocatorParams params);
-	};
-
-	/**
-	 * Interface to do service locator management, such as adding services and comparators.
-	 */
-	interface ServiceLocatorManagement
-	{
-		/**
-		 * Method which adds a service to the service locator.
-		 *
-		 * @param service A proxy to the service that is being registered.
-		 *
-		 * @param guid A unique identifier for the service which is used in events.
-		 *
-		 * @return A proxy to the service management interface for this service.
-		 */
-		ServiceManagement *addService(Object *service, string guid);
-
-		/**
-		 * Method which adds a comparator to the service locator.
-		 *
-		 * @param compareguid A unique identifier for this comparator.
-		 *
-		 * @param compare A proxy to the comparator service.
-		 */
-		void addCompare(string compareguid, ServiceLocatorParamsCompare *compare) throws DuplicateCompare;
-
-		/**
-		 * Method which removes a comparator from the service locator.
-		 *
-		 * @param compareguid The unique identifier for the comparator to remove.
-		 */
-		void removeCompare(string compareguid) throws CompareNotFound;
-	};
-
-}; // end module V1
-
-}; // end module Discovery
-
-}; // end module System
-
-}; // end module Hydra
diff --git a/slice/service_locator_events.ice b/slice/service_locator_events.ice
deleted file mode 100644
index 9657779..0000000
--- a/slice/service_locator_events.ice
+++ /dev/null
@@ -1,67 +0,0 @@
-module Hydra
-{
-
-module System
-{
-
-module Discovery
-{
-
-	/**
-	 * Default topic used for service locator events.
-	 */
-	const string TOPIC="::hydra::service::locator";
-
-	/**
-	 * Interface used to publish service locator related events.
-	 */
-	interface Events
-	{
-		/**
-		 * Method which is called when a comparator is registered.
-		 *
-		 * @param guid The unique identifier of the comparator.
-		 */
-		void comparisonRegistered(string guid);
-
-		/**
-		 * Method which is called when a comparator is unregistered.
-		 *
-		 * @param guid The unique identifier of the comparator.
-		 */
-		void comparisonUnregistered(string guid);
-
-		/**
-		 * Method which is called when a service is registered.
-		 *
-		 * @param guid The unique identifier of the service.
-		 */
-		void serviceRegistered(string guid);
-
-		/**
-		 * Method which is called when a service is unregistered.
-		 *
-		 * @param guid The unique identifier of the service.
-		 */
-		void serviceUnregistered(string guid);
-
-		/**
-		 * Method which is called when a service is suspended.
-		 *
-		 * @param guid The unique identifier of the service.
-		 */
-		void serviceSuspended(string guid);
-
-		/**
-		 * Method which is called when a service is unsuspended.
-		 *
-		 * @param guid The unique identifier of the service.
-		 */
-		void serviceUnsuspended(string guid);
-	};
-
-}; // end module Discovery
-
-}; // end module System
-
-}; // end module Hydra

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


-- 
hydra/servicediscovery.git




More information about the asterisk-scf-commits mailing list