[asterisk-commits] mmichelson: branch group/CCSS r214270 - in /team/group/CCSS: include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 26 16:09:14 CDT 2009


Author: mmichelson
Date: Wed Aug 26 16:09:11 2009
New Revision: 214270

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214270
Log:
Create stubs for generic agent callbacks.


Modified:
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=214270&r1=214269&r2=214270
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Wed Aug 26 16:09:11 2009
@@ -566,6 +566,13 @@
 
 struct ast_cc_agent_callbacks {
 	/*!
+	 * \brief Type of agent the callbacks belong to.
+	 * 
+	 * Identical to the type field of the corresponding
+	 * ast_cc_agent
+	 */
+	const char *type;
+	/*!
 	 * \brief Initialization callback.
 	 * 
 	 * This callback is called when the CC core
@@ -591,7 +598,7 @@
 	 * this callback is called through the public
 	 * ast_cc_agent_status_request function.
 	 */
-	enum ast_device_state (*status_request)(void *data);
+	enum ast_device_state (*status_request)(struct ast_cc_agent *agent);
 	/*!
 	 * \brief Initiate the recall to the agent's device
 	 *

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=214270&r1=214269&r2=214270
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Wed Aug 26 16:09:11 2009
@@ -547,6 +547,42 @@
 	return 0;
 }
 
+static void *cc_generic_agent_init(struct ast_cc_agent *agent, struct ast_channel *chan)
+{
+	/* STUB */
+	return NULL;
+}
+
+static void cc_generic_agent_ack(struct ast_cc_agent *agent)
+{
+	/* STUB */
+	return;
+}
+
+static enum ast_device_state cc_generic_agent_status_request(struct ast_cc_agent *agent)
+{
+	/* STUB */
+	return 0;
+}
+
+static int cc_generic_agent_recall(struct ast_cc_agent *agent)
+{
+	return 0;
+}
+
+static void cc_generic_agent_destructor(struct ast_cc_agent *agent)
+{
+	return;
+}
+
+static struct ast_cc_agent_callbacks generic_agent_callbacks = {
+	.init = cc_generic_agent_init,
+	.ack = cc_generic_agent_ack,
+	.status_request = cc_generic_agent_status_request,
+	.recall = cc_generic_agent_recall,
+	.destructor = cc_generic_agent_destructor,
+};
+
 int ast_cc_init(void)
 {
 	if (!(pending_cc_offers = ao2_container_alloc(CC_PENDING_OFFER_BUCKETS,




More information about the asterisk-commits mailing list