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

Commits to the Hydra project code repositories hydra-commits at lists.digium.com
Thu Aug 5 18:01:04 CDT 2010


branch "master" has been updated
       via  2975e1b7979ddebfe09e6c33bff6b8abbaaaf406 (commit)
      from  e1421edc4796f51231c4b34bfc65efe19fe17edd (commit)

Summary of changes:
 CMakeLists.txt                           |    4 +-
 {core => Core}/CMakeLists.txt            |    3 +
 Core/Routing/CMakeLists.txt              |    4 +
 Core/Routing/RoutingI.ice                |  150 ++++++++++++++++++++++++++++++
 {core => Core}/ServiceLocatorEventsI.ice |    0
 {core => Core}/ServiceLocatorI.ice       |    0
 {media => Media}/CMakeLists.txt          |    0
 {media => Media}/MediaI.ice              |    0
 8 files changed, 159 insertions(+), 2 deletions(-)
 rename {core => Core}/CMakeLists.txt (77%)
 create mode 100644 Core/Routing/CMakeLists.txt
 create mode 100644 Core/Routing/RoutingI.ice
 rename {core => Core}/ServiceLocatorEventsI.ice (100%)
 rename {core => Core}/ServiceLocatorI.ice (100%)
 rename {media => Media}/CMakeLists.txt (100%)
 rename {media => Media}/MediaI.ice (100%)


- Log -----------------------------------------------------------------
commit 2975e1b7979ddebfe09e6c33bff6b8abbaaaf406
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Thu Aug 5 17:53:48 2010 -0500

    Made directory names UpperCamelCase. Added Routing interface.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0e7c29c..6a1fd90 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@
 hydra_slice_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
 # Slice definitions for core functionality
-add_subdirectory(core)
+add_subdirectory(Core)
 
 # Slice definitions for media functionality
-add_subdirectory(media)
+add_subdirectory(Media)
diff --git a/core/CMakeLists.txt b/Core/CMakeLists.txt
similarity index 77%
rename from core/CMakeLists.txt
rename to Core/CMakeLists.txt
index cc9b195..4cd5a18 100644
--- a/core/CMakeLists.txt
+++ b/Core/CMakeLists.txt
@@ -3,3 +3,6 @@ hydra_compile_slice(ServiceLocatorI.ice lib "Slice Defined API" Core)
 
 # Can't forget about events
 hydra_compile_slice(ServiceLocatorEventsI.ice lib "Slice Defined API" Core)
+
+# Slice definitions for Routing functionality
+add_subdirectory(Routing)
\ No newline at end of file
diff --git a/Core/Routing/CMakeLists.txt b/Core/Routing/CMakeLists.txt
new file mode 100644
index 0000000..cc866ff
--- /dev/null
+++ b/Core/Routing/CMakeLists.txt
@@ -0,0 +1,4 @@
+# Compile routing service API
+hydra_compile_slice(RoutingI.ice lib "Routing Service API" Core)
+
+
diff --git a/Core/Routing/RoutingI.ice b/Core/Routing/RoutingI.ice
new file mode 100644
index 0000000..27b013f
--- /dev/null
+++ b/Core/Routing/RoutingI.ice
@@ -0,0 +1,150 @@
+#pragma once
+
+module Hydra
+{
+module Core
+{
+module Routing
+{
+["suppress"]
+module V1
+{
+   const string Version = "V1";
+   
+   exception DestinationNotFoundException {};
+
+   exception DestinationExistsException {};
+
+   exception InvalidParamsException {};
+
+   sequence<string> RegExSeq;
+
+   /**
+    * Provides lookup of an Endpoint based on a string Id. 
+    */
+   interface EndpointLocator
+   {
+      /**
+       * Returns the endpoints that match the specified destination id. 
+       *   @param id String identifier of the the destination. 
+       */
+      idempotent Channel::EndpointSeq lookup(string destination) 
+         throws DestinationNotFoundException, InvalidParamsException;
+   };
+
+   /**
+    * A registry of Endpoints. In addition to providing the EndpointLocator interface, a registry
+    * can be augmented with other EndpointLocators. A LocatorRegistry is expected to be able to return 
+    * a lookup for any of the EndpointLocators added to it. 
+    */
+   interface LocatorRegistry extends EndpointLocator
+   {
+      /**
+       * Add an EndpointLocator.
+       *   @param id A unique identifier for the added EndpointLocator. 
+       *   @param destinationIdRangeList A set of regular expressions that define the valid endpoint ids 
+       *     this locator supports. 
+       */
+      void addEndpointLocator(string id, RegExSeq destinationIdRangeList) 
+         throws DestinationExistsException, InvalidParamsException;
+
+      /**
+       * Remove an EndpointLocator.
+       *   @param The unique id of the locator to remove. 
+       */
+      void removeEndpointLocator(string id) throws DestinationNotFoundException;
+
+      // Changes the range of device ids managed by a given channel. 
+      /**
+       * Modify the range of device ids managed by a previously added EndpointLocator. 
+       *   @param A list of reqular expressions that define the the valid endpoint ids. This 
+       *     set of regular expressions completely replaces the current set. 
+       */
+      void setEndpointLocatorDeviceIds(string channelId, RegExSeq deviceIdRangeList) 
+         throws DestinationNotFoundException, InvalidParamsException;
+   };
+
+
+   /** 
+    * Administrative interface to the service. 
+    */
+   interface RoutingServiceAdmin
+   {
+      /**
+       * Drop references to all EndpointLocators that have been registered. 
+       */
+      void clearEndpointLocators();
+
+      /**
+       * Sends a policy string to the Lua script processor.  The default implementation is a no-op, 
+       * but site-specific scripts may make use it. 
+       *    @param policy A site-specific policy specification.  
+       */
+      void setPolicy(string policy);
+   };
+
+
+   module Event
+   {
+      enum OperationResult
+      {
+         SUCCCESS,
+         FAILED
+      };
+
+      const string TopicId = "::hydra::routing::event";
+      
+      /**
+       * Interface for monitoring the basic routing service events. 
+       */
+      interface RoutingEvents
+      {
+         /**
+          * Notification that a lookup was attempted.
+          *  @param destinationId The destination being looked up. 
+          *  @param result Indicates whether or not the attempt was successful.
+          */
+         void lookupEvent(string destinationId, OperationResult result);
+
+         /**
+          * Notification that an attempt to add an EndpointLocator was made.
+          *  @param id The identifier of the EndpointLocator being added. 
+          *  @param destinationIdRangeList A set of regular expressions that define the endpoints available. 
+          *  @param result Indicates whether or not the attempt was successful.
+          */
+         void addEndpointLocatorEvent(string id, RegExSeq destinationIdRangeList, OperationResult result);
+
+         /**
+          * Notification that an attempt was made to remove an EndpointLocator. 
+          *  @param id The identifier of the EndpointLocator being removed. 
+          *  @param result Indicates whether or not the attempt was successful.
+          */
+         void removeEndpointLocatorEvent(string channelId, OperationResult result);
+
+         /**
+          * Notification that an attempt was made to modify the range of destinationIds 
+          * accessible from a given EndpointLocator.  
+          *  @param id The destination being looked up. 
+          *  @param destinationIdRangeList A list of regular expressions to be representative of the new valid ids. 
+          *  @param result Indicates whether or not the attempt was successful.
+          */
+         void setEndpointLocatorDeviceIds(string id, RegExSeq destinationIdRangeList, OperationResult result);
+
+         /**
+          * Called when the EndpointLocator cache has been cleared by an administrative action.  
+          */
+         void clearEndpointLocatorsEvent();
+
+         /**
+          * Called when an administation operation has set the routing service policy. 
+          *  @param policy The new policy.
+          */
+         void setPolicy(string policy);
+      };
+   };
+
+}; // module V1
+}; // module Routing
+}; // module Core
+}; // module Hydra
+
diff --git a/core/ServiceLocatorEventsI.ice b/Core/ServiceLocatorEventsI.ice
similarity index 100%
rename from core/ServiceLocatorEventsI.ice
rename to Core/ServiceLocatorEventsI.ice
diff --git a/core/ServiceLocatorI.ice b/Core/ServiceLocatorI.ice
similarity index 100%
rename from core/ServiceLocatorI.ice
rename to Core/ServiceLocatorI.ice
diff --git a/media/CMakeLists.txt b/Media/CMakeLists.txt
similarity index 100%
rename from media/CMakeLists.txt
rename to Media/CMakeLists.txt
diff --git a/media/MediaI.ice b/Media/MediaI.ice
similarity index 100%
rename from media/MediaI.ice
rename to Media/MediaI.ice

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


-- 
hydra/slice.git




More information about the asterisk-scf-commits mailing list