[asterisk-scf-commits] asterisk-scf/integration/slice.git branch "rtcp" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Jul 22 20:19:25 CDT 2011


branch "rtcp" has been updated
       via  9b24d1a67781e29ad73585c966f54e1711f277b4 (commit)
       via  2a5f1d82e3de4464cfd6804e44e4f897919238ec (commit)
       via  57a4c6202d356e944d6ed630fb4da5e9ef6e0ad2 (commit)
       via  9b253f6413361a6f9856e37196cf1159a4ba54ff (commit)
       via  eab1888ebc6c01463d045ec31125be608e1dd8dd (commit)
       via  feef14224dc27656a857e94d8d12da3950d9e4b2 (commit)
       via  9edb08a626fbb57b8584a1b7d438e5d4ef128e71 (commit)
       via  a56480967f353ad72ac0750646e4e3a4486ce691 (commit)
       via  a47ca502ce1e6dca6833bb2914fa29e0afa77384 (commit)
       via  687d842f88cb5302f05190d5fcb16d84b97e020b (commit)
       via  d431a9f19268bdf772acc6960c3acc4ed67697b7 (commit)
       via  1b09086bfce57fab13b27c3018791a56311f8943 (commit)
       via  7eb5ee6acbcc2abec8590f15efde23cc62f097c6 (commit)
       via  f7676e99cd267657e65a233b0b07b0b225e3b8ba (commit)
       via  e5cd7118d887096e0fbaef25d433a5be7a8e2341 (commit)
       via  01f50ffc657af8c961be5461b02663d9473c7e66 (commit)
       via  bb0fe22eb27c0744b020e7d7b74a589261eb528e (commit)
       via  05e245ef7614b5f2ab3b2dfadd2ad1aa100952c9 (commit)
       via  4af55933ca352d394f061566fabdb17fe1819fe9 (commit)
       via  78fea14a3de0b2e0f044bb8ee286a6f0b054fcd0 (commit)
       via  131f6d92c009e34dc41b79b076200876883cc34b (commit)
       via  ae69d3aad2b90b621d89de835fe8788dc1fe979b (commit)
       via  8508ac568a89f2c64c1bdbd26e200ec5c79b94d3 (commit)
       via  6c301dcd45e664fa3b31e981d1ec4f7889aa5559 (commit)
       via  c839c3e76d6b3f1a96bd93126c071bbd672c3381 (commit)
       via  ef35c13e7a97a4d7051c057d56ba7af8eb4e0019 (commit)
       via  e2b00970bce930cf3cafe5203aa459ddd1af308f (commit)
       via  8766c305ac188e3d7b196a420cb6f0a9ffb6e4d0 (commit)
       via  96d0ce2307bc2794b25b7b086ad7bcbf4c1b354a (commit)
       via  68a428ba5f794eddc7c2ba326744f03d7dd96ce8 (commit)
       via  fb8079142c870dc2c2bd349809b496bf2411dde8 (commit)
       via  c35b6ff1ebd767530b6ce828a936bc0209aa893a (commit)
       via  fd9831065fa9e9799c7a6c200f0008ef50d76d22 (commit)
       via  f084072d6396bb52b4b64acd597256831134e2ff (commit)
       via  e55bece85f5d718f63408af612301cc330275d96 (commit)
      from  1e08eda3915aef7df4d167b1857f988de0d0a8ce (commit)

Summary of changes:
 .../SessionCommunicationsIf.ice                    |   82 ++++++++++++++++++++
 1 files changed, 82 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 9b24d1a67781e29ad73585c966f54e1711f277b4
Merge: 2a5f1d8 57a4c62
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Jul 12 08:41:28 2011 -0300

    Merge branch 'sessioncontroller' into rtcp


commit 2a5f1d82e3de4464cfd6804e44e4f897919238ec
Merge: 1e08eda 78fea14
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Jul 12 08:41:17 2011 -0300

    Merge branch 'session_cookies' into rtcp


commit 78fea14a3de0b2e0f044bb8ee286a6f0b054fcd0
Merge: 68a428b 00b74e2
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Jun 21 16:02:14 2011 -0300

    Merge branch 'master' into session_cookies
    
    Conflicts:
    	AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice

diff --cc AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index 263d5d7,7d53e82..7edc171
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@@ -322,59 -286,22 +322,59 @@@ module V
       */
      interface Session
      {
- 	/**
- 	 * Registers an instance of SessionListener with the current
- 	 * session.
- 	 *
- 	 * @param listener An instance of a SessionListener object.
- 	 *
- 	 * @return A SessionInfo object containing the current state of the session.
- 	 *       This allows "listeners" to be configured with a some initial state
- 	 *       to give context to future notifications.
- 	 *
- 	 * @see SessionListener
- 	 *
- 	 * @see SessionInfo
- 	 */
- 	SessionInfo addListener(SessionListener* listener);
+         /**
+          * Registers an instance of SessionListener with the current
+          * session.
+          *
+          * @param listener an instance of a SessionListener object.
+          *
+          * @return a SessionInfo object containing the current state of the session.
+          *       This allows "listeners" to be configured with a some initial state
+          *       to give context to future notifications.
+          *
+          * @see SessionListener
+          *
+          * @see SessionInfo
+          */
+         ["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.
           *

commit 68a428ba5f794eddc7c2ba326744f03d7dd96ce8
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Apr 26 14:11:39 2011 -0300

    Add missing dictionary.

diff --git a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index cf05472..263d5d7 100644
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -203,6 +203,11 @@ module V1
     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

commit fb8079142c870dc2c2bd349809b496bf2411dde8
Merge: c35b6ff 9f9d503
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Apr 26 13:46:26 2011 -0300

    Merge remote branch 'origin/master' into session_cookies
    
    Conflicts:
    	AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice

diff --cc AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index b9b68c2,b8e4d4c..cf05472
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@@ -111,27 -114,138 +114,159 @@@ module V
      };
  
      /**
 +     * 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
+ 		{
+     };
+ 
+     /**
+      * Basic indication class. Meant to be extended.
+      */
+     ["visitor:IndicationVisitor"] unsliceable class Indication
+ 				  {
+     };
+ 
+     /**
+      * Telephony specific indication class. Useful if a consumer only cares
+      * about telephony specific indications.
+      */
+     unsliceable class TelephonyIndication extends Indication
+     {
+     };
+ 
+     /**
+      * Basic indication exception class. Meant to be extended.
+      */
+     unsliceable exception IndicationException
+     {
+     };
+ 
+     /**
+      * Indication that a session has reached a known connected state.
+      */
+     unsliceable class ConnectedIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a "flash" event has occurred on a session.
+      */
+     unsliceable class FlashedIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a session has entered a "held" state.
+      */
+     unsliceable class HeldIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a session is in a transitional state.
+      */
+     unsliceable class ProgressingIndication extends TelephonyIndication
+     {
+         /**
+          * Response code identifying the details of the ongoing progress.
+          */
+         ResponseCode response;
+     };
+ 
+     /**
+      * Indication that a "ring" event has occurred on a session.
+      */
+     unsliceable class RingingIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
 +     * 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;
 +
 +    /**
+      * Indication that a session has completed.
+      */
+     unsliceable class StoppedIndication extends TelephonyIndication
+     {
+         /**
+          * Response code identifying the details of why the session stopped.
+          */
+         ResponseCode response;
+     };
+ 
+     /**
+      * Indication that a session has left the "held" state.
+      */
+     unsliceable class UnheldIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a connect message should be sent on the session.
+      */
+     unsliceable class ConnectIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a flash message should be sent on the session.
+      */
+     unsliceable class FlashIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a hold message should be sent on the session.
+      */
+     unsliceable class HoldIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that an unhold message should be sent on the session.
+      */
+     unsliceable class UnholdIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a ring message should be sent on the session.
+      */
+     unsliceable class RingIndication extends TelephonyIndication
+     {
+     };
+ 
+     /**
+      * Indication that a progress message should be sent on the session.
+      */
+     unsliceable class ProgressIndication extends TelephonyIndication
+     {
+         /**
+          * Response code detailing the current progress.
+          */
+         ResponseCode response;
+     };
+ 
+     /**
       * Instances of SessionListener are used for monitoring changes in one or
       * more sessions. Session objects have an addListener method that allows
       * SessionListener objects to be registered with a given session. The
@@@ -152,72 -258,18 +287,20 @@@
       */
      interface SessionListener
      {
- 	/**
- 	 * Notification that a session has reached a known connected state.
- 	 *
- 	 * @param source The session the event occurred on.
- 	 *
- 	 * @param cookies Any cookies present on the session. which have types
- 	 */
- 	void connected(Session* source, SessionCookies cookies);
- 
- 	/**
- 	 * Notification that a "flash" has occurred on a session.
- 	 *
- 	 * @param source The session the event occurred on.
- 	 *
- 	 * @param cookies Any cookies present on the session.
- 	 */
- 	void flashed(Session* source, SessionCookies cookies);
- 
- 	/**
- 	 * Notification that a session has entered a "held" state.
- 	 *
- 	 * @param source The session the event occurred on.
- 	 *
- 	 * @param cookies Any cookies present on the session.
- 	 */
- 	void held(Session* source, SessionCookies cookies);
- 
- 	/**
- 	 * Notification that a session is in a transitional state.
- 	 *
- 	 * @param source The session the event occurred on.
- 	 *
- 	 * @param cookies Any cookies present on the session.
- 	 *
- 	 * @param response An code indentifying the details of the ongoing progress.
- 	 */
- 	void progressing(Session* source, SessionCookies cookies, ResponseCode response);
- 
- 	/**
- 	 * Notification that a ring "event" has occurred.
- 	 *
- 	 * @param source The session the event occurred on.
- 	 *
- 	 * @param cookies Any cookies present on the session.
- 	 */
- 	void ringing(Session* source, SessionCookies cookies);
- 
- 	/**
- 	 * Notification that a session has completed.
- 	 *
- 	 * @param source The session the event occurred on.
- 	 *
- 	 * @param cookies Any cookies present on the session.
- 	 *
- 	 * @param response An code describing the why the session stopped.
- 	 */
- 	void stopped(Session* source, SessionCookies cookies, ResponseCode response);
- 
- 	/**
- 	 * Notification that a session has left the "held" state.
- 	 *
- 	 * @param source The session the event occurred on.
+         /**
+          * Notification that some indication event has occurred on the session.
+          *
+          * @param source The session the event occurred on.
+          *
+          * @param event The indication event that has occurred.
 +	 *
 +	 * @param cookies Any cookies present on the session.
- 	 */
- 	void unheld(Session* source, SessionCookies cookies);
+          *
+          * @see Session
+          *
+          * @see Indication
+          */
 -        void indicated(Session* source, Indication event);
++        void indicated(Session* source, Indication event, SessionCookies cookies);
      };
  
      /**
@@@ -250,52 -302,18 +333,55 @@@
  	 */
  	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);
 +
- 	/**
- 	 * Method which requests that the session send a connect message.
- 	 */
- 	void connect();
- 
- 	/**
- 	 * Method which requests that the session send a flash message.
- 	 */
- 	void flash();
+         /**
+          * Request that an indication be performed on a session.
+          *
+          * @param event The indication event to perform.
+          *
+          * @throws IndicationException if an error occurs.
+          *
+          * @see Indication
+          *
+          * @see IndicationException
+          */
+         void indicate(Indication event) throws IndicationException;
  
  	/**
  	 * Method which retrieves a proxy to the endpoint object that created the current session.

commit c35b6ff1ebd767530b6ce828a936bc0209aa893a
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Tue Dec 7 10:52:33 2010 -0600

    Remove 'interest management' by session manager.
    
    Based on discussions on CR-ASTSCF-13, it was decided that it wasn't
    appropriate (or efficient) for the session manager to have to track
    which cookie types each listener wants to receive. This commit
    simplifies the interfaces a bit by removing the cookie templates;
    now the session manager will send the entire list of cookies stored
    on the session to each listener when an event occurs.

diff --git a/SessionCommunications/SessionCommunicationsIf.ice b/SessionCommunications/SessionCommunicationsIf.ice
index 49aa661..b9b68c2 100644
--- a/SessionCommunications/SessionCommunicationsIf.ice
+++ b/SessionCommunications/SessionCommunicationsIf.ice
@@ -157,9 +157,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session. which have types
 	 */
 	void connected(Session* source, SessionCookies cookies);
 
@@ -168,9 +166,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session.
 	 */
 	void flashed(Session* source, SessionCookies cookies);
 
@@ -179,9 +175,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session.
 	 */
 	void held(Session* source, SessionCookies cookies);
 
@@ -190,9 +184,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session.
 	 *
 	 * @param response An code indentifying the details of the ongoing progress.
 	 */
@@ -203,9 +195,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session.
 	 */
 	void ringing(Session* source, SessionCookies cookies);
 
@@ -214,9 +204,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session.
 	 *
 	 * @param response An code describing the why the session stopped.
 	 */
@@ -227,9 +215,7 @@ module V1
 	 *
 	 * @param source The session the event occurred on.
 	 *
-	 * @param cookies Any cookies present on the session which have types
-	 *        that match the template types the listener provided when it
-	 *        added itself to the session via the addListener() operation.
+	 * @param cookies Any cookies present on the session.
 	 */
 	void unheld(Session* source, SessionCookies cookies);
     };
@@ -254,18 +240,6 @@ module V1
 	 *
 	 * @param listener An instance of a SessionListener object.
 	 *
-	 * @param cookieTypes A sequence of zero or more concrete objects,
-	 *        each of which are of a type derived from SessionCookie.
-	 *        The session manager will store this sequence of cookies
-	 *        with the Session, so that it can use them as a template
-	 *        to know which types of cookies should be sent to this
-	 *        listener when events occur. Before invoking an operation
-	 *        on the listener itself, the session manager will make
-	 *        copies of all the cookies currently attached to the session
-	 *        whose types match (exactly) any template cookie provided
-	 *        in this sequence, and include them as a parameter to the
-	 *        operation invocation on the listener.
-	 *
 	 * @return A SessionInfo object containing the current state of the session.
 	 *       This allows "listeners" to be configured with a some initial state
 	 *       to give context to future notifications.
@@ -273,10 +247,8 @@ module V1
 	 * @see SessionListener
 	 *
 	 * @see SessionInfo
-	 *
-	 * @see SessionCookies
 	 */
-	SessionInfo addListener(SessionListener* listener, SessionCookies cookieTypes);
+	SessionInfo addListener(SessionListener* listener);
 
 	/**
 	 * Set (or replace) cookies on the session.
@@ -414,21 +386,9 @@ module V1
 	 *
 	 * @param listener A proxy to the Listener to add to the Session.
 	 *
-	 * @param cookieTypes A sequence of zero or more concrete objects,
-	 *        each of which are of a type derived from SessionCookie.
-	 *        The session manager will store this sequence of cookies
-	 *        with the Session, so that it can use them as a template
-	 *        to know which types of cookies should be sent to this
-	 *        listener when events occur. Before invoking an operation
-	 *        on the listener itself, the session manager will make
-	 *        copies of all the cookies currently attached to the session
-	 *        whose types match (exactly) any template cookie provided
-	 *        in this sequence, and include them as a parameter to the
-	 *        operation invocation on the listener.
-	 *
 	 * @return A current copy of the session information.
 	 */
-	SessionInfo setBridge(Bridge* newBridge, SessionListener* listener, SessionCookies cookieTypes);
+	SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
 
 	/**
 	 * Removes this Session from it's associated Bridge.
@@ -598,25 +558,11 @@ module V1
 	 *    newly created session. May be a nil reference if an initial listener is not
 	 *    required.
 	 *
-	 * @param cookieTypes A sequence of zero or more concrete objects,
-	 *        each of which are of a type derived from SessionCookie.
-	 *        The session manager will store this sequence of cookies
-	 *        with the Session, so that it can use them as a template
-	 *        to know which types of cookies should be sent to this
-	 *        listener when events occur. Before invoking an operation
-	 *        on the listener itself, the session manager will make
-	 *        copies of all the cookies currently attached to the session
-	 *        whose types match (exactly) any template cookie provided
-	 *        in this sequence, and include them as a parameter to the
-	 *        operation invocation on the listener.
-	 *
 	 * @return A newly created session object for the destination.
 	 *
 	 * @see SessionListener
-	 *
-	 * @see SessionCookies
 	 */
-	Session* createSession(string destination, SessionListener* listener, SessionCookies cookieTypes);
+	Session* createSession(string destination, SessionListener* listener);
 
 	/**
 	 * Returns the active sessions for this session endpoint.

commit fd9831065fa9e9799c7a6c200f0008ef50d76d22
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Dec 6 07:53:19 2010 -0600

    Add ability for session cookies to be removed.

diff --git a/SessionCommunications/SessionCommunicationsIf.ice b/SessionCommunications/SessionCommunicationsIf.ice
index 0280df3..49aa661 100644
--- a/SessionCommunications/SessionCommunicationsIf.ice
+++ b/SessionCommunications/SessionCommunicationsIf.ice
@@ -293,6 +293,17 @@ module V1
 	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,

commit f084072d6396bb52b4b64acd597256831134e2ff
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Mon Dec 6 07:53:01 2010 -0600

    Ensure that SessionCookie objects are slice-preserved.

diff --git a/SessionCommunications/SessionCommunicationsIf.ice b/SessionCommunications/SessionCommunicationsIf.ice
index 1a28758..0280df3 100644
--- a/SessionCommunications/SessionCommunicationsIf.ice
+++ b/SessionCommunications/SessionCommunicationsIf.ice
@@ -119,7 +119,7 @@ module V1
      *
      * @see SessionCookies
      */
-    class SessionCookie
+    ["preserved"] class SessionCookie
     {
     };
 

commit e55bece85f5d718f63408af612301cc330275d96
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Fri Dec 3 14:30:45 2010 -0600

    Initial design for SessionCookie support.

diff --git a/SessionCommunications/SessionCommunicationsIf.ice b/SessionCommunications/SessionCommunicationsIf.ice
index 92a7642..1a28758 100644
--- a/SessionCommunications/SessionCommunicationsIf.ice
+++ b/SessionCommunications/SessionCommunicationsIf.ice
@@ -111,15 +111,44 @@ 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
+     */
+    class SessionCookie
+    {
+    };
+
+    /**
+     * 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;
+
+    /**
      * Instances of SessionListener are used for monitoring changes in one or
      * more sessions. Session objects have an addListener method that allows
      * SessionListener objects to be registered with a given session. The
      * 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
     {
@@ -127,54 +156,82 @@ module V1
 	 * Notification that a session has reached a known connected state.
 	 *
 	 * @param source The session the event occurred on.
+	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
 	 */
-	void connected(Session* source);
+	void connected(Session* source, SessionCookies cookies);
 
 	/**
 	 * Notification that a "flash" has occurred on a session.
 	 *
 	 * @param source The session the event occurred on.
+	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
 	 */
-	void flashed(Session* source);
+	void flashed(Session* source, SessionCookies cookies);
 
 	/**
 	 * Notification that a session has entered a "held" state.
 	 *
 	 * @param source The session the event occurred on.
+	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
 	 */
-	void held(Session* source);
+	void held(Session* source, SessionCookies cookies);
 
 	/**
 	 * Notification that a session is in a transitional state.
 	 *
 	 * @param source The session the event occurred on.
 	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
+	 *
 	 * @param response An code indentifying the details of the ongoing progress.
 	 */
-	void progressing(Session* source, ResponseCode response);
+	void progressing(Session* source, SessionCookies cookies, ResponseCode response);
 
 	/**
 	 * Notification that a ring "event" has occurred.
 	 *
 	 * @param source The session the event occurred on.
+	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
 	 */
-	void ringing(Session* source);
+	void ringing(Session* source, SessionCookies cookies);
 
 	/**
 	 * Notification that a session has completed.
 	 *
 	 * @param source The session the event occurred on.
 	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
+	 *
 	 * @param response An code describing the why the session stopped.
 	 */
-	void stopped(Session* source, ResponseCode response);
+	void stopped(Session* source, SessionCookies cookies, ResponseCode response);
 
 	/**
 	 * Notification that a session has left the "held" state.
 	 *
 	 * @param source The session the event occurred on.
+	 *
+	 * @param cookies Any cookies present on the session which have types
+	 *        that match the template types the listener provided when it
+	 *        added itself to the session via the addListener() operation.
 	 */
-	void unheld(Session* source);
+	void unheld(Session* source, SessionCookies cookies);
     };
 
     /**
@@ -195,17 +252,57 @@ module V1
 	 * Registers an instance of SessionListener with the current
 	 * session.
 	 *
-	 * @param listener an instance of a SessionListener object.
-	 *
-	 * @return a SessionInfo object containing the current state of the session.
+	 * @param listener An instance of a SessionListener object.
+	 *
+	 * @param cookieTypes A sequence of zero or more concrete objects,
+	 *        each of which are of a type derived from SessionCookie.
+	 *        The session manager will store this sequence of cookies
+	 *        with the Session, so that it can use them as a template
+	 *        to know which types of cookies should be sent to this
+	 *        listener when events occur. Before invoking an operation
+	 *        on the listener itself, the session manager will make
+	 *        copies of all the cookies currently attached to the session
+	 *        whose types match (exactly) any template cookie provided
+	 *        in this sequence, and include them as a parameter to the
+	 *        operation invocation on the listener.
+	 *
+	 * @return A SessionInfo object containing the current state of the session.
 	 *       This allows "listeners" to be configured with a some initial state
 	 *       to give context to future notifications.
 	 *
 	 * @see SessionListener
 	 *
 	 * @see SessionInfo
+	 *
+	 * @see SessionCookies
 	 */
-	SessionInfo addListener(SessionListener* listener);
+	SessionInfo addListener(SessionListener* listener, SessionCookies cookieTypes);
+
+	/**
+	 * 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);
+
+	/**
+	 * 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);
 
 	/**
 	 * Method which requests that the session send a connect message.
@@ -306,9 +403,21 @@ module V1
 	 *
 	 * @param listener A proxy to the Listener to add to the Session.
 	 *
+	 * @param cookieTypes A sequence of zero or more concrete objects,
+	 *        each of which are of a type derived from SessionCookie.
+	 *        The session manager will store this sequence of cookies
+	 *        with the Session, so that it can use them as a template
+	 *        to know which types of cookies should be sent to this
+	 *        listener when events occur. Before invoking an operation
+	 *        on the listener itself, the session manager will make
+	 *        copies of all the cookies currently attached to the session
+	 *        whose types match (exactly) any template cookie provided
+	 *        in this sequence, and include them as a parameter to the
+	 *        operation invocation on the listener.
+	 *
 	 * @return A current copy of the session information.
 	 */
-	SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
+	SessionInfo setBridge(Bridge* newBridge, SessionListener* listener, SessionCookies cookieTypes);
 
 	/**
 	 * Removes this Session from it's associated Bridge.
@@ -474,14 +583,29 @@ module V1
 	 *
 	 * @param destination A stringified identifier or address for the destination.
 	 *
-	 * @param callback A SessionListener object to be registered as a listener on the
+	 * @param listener A SessionListener object to be registered as a listener on the
 	 *    newly created session. May be a nil reference if an initial listener is not
 	 *    required.
 	 *
+	 * @param cookieTypes A sequence of zero or more concrete objects,
+	 *        each of which are of a type derived from SessionCookie.
+	 *        The session manager will store this sequence of cookies
+	 *        with the Session, so that it can use them as a template
+	 *        to know which types of cookies should be sent to this
+	 *        listener when events occur. Before invoking an operation
+	 *        on the listener itself, the session manager will make
+	 *        copies of all the cookies currently attached to the session
+	 *        whose types match (exactly) any template cookie provided
+	 *        in this sequence, and include them as a parameter to the
+	 *        operation invocation on the listener.
+	 *
 	 * @return A newly created session object for the destination.
 	 *
+	 * @see SessionListener
+	 *
+	 * @see SessionCookies
 	 */
-	Session* createSession(string destination, SessionListener* callback);
+	Session* createSession(string destination, SessionListener* listener, SessionCookies cookieTypes);
 
 	/**
 	 * Returns the active sessions for this session endpoint.

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


-- 
asterisk-scf/integration/slice.git



More information about the asterisk-scf-commits mailing list