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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Sep 6 10:20:36 CDT 2011


branch "presence" has been created
        at  0f009e4611855902a82ddae1f9c3378229d5606e (commit)

- Log -----------------------------------------------------------------
commit 0f009e4611855902a82ddae1f9c3378229d5606e
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Sep 6 12:25:47 2011 -0300

    Add first stab at slice.

diff --git a/slice/AsteriskSCF/Presence/PresenceIf.ice b/slice/AsteriskSCF/Presence/PresenceIf.ice
new file mode 100644
index 0000000..fec1f6b
--- /dev/null
+++ b/slice/AsteriskSCF/Presence/PresenceIf.ice
@@ -0,0 +1,115 @@
+/*
+ * 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
+   {
+       AVAILABLE,
+   };
+
+   /**
+    * Class which contains presence information about an endpoint
+    *
+    * This class can be extended to provide additional status information specific to
+    * the type of endpoint.
+    */
+   unsliceable class Status
+   {
+       /**
+        * Current state of the endpoint
+        */
+       State currentState;
+   };
+
+   /**
+    * Interface for a presence consumer
+    */
+   interface Consumer
+   {
+       /**
+        * Method used to indicate that an endpoint has updated its status.
+        *
+        * @param endpoint Name of the endpoint that the status is for.
+        *
+        * @param newStatus Concrete class containing the status of the endpoint.
+        */
+       void update(string endpoint, Status newStatus);
+   };
+
+   /**
+    * Interface for a presence router
+    */
+   interface Router extends Consumer
+   {
+       /**
+        * Method used to query for the current status of an endpoint.
+        *
+        * @param endpoint Name of the endpoint to get the status for.
+        *
+        * @return Status A concrete class containing the current status of the endpoint.
+        */
+       idempotent Status query(string endpoint);
+
+       /**
+        * Method used to subscribe to specific endpoint status updates.
+        *
+        * Note that the current status for each endpoint will be sent to the consumer before returning.
+        *
+        * @param subscriber The name of the endpoint that is subscribing.
+        *
+        * @param endpoints A sequence of endpoints to subscribe to.
+        *
+        * @param presenceConsumer A proxy to a consumer that will receive status updates for the endpoints.
+        *
+        * @see Consumer
+        */
+       void subscribe(string subscriber, Ice::StringSeq endpoints, Consumer *presenceConsumer);
+
+       /**
+        * Method used to unsubscribe from specific endpoint status updates.
+        *
+        * @param endpoints A sequence of endpoints that will no longer be subscribed to.
+        *
+        * @param presenceConsumer A proxy to the consumer that was subscribed.
+        */
+       void unsubscribe(Ice::StringSeq endpoints, 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