[hydra-commits] hydra/slice.git branch "master" updated.
Commits to the Hydra project code repositories
hydra-commits at lists.digium.com
Fri Aug 6 14:10:24 CDT 2010
branch "master" has been updated
via 2772a4e1c825354dc3a6aea1461d55de175ebc5d (commit)
from fa1100031eeb253de1726b2b45b9a1c3d97bcdb3 (commit)
Summary of changes:
Core/Endpoint/CMakeLists.txt | 2 +-
Core/Endpoint/{EndpointI.ice => EndpointIf.ice} | 0
Core/Routing/CMakeLists.txt | 2 +-
Core/Routing/{RoutingI.ice => RoutingIf.ice} | 2 +-
4 files changed, 3 insertions(+), 3 deletions(-)
copy Core/Endpoint/{EndpointI.ice => EndpointIf.ice} (100%)
copy Core/Routing/{RoutingI.ice => RoutingIf.ice} (99%)
- Log -----------------------------------------------------------------
commit 2772a4e1c825354dc3a6aea1461d55de175ebc5d
Author: Ken Hunt <ken.hunt at digium.com>
Date: Fri Aug 6 14:09:29 2010 -0500
Renamed Routing and Endpoint slice files for newer "*If.ice" naming.
diff --git a/Core/Endpoint/CMakeLists.txt b/Core/Endpoint/CMakeLists.txt
index 8753d2f..24a581c 100644
--- a/Core/Endpoint/CMakeLists.txt
+++ b/Core/Endpoint/CMakeLists.txt
@@ -1,4 +1,4 @@
# Compile routing service API
-hydra_compile_slice(EndpointI.ice lib "Endpoint API" Core)
+hydra_compile_slice(EndpointIf.ice lib "Endpoint API" Core)
diff --git a/Core/Endpoint/EndpointIf.ice b/Core/Endpoint/EndpointIf.ice
new file mode 100644
index 0000000..3c65f9b
--- /dev/null
+++ b/Core/Endpoint/EndpointIf.ice
@@ -0,0 +1,41 @@
+#pragma once
+
+module Hydra
+{
+module Core
+{
+module Endpoint
+{
+["suppress"]
+module V1
+{
+ const string Version = "V1";
+
+ /**
+ * Unique id for an Endpoint.
+ */
+ class EndpointId
+ {
+ string endpointManagerId;
+ string deviceId;
+ };
+
+ /**
+ * A generic Endpoint.
+ * TBD - NOTE: Not crazy about the name, but needs to be different from the module name!
+ */
+ class BaseEndpoint
+ {
+ EndpointId id;
+ };
+
+ sequence<BaseEndpoint> EndpointSeq;
+
+
+ // TBD... only implemented minimum need for Routing Service.
+
+}; // module V1
+}; // module Endpoint
+}; // module Core
+}; // module Hydra
+
diff --git a/Core/Routing/CMakeLists.txt b/Core/Routing/CMakeLists.txt
index cc866ff..5f8756e 100644
--- a/Core/Routing/CMakeLists.txt
+++ b/Core/Routing/CMakeLists.txt
@@ -1,4 +1,4 @@
# Compile routing service API
-hydra_compile_slice(RoutingI.ice lib "Routing Service API" Core)
+hydra_compile_slice(RoutingIf.ice lib "Routing Service API" Core)
diff --git a/Core/Routing/RoutingIf.ice b/Core/Routing/RoutingIf.ice
new file mode 100644
index 0000000..d8334c8
--- /dev/null
+++ b/Core/Routing/RoutingIf.ice
@@ -0,0 +1,153 @@
+#pragma once
+
+#include "Core/Endpoint/EndpointIf.ice"
+
+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 Endpoint::V1::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 accessible via given EndpointLocator.
+ /**
+ * Modify the range of device ids managed by a previously added EndpointLocator.
+ * @param id A unique identifier for the 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 id, 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 id, 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
+
-----------------------------------------------------------------------
--
hydra/slice.git
More information about the asterisk-scf-commits
mailing list