[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 15:56:37 CDT 2011
branch "master" has been updated
via 0e0fe974f7a7dd7334086130c66a69fe4b94fa69 (commit)
via c84291bee35dfbedfd168ba7ec05a9359f7138f2 (commit)
via 4141894df15013891636c53d85259b2990b1f9df (commit)
via 3106bf50bdeb121c64f91629a0a0d97e8f2b5178 (commit)
via f7cf79616da10d9a930bde78671c374746d85f00 (commit)
from 05556bf8836d212589eebf250ff253f86a1c52da (commit)
Summary of changes:
.../SessionCommunicationsExtensionPointsIf.ice | 85 ++++++++++++++++++++
.../SessionCommunicationsIf.ice | 2 +
2 files changed, 87 insertions(+), 0 deletions(-)
create mode 100644 slice/AsteriskSCF/SessionCommunications/SessionCommunicationsExtensionPointsIf.ice
- Log -----------------------------------------------------------------
commit 0e0fe974f7a7dd7334086130c66a69fe4b94fa69
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 c84291bee35dfbedfd168ba7ec05a9359f7138f2
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 4141894df15013891636c53d85259b2990b1f9df
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 3ad3bc3..8131772 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 3106bf50bdeb121c64f91629a0a0d97e8f2b5178
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 f7cf79616da10d9a930bde78671c374746d85f00
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