[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
Tue Jun 21 15:02:23 CDT 2011
branch "master" has been updated
via 5bde5f1c7c787eb41293f1e14a69290a2bb1058a (commit)
from 7d3ebe303cee764b2ce58a7499d6dbf9e2dd04e6 (commit)
Summary of changes:
.../SessionCommunicationsIf.ice | 75 +++++++++++++++++++-
1 files changed, 74 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 5bde5f1c7c787eb41293f1e14a69290a2bb1058a
Author: Joshua Colp <jcolp at digium.com>
Date: Tue Jun 21 17:01:14 2011 -0300
Merge session cookies support.
diff --git a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 7d53e82..7edc171 100644
--- a/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/slice/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -114,6 +114,19 @@ module V1
};
/**
+ * Generic base class for 'cookies', opaque data items that can be
+ * stored on a Session and retrieved via the SessionListener
+ * interface when events occur on that Session.
+ *
+ * @see SessionListener
+ *
+ * @see SessionCookies
+ */
+ ["preserved"] class SessionCookie
+ {
+ };
+
+ /**
* Indication visitor class.
*/
["visitor"] local class IndicationVisitor
@@ -182,6 +195,19 @@ module V1
};
/**
+ * A sequence of cookies, allowing for a variable number of them
+ * to be passed in a single operation or event.
+ *
+ * @see SessionListener
+ */
+ sequence <SessionCookie> SessionCookies;
+
+ /**
+ * A dictionary of cookies, used for storing them.
+ */
+ dictionary<string, SessionCookie> SessionCookieDict;
+
+ /**
* Indication that a session has completed.
*/
unsliceable class StoppedIndication extends TelephonyIndication
@@ -252,9 +278,17 @@ module V1
* Session object then calls the SessionListener methods to notify
* listeners of changes as they occur.
*
+ * SessionListener objects can also store and retrieve 'cookies'; these
+ * are data items in the form of concrete objects of types derived from
+ * SessionCookie. The session manager will store and return these items
+ * in an opaque fashion, allowing a listener to store as much data, of
+ * any type it wishes, on a Session.
+ *
* A SessionListener object may be registered with multiple sessions.
*
* @see Session
+ *
+ * @see SessionCookies
*/
interface SessionListener
{
@@ -264,12 +298,14 @@ module V1
* @param source The session the event occurred on.
*
* @param event The indication event that has occurred.
+ *
+ * @param cookies Any cookies present on the session.
*
* @see Session
*
* @see Indication
*/
- void indicated(Session* source, Indication event);
+ void indicated(Session* source, Indication event, SessionCookies cookies);
};
/**
@@ -302,6 +338,43 @@ module V1
*/
["amd"] SessionInfo addListener(SessionListener* listener);
+ /**
+ * Set (or replace) cookies on the session.
+ *
+ * @param cookies A sequence of one or more concrete objects,
+ * each of which are of a type derived from SessionCookie.
+ * The session manager will store these cookies on the
+ * session, replacing any existing cookies with matching
+ * types.
+ *
+ * @note There can only be one cookie of a given type associated
+ * with a session.
+ **/
+ void setCookies(SessionCookies cookies);
+
+ /**
+ * Remove cookies from the session.
+ *
+ * @param cookies A sequence of one or more concrete objects,
+ * each of which are of a type derived from SessionCookie.
+ * The session manager will remove any cookies on the session
+ * with types that match the ones in this sequence; the
+ * content of the supplied cookies is not compared.
+ **/
+ void removeCookies(SessionCookies cookies);
+
+ /**
+ * Get cookies stored on the session.
+ *
+ * @param cookieTypes A sequence of zero or more concrete objects,
+ * each of which are of a type derived from SessionCookie.
+ *
+ * @return A sequence of zero or more cookies from the session,
+ * with types that match the types of the template cookies
+ * provided in the cookieTypes parameter.
+ **/
+ SessionCookies getCookies(SessionCookies cookieTypes);
+
/**
* Request that an indication be performed on a session.
*
-----------------------------------------------------------------------
--
asterisk-scf/release/slice.git
More information about the asterisk-scf-commits
mailing list