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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 5 11:20:29 CST 2009


Author: mmichelson
Date: Thu Nov  5 11:20:26 2009
New Revision: 228028

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=228028
Log:
Add the word "agent" and "monitor" to some functions.

The purpose is to indicate which entity is expected to call
the function.


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

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=228028&r1=228027&r2=228028
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Thu Nov  5 11:20:26 2009
@@ -877,7 +877,7 @@
  * \retval 0 Success
  * \retval -1 Failure
  */
-int ast_cc_accept_request(int core_id, const char * const debug);
+int ast_cc_agent_accept_request(int core_id, const char * const debug);
 
 /*!
  * \since 1.6.4
@@ -891,7 +891,7 @@
  * \retval 0 Success
  * \retval -1 Failure
  */
-int ast_cc_request_acknowledged(int core_id, const char * const debug);
+int ast_cc_monitor_request_acknowledged(int core_id, const char * const debug);
 
 /*!
  * \since 1.6.4
@@ -909,7 +909,7 @@
  * \retval 0 Success
  * \retval -1 Failure
  */
-int ast_cc_caller_busy(int core_id, const char * const debug);
+int ast_cc_agent_caller_busy(int core_id, const char * const debug);
 
 /*!
  * \since 1.6.4
@@ -923,7 +923,7 @@
  * \retval 0 Success
  * \retval -1 Failure
  */
-int ast_cc_caller_available(int core_id, const char * const debug);
+int ast_cc_agent_caller_available(int core_id, const char * const debug);
 
 /*!
  * \since 1.6.4
@@ -938,7 +938,7 @@
  * \retval 0 Success
  * \retval -1 Failure
  */
-int ast_cc_recalling(int core_id, const char * const debug);
+int ast_cc_agent_recalling(int core_id, const char * const debug);
 
 /*!
  * \since 1.6.4
@@ -994,9 +994,9 @@
 
 /* BEGIN STATUS REQUEST/RESPONSE API */
 
-int ast_cc_status_request(int core_id);
-
-int ast_cc_status_response(int core_id, enum ast_device_state devstate);
+int ast_cc_monitor_status_request(int core_id);
+
+int ast_cc_agent_status_response(int core_id, enum ast_device_state devstate);
 
 /* END STATUS REQUEST/RESPONSE API */
 
@@ -1023,7 +1023,7 @@
  * \retval 0 Request successfully queued
  * \retval -1 Request could not be queued
  */
-int ast_cc_callee_available(struct ast_cc_monitor *monitor);
+int ast_cc_monitor_callee_available(struct ast_cc_monitor *monitor);
 
 /* END API FOR USE WITH/BY MONITORS */
 

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=228028&r1=228027&r2=228028
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Nov  5 11:20:26 2009
@@ -1002,7 +1002,7 @@
 	gen_mon_pvt->current_state = new_state;
 
 	if (new_state == AST_DEVICE_NOT_INUSE) {
-		ast_cc_callee_available(monitor);
+		ast_cc_monitor_callee_available(monitor);
 	}
 	cc_unref(monitor, "Kill reference from generic_monitor_devstate_cb");
 	ast_free(gtcd);
@@ -1064,8 +1064,8 @@
 	 * will that mean a missed opportunity?
 	 */
 	if (service == AST_CC_CCBS && gen_mon_pvt->current_state == AST_DEVICE_NOT_INUSE) {
-		ast_cc_request_acknowledged(core_id, "Formality. Device is already available but we have to go through the motions\n");
-		return ast_cc_callee_available(monitor);
+		ast_cc_monitor_request_acknowledged(core_id, "Formality. Device is already available but we have to go through the motions\n");
+		return ast_cc_monitor_callee_available(monitor);
 	}
 
 	when = service == AST_CC_CCBS ? ast_get_ccbs_available_timer(monitor->interface->config_params) :
@@ -1080,7 +1080,7 @@
 			AST_EVENT_IE_END))) {
 		return -1;
 	}
-	ast_cc_request_acknowledged(core_id, "Generic monitor subscribed to device state.\n");
+	ast_cc_monitor_request_acknowledged(core_id, "Generic monitor subscribed to device state.\n");
 	return 0;
 }
 
@@ -1094,7 +1094,7 @@
 		 */
 		monitor->saved_link = NULL;
 		if (ast_device_state(monitor->interface->name) == AST_DEVICE_NOT_INUSE) {
-			ast_cc_callee_available(monitor);
+			ast_cc_monitor_callee_available(monitor);
 		}
 	}
 	return 0;
@@ -1116,7 +1116,7 @@
 	 * immediate state change
 	 */
 	if (ast_device_state(monitor->interface->name) == AST_DEVICE_NOT_INUSE) {
-		ast_cc_callee_available(monitor);
+		ast_cc_monitor_callee_available(monitor);
 	}
 	return 0;
 }
@@ -1901,7 +1901,7 @@
 
 static int cc_generic_agent_status_request(struct ast_cc_agent *agent)
 {
-	ast_cc_status_response(agent->core_id, ast_device_state(agent->interface));
+	ast_cc_agent_status_response(agent->core_id, ast_device_state(agent->interface));
 	return 0;
 }
 
@@ -1913,7 +1913,7 @@
 	ast_str_set(&str, 0, "%s is no longer busy\n", agent->interface);
 	ast_assert(generic_pvt->sub != NULL);
 	generic_pvt->sub = ast_event_unsubscribe(generic_pvt->sub);
-	ast_cc_caller_available(agent->core_id, ast_str_buffer(str));
+	ast_cc_agent_caller_available(agent->core_id, ast_str_buffer(str));
 }
 
 static int cc_generic_agent_start_monitoring(struct ast_cc_agent *agent)
@@ -1982,7 +1982,7 @@
 	ast_copy_string(chan->exten, exten, sizeof(chan->exten));
 	ast_copy_string(chan->context, context, sizeof(chan->context));
 	chan->priority = 1;
-	ast_cc_recalling(agent->core_id, "Generic agent is recalling");
+	ast_cc_agent_recalling(agent->core_id, "Generic agent is recalling");
 	ast_pbx_start(chan);
 	return NULL;
 }
@@ -1996,7 +1996,7 @@
 		/* We can't try to contact the device right now because he's not available
 		 * Let the core know he's busy.
 		 */
-		ast_cc_caller_busy(agent->core_id, "Generic agent caller is busy");
+		ast_cc_agent_caller_busy(agent->core_id, "Generic agent caller is busy");
 		return 0;
 	}
 	ast_pthread_create_detached_background(&clotho, NULL, generic_recall, agent);
@@ -2812,32 +2812,32 @@
 	return res;
 }
 
-int ast_cc_accept_request(int core_id, const char * const debug)
+int ast_cc_agent_accept_request(int core_id, const char * const debug)
 {
 	return cc_request_state_change(CC_CALLER_REQUESTED, core_id, debug);
 }
 
-int ast_cc_request_acknowledged(int core_id, const char * const debug)
+int ast_cc_monitor_request_acknowledged(int core_id, const char * const debug)
 {
 	return cc_request_state_change(CC_ACTIVE, core_id, debug);
 }
 
-int ast_cc_callee_available(struct ast_cc_monitor *monitor) {
+int ast_cc_monitor_callee_available(struct ast_cc_monitor *monitor) {
 	return ast_taskprocessor_push(cc_core_taskprocessor, cc_devstate_change,
 			cc_ref(monitor, "Bump reference count until cc_devstate_change executes"));
 }
 
-int ast_cc_caller_busy(int core_id, const char * debug)
+int ast_cc_agent_caller_busy(int core_id, const char * debug)
 {
 	return cc_request_state_change(CC_CALLER_BUSY, core_id, debug);
 }
 
-int ast_cc_caller_available(int core_id, const char * const debug)
+int ast_cc_agent_caller_available(int core_id, const char * const debug)
 {
 	return cc_request_state_change(CC_ACTIVE, core_id, debug);
 }
 
-int ast_cc_recalling(int core_id, const char * const debug)
+int ast_cc_agent_recalling(int core_id, const char * const debug)
 {
 	return cc_request_state_change(CC_RECALLING, core_id, debug);
 }
@@ -3014,7 +3014,7 @@
 	return res;
 }
 
-int ast_cc_status_request(int core_id)
+int ast_cc_monitor_status_request(int core_id)
 {
 	struct cc_core_instance *core_instance = find_cc_core_instance(core_id);
 
@@ -3043,7 +3043,7 @@
 	return res;
 }
 
-int ast_cc_status_response(int core_id, enum ast_device_state devstate)
+int ast_cc_agent_status_response(int core_id, enum ast_device_state devstate)
 {
 	struct cc_core_instance *core_instance = find_cc_core_instance(core_id);
 
@@ -3086,7 +3086,7 @@
 		return -1;
 	}
 
-	res = ast_cc_accept_request(core_instance->core_id, "CallCompletionRequest called");
+	res = ast_cc_agent_accept_request(core_instance->core_id, "CallCompletionRequest called");
 	cc_unref(core_instance, "Done with CallCompletionRequest");
 	return res;
 }




More information about the asterisk-commits mailing list