[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "session-decorator" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Jul 15 13:52:44 CDT 2011
branch "session-decorator" has been updated
via 57ab22659d7829b6b4ef6c4e966beab848273282 (commit)
via 0826cb24a021ca60e1026932a14f7dbd6a55da09 (commit)
via 1672cd37f8e1dbb9d2e8627387839939a95d9c43 (commit)
from 2961fe4437f85e17d62cecf3cd207ad01d5a4ceb (commit)
Summary of changes:
slice/AsteriskSCF/Media/MediaIf.ice | 2 +-
.../SessionCommunicationsExtensionPointsIf.ice | 49 +++++++++-----------
2 files changed, 23 insertions(+), 28 deletions(-)
- Log -----------------------------------------------------------------
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 1672cd37f8e1dbb9d2e8627387839939a95d9c43
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Jul 13 11:08:04 2011 -0500
Disable FormatVisitor usage.
Until we determine how we want to handle AudioFormat object visitation,
disable the FormatVisitor from being used.
diff --git a/slice/AsteriskSCF/Media/MediaIf.ice b/slice/AsteriskSCF/Media/MediaIf.ice
index 456064d..b02a21b 100644
--- a/slice/AsteriskSCF/Media/MediaIf.ice
+++ b/slice/AsteriskSCF/Media/MediaIf.ice
@@ -366,7 +366,7 @@ module V1
* A generic format class that provides common information about formats. Additional classes should extend
* this to provide additional details about their format.
*/
- ["visitor:FormatVisitor"] class Format
+ class Format
{
/**
* A string containing a name for the format, this should be unique to the specifications of the format
-----------------------------------------------------------------------
--
asterisk-scf/integration/slice.git
More information about the asterisk-scf-commits
mailing list