[asterisk-commits] mmichelson: branch group/CCSS r229971 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 13 11:28:57 CST 2009


Author: mmichelson
Date: Fri Nov 13 11:28:54 2009
New Revision: 229971

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229971
Log:
Define sip_epa_entry and cc_epa_entry


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=229971&r1=229970&r2=229971
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Fri Nov 13 11:28:54 2009
@@ -1651,6 +1651,11 @@
 
 const int EPA_MAX_BUCKETS = 37;
 
+enum sip_cc_publish_state {
+	CC_CLOSED,
+	CC_OPEN,
+};
+
 struct sip_epa_callbacks {
 	/*XXX STUB */
 };
@@ -1666,6 +1671,46 @@
 	/*XXX STUB*/
 	return 0;
 }
+
+struct cc_epa_entry {
+	/* The core ID of the CC transaction
+     * for which this EPA entry belongs. This
+     * essentially acts as a unique identifier
+     * for the entry and is used in the hash
+     * and comparison functions
+     */
+	int core_id;
+	/* We keep the last known state of the
+     * device in question handy in case
+     * it needs to be known by a third party.
+     * Also, in the case where for some reason
+     * we get asked to transmit state that we
+     * already sent, we can just ignore the
+     * request.
+     */
+   	enum sip_cc_publish_state current_state;
+};
+
+struct sip_epa_entry {
+	/* When we send a PUBLISH, we have to be
+   	 * sure to include the entity tag that we
+   	 * received in the previous response.
+   	 */
+	char entity_tag[30];
+	/* The event package to which this
+   	 * entry belongs.
+   	 */
+	const char *event;
+	/* Each event package will have data
+   	 * that pertains only to that event package
+   	 * and doesn't make sense to other event
+   	 * types. It is likely that the hash function
+   	 * and comparison function for a specific EPA
+   	 * will use event specific data
+   	 */
+	void *event_specific_data;
+};
+
 
 static struct event_publication_agent {
 	enum subscriptiontype event;
@@ -1758,11 +1803,6 @@
 	void *event_specific_data;
 };
 
-enum sip_cc_state {
-	CC_CLOSED,
-	CC_OPEN,
-};
-
 /*!
  * \brief Data specific to CC ESC entries.
  *
@@ -1774,7 +1814,7 @@
 	 * The current state of the device from which
 	 * we have received a PUBLISH.
 	 */
-	enum sip_cc_state current_state;
+	enum sip_cc_publish_state current_state;
 	/*!
 	 * The core_id to which this particular ESC entry
 	 * pertains. We can determine this information using




More information about the asterisk-commits mailing list