[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "publish-internals" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Nov 11 13:49:01 CST 2011


branch "publish-internals" has been created
        at  acbc7a5ad1f8882f7f75d3f9fd17a054bed366b7 (commit)

- Log -----------------------------------------------------------------
commit acbc7a5ad1f8882f7f75d3f9fd17a054bed366b7
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 15:50:01 2011 -0400

    Add a category for IceStorm.

diff --git a/slice/AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice b/slice/AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice
index e8d5f8a..032c339 100644
--- a/slice/AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice
+++ b/slice/AsteriskSCF/Core/Discovery/ServiceLocatorIf.ice
@@ -51,6 +51,11 @@ module V1
    exception CompareNotFound { };
 
    /**
+    * Category name used to find the built-in IceStorm topic manager service.
+    */
+   const string CategoryIceStorm = "IceStorm";
+
+   /**
     * Generic service locator parameters class that more specific parameter classes can extend.
     * These parameters are used to register a service with the ServiceLocator, and to 
     * locate (i.e. query) the service. 

commit d30be6ad2e0df0dce54107fcb38fb3a073372c7c
Author: Joshua Colp <jcolp at digium.com>
Date:   Fri Nov 11 14:44:02 2011 -0400

    Add presence design.

diff --git a/slice/AsteriskSCF/Presence/PresenceIf.ice b/slice/AsteriskSCF/Presence/PresenceIf.ice
new file mode 100644
index 0000000..dad6e6c
--- /dev/null
+++ b/slice/AsteriskSCF/Presence/PresenceIf.ice
@@ -0,0 +1,208 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2011, 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.
+ */
+
+#pragma once
+
+#include <Ice/BuiltinSequences.ice>
+
+module AsteriskSCF
+{
+
+module Presence
+{
+
+["suppress"]
+module V1
+{
+   /**
+    * String representation of the version of this interface
+    */
+   const string Version = "V1";
+
+   /**
+    * Various states for presence
+    */
+   enum State
+   {
+       /**
+        * State of the given resource is not yet known.
+        */
+       UNKNOWN,
+
+       /**
+        * Resource is not in use.
+        */
+       NOTINUSE,
+
+       /**
+        * Resource is in use.
+        */
+       INUSE,
+
+       /**
+        * Resource is busy.
+        */
+       BUSY,
+
+       /**
+        * Given resource is invalid.
+        */
+       INVALID,
+
+       /**
+        * Resource is currently unavailable.
+        */
+       UNAVAILABLE,
+
+       /**
+        * Resource is ringing.
+        */
+       RINGING,
+
+       /**
+        * Resource is ringing and in use.
+        */
+       RINGINGINUSE,
+
+       /**
+        * Resource is on hold.
+        */
+       ONHOLD,
+
+       /**
+        * Resource is away.
+        */
+       AWAY,
+
+       /**
+        * Resource does not wish to be disturbed.
+        */
+       DONOTDISTURB,
+
+       /**
+        * Resource has been away for quite awhile.
+        */
+       EXTENDEDAWAY,
+
+       /**
+        * The state is not permitted to be known.
+        */
+       NOTPERMITTED,
+   };
+
+   /**
+    * Class which contains presence information about an resource
+    *
+    * This class can be extended to provide additional status information specific to
+    * the type of resource.
+    */
+   unsliceable class Status
+   {
+       /**
+        * Current state of the resource
+        */
+       State currentState;
+   };
+
+   /**
+    * Dictionary of resources and their status
+    */
+   dictionary<string, Status> ResourceStatusDict;
+
+   /**
+    * Interface for a presence consumer
+    */
+   interface Consumer
+   {
+       /**
+        * Method used to indicate that an resource has updated its status.
+        *
+        * @param resource Name of the resource that the status is for.
+        *
+        * @param newStatus Concrete class containing the status of the resource.
+        */
+       void update(ResourceStatusDict newStatus);
+   };
+
+   /**
+    * Class which contains authentication credentials, extended by the router implementation.
+    */
+   unsliceable class Credentials
+   {
+   };
+
+   /**
+    * Class which contains an authentication token, extended by the router implementation.
+    */
+   unsliceable class Token
+   {
+   };
+
+   /**
+    * Interface for a presence router
+    */
+   interface Router extends Consumer
+   {
+       /**
+        * Method used to authenticate with the router.
+        *
+        * @param authDetails Authentication credentials.
+        *
+        * @return Token An authentication token if authenticated, none if not.
+        */
+       idempotent Token authenticate(Credentials authDetails);
+
+       /**
+        * Method used to query for the current status of an resource.
+        *
+        * @param authToken Authentication token received when authenticate was called.
+        *
+        * @param resources Name of the resources to get the status for.
+        *
+        * @return ResourceStatusDict Dictionary containing status of requested resources.
+        */
+       idempotent ResourceStatusDict query(Token authToken, Ice::StringSeq resources);
+
+       /**
+        * Method used to subscribe to specific resource status updates.
+        *
+        * Note that the current status for each resource will be sent to the consumer before returning.
+        *
+        * @param authToken Authentication token received when authenticate was called.
+        *
+        * @param resources A sequence of resources to subscribe to.
+        *
+        * @param presenceConsumer A proxy to a consumer that will receive status updates for the resources.
+        *
+        * @see Consumer
+        */
+       void subscribe(Token authToken, Ice::StringSeq resources, Consumer *presenceConsumer);
+
+       /**
+        * Method used to unsubscribe from specific resource status updates.
+        *
+        * @param resources A sequence of resources that will no longer be subscribed to.
+        *
+        * @param presenceConsumer A proxy to the consumer that was subscribed.
+        */
+       void unsubscribe(Ice::StringSeq resources, Consumer *presenceConsumer);
+   };
+
+}; /* End of module V1 */
+
+}; /* End of module Presence */
+
+}; /* End of module AsteriskSCF */

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


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list