[asterisk-scf-commits] asterisk-scf/release/slice.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Jul 20 16:10:52 CDT 2011


branch "master" has been updated
       via  ba6560f6ed82d3d3ba516f0edc701fc76137a4be (commit)
       via  5f3b94870308be2ea63413e2b1515efbb948ec4b (commit)
       via  f1052695108533af3df3e4ff0054a60dd968598b (commit)
       via  57ab22659d7829b6b4ef6c4e966beab848273282 (commit)
       via  0826cb24a021ca60e1026932a14f7dbd6a55da09 (commit)
       via  2961fe4437f85e17d62cecf3cd207ad01d5a4ceb (commit)
       via  7e8760dd3d7de497fedadf3589c3debd03d35d9d (commit)
       via  3e3468a598e3dae4fd3047bc95b83d411432e6ca (commit)
       via  f1a8af8d8e9ffc51c67e011440147fe7e56f9c10 (commit)
      from  0e0fe974f7a7dd7334086130c66a69fe4b94fa69 (commit)

Summary of changes:


- Log -----------------------------------------------------------------
commit ba6560f6ed82d3d3ba516f0edc701fc76137a4be
Merge: 0e0fe97 5f3b948
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Jul 20 16:11:18 2011 -0500

    Merge branch 'session-decorator'


commit 5f3b94870308be2ea63413e2b1515efbb948ec4b
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Jul 20 14:31:40 2011 -0500

    Make changes suggested by Kevin on CR-ASTSCF-115.
    
    * decorateSession -> modifySession
    * SessionDecorator -> SessionCreationHook

diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
index 9455692..cad714b 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
@@ -32,7 +32,7 @@ module ExtensionPoints
 module V1
 {
     
-    const string SessionCreationHookLocatorCategory = "SessionDecorator";
+    const string SessionCreationHookLocatorCategory = "SessionCreationHook";
 
     class SessionCreationHookData
     {
@@ -58,7 +58,7 @@ module V1
          * @param[out] replacementData Modified data for the session
          * @return A HookResult indicating whether the hook was successful
          */
-        AsteriskSCF::System::Hook::V1::HookResult decorateSession(SessionCreationHookData originalData, out SessionCreationHookData replacementData);
+        AsteriskSCF::System::Hook::V1::HookResult modifySession(SessionCreationHookData originalData, out SessionCreationHookData replacementData);
     };
 
     sequence<SessionCreationHook*> SessionCreationHookSeq;

commit f1052695108533af3df3e4ff0054a60dd968598b
Author: Brent Eagles <beagles at digium.com>
Date:   Thu Jul 14 20:02:29 2011 -0230

    Slice changes for bridge cookie support

diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index e57a7c3..8131772 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -122,7 +122,7 @@ module V1
      *
      * @see SessionCookies
      */
-    ["preserved"] class SessionCookie
+    unsliceable class SessionCookie
     {
     };
 
@@ -697,6 +697,32 @@ module V1
     };
 
     /**
+     * Generic base class for bridge 'cookies', opaque data items that can be
+     * stored on a Bridge and retrieved via the BridgeListener
+     * interface when events occur on that Bridge.
+     *
+     * @see BridgeListener
+     *
+     * @see BridgeCookies
+     */
+    unsliceable class BridgeCookie
+    {
+    };
+
+    /**
+     * A sequence of bridge cookies, allowing for a variable number of them
+     * to be passed in a single operation or event.
+     *
+     * @see BridgeListener
+     */
+    sequence <BridgeCookie> BridgeCookies;
+
+    /**
+     * A dictionary of bridge cookies, used for storing them.
+     */
+    dictionary<string, BridgeCookie> BridgeCookieDict;
+
+    /**
      * Forward declaration for the BridgeListener interface.
      */
     interface BridgeListener;
@@ -791,6 +817,42 @@ module V1
        ["amd"]
        void replaceSession(Session* sessionToReplace, SessionSeq newSessions)
            throws InvalidSessions, SessionNotFound, BridgeSessionOperationFailed;
+
+	/**
+	 * Set (or replace) cookies on the Bridge.
+	 *
+	 * @param cookies A sequence of one or more concrete objects,
+         *        each of which are of a type derived from BridgeCookie.  The
+         *        bridge will store these cookies on the bridge, replacing any
+         *        existing cookies with matching types.
+	 *
+	 * @note  There can only be one cookie of a given type associated
+	 *        with a Bridge.
+	 **/
+	void setCookies(BridgeCookies cookies);
+
+	/**
+	 * Remove cookies from the Bridge.
+	 *
+	 * @param cookies A sequence of one or more concrete objects,
+	 *        each of which are of a type derived from BridgeCookie.
+	 *        The bridge will remove any cookies on the bridge
+	 *        with types that match the ones in this sequence; the
+	 *        content of the supplied cookies is not compared.
+	 **/
+	void removeCookies(BridgeCookies cookies);
+
+	/**
+	 * Get cookies stored on the Bridge.
+	 *
+	 * @param cookieTypes A sequence of zero or more concrete objects,
+	 *        each of which are of a type derived from BridgeCookie.
+	 *
+	 * @return A sequence of zero or more cookies from the bridge,
+	 *         with types that match the types of the template cookies
+	 *         provided in the cookieTypes parameter.
+	 **/
+	BridgeCookies getCookies(BridgeCookies cookieTypes);
     };
 
     /**
@@ -808,8 +870,10 @@ module V1
         * @param sessionBridge The bridge object the sessions were added to.
         *
         * @param sessions A sequence of session proxies that were added to the bridge.
+        *
+        * @param cookies A sequence of bridge cookies that are associated with the bridge.
         */
-       void sessionsAdded(Bridge* sessionBridge, SessionSeq sessions);
+       void sessionsAdded(Bridge* sessionBridge, SessionSeq sessions, BridgeCookies cookies);
 
        /**
         * Called when sessions have been removed from a bridge.
@@ -818,22 +882,28 @@ module V1
         *
         * @param sessions A sequence of session proxies that were removed from
         * the bridge.
+        *
+        * @param cookies A sequence of bridge cookies that are associated with the bridge.
         */
-       void sessionsRemoved(Bridge* sessionBridge, SessionSeq sessions);
+       void sessionsRemoved(Bridge* sessionBridge, SessionSeq sessions, BridgeCookies cookies);
 
        /**
         * Called when a bridge has completed shutdown/destruction.
         *
         * @param sessionBridge The bridge that was stopped.
+        *
+        * @param cookies A sequence of bridge cookies that are associated with the bridge.
         */
-       void stopped(Bridge* sessionBridge);
+       void stopped(Bridge* sessionBridge, BridgeCookies cookies);
 
        /**
         * Called when a bridge has started shutdown/destruction operations.
         *
         * @param sessionBrdige The bridge that is stopping.
+        *
+        * @param cookies A sequence of bridge cookies that are associated with the bridge.
         */
-       void stopping(Bridge* sessionBridge);
+       void stopping(Bridge* sessionBridge, BridgeCookies cookies);
     };
 
     /**

commit 57ab22659d7829b6b4ef6c4e966beab848273282
Author: Mark Michelson <mmichelson at digium.com>
Date:   Fri Jul 15 13:23:36 2011 -0500

    Change the "decorator" hook to a "session creation" hook.

diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
index c20e031..9455692 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
@@ -32,56 +32,51 @@ module ExtensionPoints
 module V1
 {
     
-    const string SessionDecoratorLocatorCategory = "SessionDecorator";
+    const string SessionCreationHookLocatorCategory = "SessionDecorator";
 
-    interface SessionDecoratorHook
+    class SessionCreationHookData
+    {
+        AsteriskSCF::SessionCommunications::V1::Session *session;
+        AsteriskSCF::SessionCommunications::V1::SessionListenerSeq listeners;
+    };
+
+    interface SessionCreationHook
     {
         /**
-         * Decorate a Session.
+         * Hook into session creation.
          * 
          * This method is called by a session gateway at the time a new
          * session is created. The session gateway provides a proxy to the
-         * session it just created. In return, this method provides a proxy
-         * (presumably) to a decorator.
-         *
-         * The session gateway will store this proxy to the decorator and provide
-         * it to all external entities that request a proxy to the session. This way,
-         * the decorator can intercept all commands to the session, thereby allowing
-         * for customization beyond what the session gateway would do on its own.
+         * session it just created. In return, this method provides information
+         * to replace or augment the original data.
          *
-         * In addition, the session provides to the decorator all session listeners
-         * currently on the session. The decorator will store this session on itself
-         * and provide in return a different listener proxy for the session to use
-         * for all session listener operations.
+         * For instance, this method may replace the session proxy with a decorator
+         * session proxy so that all session methods may be hooked into. The hook may
+         * instead modify the session by adding or removing cookies.
          *
-         * @param realSession A proxy to the session created by the session gateway
-         * @param realListeners The session listeners currently set for the session
-         * @param[out] decorator The proxy to the decorator created by the hook
-         * @param[out] decoratorListener The proxy to the decorator listener created by the hook
+         * @param originalData Data that the session gateway has for the session
+         * @param[out] replacementData Modified data for the session
          * @return A HookResult indicating whether the hook was successful
          */
-        AsteriskSCF::System::Hook::V1::HookResult decorateSession(AsteriskSCF::SessionCommunications::V1::Session* realSession,
-                AsteriskSCF::SessionCommunications::V1::SessionListenerSeq realListeners,
-                out AsteriskSCF::SessionCommunications::V1::Session* decorator,
-                out AsteriskSCF::SessionCommunications::V1::SessionListener* decoratorListener);
+        AsteriskSCF::System::Hook::V1::HookResult decorateSession(SessionCreationHookData originalData, out SessionCreationHookData replacementData);
     };
 
-    sequence<SessionDecoratorHook*> SessionDecoratorHookSeq;
+    sequence<SessionCreationHook*> SessionCreationHookSeq;
 
-    interface SessionDecoratorExtensionPoint
+    interface SessionCreationExtensionPoint
     {
         /**
          * Add a new session decorator hook
          */
-        void addDecorator(SessionDecoratorHook* hook);
+        void addSessionCreationHook(SessionCreationHook* hook);
         /**
          * Remove a session decorator hook
          */
-        void removeDecorator(SessionDecoratorHook* hook);
+        void removeSessionCreationHook(SessionCreationHook* hook);
         /**
          * Remove all session decorator hooks
          */
-        void clearDecorators();
+        void clearSessionCreationHooks();
     };
 
 }; /* End of module V1 */

commit 0826cb24a021ca60e1026932a14f7dbd6a55da09
Merge: 2961fe4 1672cd3
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Jul 13 11:09:41 2011 -0500

    Merge branch 'master' into session-decorator


commit 2961fe4437f85e17d62cecf3cd207ad01d5a4ceb
Merge: 7e8760d 3a25fc4
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Jul 12 17:54:44 2011 -0500

    Merge branch 'master' into session-decorator


commit 7e8760dd3d7de497fedadf3589c3debd03d35d9d
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Jul 12 17:53:58 2011 -0500

    Make adjustments suggested by Kevin on CR-ASTSCF-115.
    
    Add a listener sequence and listener output paramater to the hook.

diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
index 2b88216..c20e031 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
@@ -49,11 +49,21 @@ module V1
          * the decorator can intercept all commands to the session, thereby allowing
          * for customization beyond what the session gateway would do on its own.
          *
+         * In addition, the session provides to the decorator all session listeners
+         * currently on the session. The decorator will store this session on itself
+         * and provide in return a different listener proxy for the session to use
+         * for all session listener operations.
+         *
          * @param realSession A proxy to the session created by the session gateway
+         * @param realListeners The session listeners currently set for the session
          * @param[out] decorator The proxy to the decorator created by the hook
+         * @param[out] decoratorListener The proxy to the decorator listener created by the hook
          * @return A HookResult indicating whether the hook was successful
          */
-        AsteriskSCF::System::Hook::V1::HookResult decorateSession(AsteriskSCF::SessionCommunications::V1::Session* realSession, out AsteriskSCF::SessionCommunications::V1::Session* decorator);
+        AsteriskSCF::System::Hook::V1::HookResult decorateSession(AsteriskSCF::SessionCommunications::V1::Session* realSession,
+                AsteriskSCF::SessionCommunications::V1::SessionListenerSeq realListeners,
+                out AsteriskSCF::SessionCommunications::V1::Session* decorator,
+                out AsteriskSCF::SessionCommunications::V1::SessionListener* decoratorListener);
     };
 
     sequence<SessionDecoratorHook*> SessionDecoratorHookSeq;
diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 7edc171..467a0c4 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -308,6 +308,8 @@ module V1
         void indicated(Session* source, Indication event, SessionCookies cookies);
     };
 
+    sequence<SessionListener*> SessionListenerSeq;
+
     /**
      * Exception used to indicate that a session is not currently in any bridge.
      */

commit 3e3468a598e3dae4fd3047bc95b83d411432e6ca
Author: Mark Michelson <mmichelson at digium.com>
Date:   Wed Jul 6 14:04:14 2011 -0500

    Add documentation for session decorator as suggested in CR-ASTSCF-115.

diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
index 6fccbde..2b88216 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
@@ -1,7 +1,7 @@
 /*
  * Asterisk SCF -- An open-source communications framework.
  *
- * Copyright (C) 2010, Digium, Inc.
+ * Copyright (C) 2011, Digium, Inc.
  *
  * See http://www.asterisk.org for more information about
  * the Asterisk SCF project. Please do not directly contact
@@ -36,6 +36,23 @@ module V1
 
     interface SessionDecoratorHook
     {
+        /**
+         * Decorate a Session.
+         * 
+         * This method is called by a session gateway at the time a new
+         * session is created. The session gateway provides a proxy to the
+         * session it just created. In return, this method provides a proxy
+         * (presumably) to a decorator.
+         *
+         * The session gateway will store this proxy to the decorator and provide
+         * it to all external entities that request a proxy to the session. This way,
+         * the decorator can intercept all commands to the session, thereby allowing
+         * for customization beyond what the session gateway would do on its own.
+         *
+         * @param realSession A proxy to the session created by the session gateway
+         * @param[out] decorator The proxy to the decorator created by the hook
+         * @return A HookResult indicating whether the hook was successful
+         */
         AsteriskSCF::System::Hook::V1::HookResult decorateSession(AsteriskSCF::SessionCommunications::V1::Session* realSession, out AsteriskSCF::SessionCommunications::V1::Session* decorator);
     };
 
@@ -43,8 +60,17 @@ module V1
 
     interface SessionDecoratorExtensionPoint
     {
+        /**
+         * Add a new session decorator hook
+         */
         void addDecorator(SessionDecoratorHook* hook);
+        /**
+         * Remove a session decorator hook
+         */
         void removeDecorator(SessionDecoratorHook* hook);
+        /**
+         * Remove all session decorator hooks
+         */
         void clearDecorators();
     };
 

commit f1a8af8d8e9ffc51c67e011440147fe7e56f9c10
Author: Mark Michelson <mmichelson at digium.com>
Date:   Tue Jun 28 17:59:16 2011 -0500

    Add slice for session decorators.

diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
new file mode 100644
index 0000000..6fccbde
--- /dev/null
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
@@ -0,0 +1,54 @@
+/*
+ * Asterisk SCF -- An open-source communications framework.
+ *
+ * Copyright (C) 2010, 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 <AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice>
+#include <AsteriskSCF/System/Hook/HookIf.ice>
+
+module AsteriskSCF
+{
+
+module SessionCommunications
+{
+
+module ExtensionPoints
+{
+
+["suppress"]
+module V1
+{
+    
+    const string SessionDecoratorLocatorCategory = "SessionDecorator";
+
+    interface SessionDecoratorHook
+    {
+        AsteriskSCF::System::Hook::V1::HookResult decorateSession(AsteriskSCF::SessionCommunications::V1::Session* realSession, out AsteriskSCF::SessionCommunications::V1::Session* decorator);
+    };
+
+    sequence<SessionDecoratorHook*> SessionDecoratorHookSeq;
+
+    interface SessionDecoratorExtensionPoint
+    {
+        void addDecorator(SessionDecoratorHook* hook);
+        void removeDecorator(SessionDecoratorHook* hook);
+        void clearDecorators();
+    };
+
+}; /* End of module V1 */
+}; /* End of module ExtensionPoints */
+}; /* End of module SessionCommunications */
+}; /* End of module AsteriskSCF */

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


-- 
asterisk-scf/release/slice.git



More information about the asterisk-scf-commits mailing list