[asterisk-commits] bkruse: branch group/appdocsxml r128602 - in /team/group/appdocsxml: ./ apps/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 7 09:51:19 CDT 2008


Author: bkruse
Date: Mon Jul  7 09:51:18 2008
New Revision: 128602

URL: http://svn.digium.com/view/asterisk?view=rev&rev=128602
Log:
New way to define the app

Modified:
    team/group/appdocsxml/TODO_appdocsxml
    team/group/appdocsxml/apps/app_amd.c
    team/group/appdocsxml/apps/app_dial.c
    team/group/appdocsxml/apps/app_echo.c
    team/group/appdocsxml/apps/app_fax.c
    team/group/appdocsxml/apps/app_jack.c
    team/group/appdocsxml/apps/app_morsecode.c
    team/group/appdocsxml/apps/app_page.c
    team/group/appdocsxml/apps/app_senddtmf.c
    team/group/appdocsxml/include/asterisk/module.h

Modified: team/group/appdocsxml/TODO_appdocsxml
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/TODO_appdocsxml?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/TODO_appdocsxml (original)
+++ team/group/appdocsxml/TODO_appdocsxml Mon Jul  7 09:51:18 2008
@@ -27,11 +27,11 @@
 can be pulled out in a reliable way. Now we have to do that for
 all the Documentation we have already converted.
 
+=== DONE ===
+
 Possibly, instead of passing NULL, NULL on ast_register_application
 and ast_function_register, just:
 #define ast_register_application_xml(a, b) ast_register_application(a, b, NULL, NULL) ?
-
-=== DONE ===
 
 Finish ast_register_application_xml
 

Modified: team/group/appdocsxml/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_amd.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_amd.c (original)
+++ team/group/appdocsxml/apps/app_amd.c Mon Jul  7 09:51:18 2008
@@ -508,7 +508,7 @@
 {
 	if (load_config(0))
 		return AST_MODULE_LOAD_DECLINE;
-	if (ast_register_application(app, amd_exec, NULL, NULL))
+	if (ast_register_application_xml(app, amd_exec))
 		return AST_MODULE_LOAD_FAILURE;
 	return AST_MODULE_LOAD_SUCCESS;
 }

Modified: team/group/appdocsxml/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_dial.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_dial.c (original)
+++ team/group/appdocsxml/apps/app_dial.c Mon Jul  7 09:51:18 2008
@@ -2504,8 +2504,8 @@
 	else
 		ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_dial");
 
-	res = ast_register_application(app, dial_exec, NULL, NULL);
-	res |= ast_register_application(rapp, retrydial_exec, NULL, NULL);
+	res = ast_register_application_xml(app, dial_exec);
+	res |= ast_register_application_xml(rapp, retrydial_exec);
 
 	return res;
 }

Modified: team/group/appdocsxml/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_echo.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_echo.c (original)
+++ team/group/appdocsxml/apps/app_echo.c Mon Jul  7 09:51:18 2008
@@ -92,7 +92,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app, echo_exec, NULL, NULL);
+	return ast_register_application_xml(app, echo_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Simple Echo Application");

Modified: team/group/appdocsxml/apps/app_fax.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_fax.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_fax.c (original)
+++ team/group/appdocsxml/apps/app_fax.c Mon Jul  7 09:51:18 2008
@@ -822,8 +822,8 @@
 {
 	int res ;
 
-	res = ast_register_application(app_sndfax_name, sndfax_exec, NULL, NULL);
-	res |= ast_register_application(app_rcvfax_name, rcvfax_exec, NULL, NULL);
+	res = ast_register_application_xml(app_sndfax_name, sndfax_exec);
+	res |= ast_register_application_xml(app_rcvfax_name, rcvfax_exec);
 
 	/* The default SPAN message handler prints to stderr. It is something we do not want */
 	span_set_message_handler(NULL);

Modified: team/group/appdocsxml/apps/app_jack.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_jack.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_jack.c (original)
+++ team/group/appdocsxml/apps/app_jack.c Mon Jul  7 09:51:18 2008
@@ -1011,7 +1011,7 @@
 
 static int load_module(void)
 {
-	if (ast_register_application(jack_app, jack_exec, NULL, NULL)) {
+	if (ast_register_application_xml(jack_app, jack_exec)) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
 

Modified: team/group/appdocsxml/apps/app_morsecode.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_morsecode.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_morsecode.c (original)
+++ team/group/appdocsxml/apps/app_morsecode.c Mon Jul  7 09:51:18 2008
@@ -178,7 +178,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app_morsecode, morsecode_exec, NULL, NULL);
+	return ast_register_application_xml(app_morsecode, morsecode_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Morse code");

Modified: team/group/appdocsxml/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_page.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_page.c (original)
+++ team/group/appdocsxml/apps/app_page.c Mon Jul  7 09:51:18 2008
@@ -225,7 +225,7 @@
 
 static int load_module(void)
 {
-	return ast_register_application(app_page, page_exec, NULL, NULL);
+	return ast_register_application_xml(app_page, page_exec);
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Page Multiple Phones");

Modified: team/group/appdocsxml/apps/app_senddtmf.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/apps/app_senddtmf.c?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/apps/app_senddtmf.c (original)
+++ team/group/appdocsxml/apps/app_senddtmf.c Mon Jul  7 09:51:18 2008
@@ -136,7 +136,7 @@
 	int res;
 
 	res = ast_manager_register2( "PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf, "Play DTMF signal on a specific channel.", mandescr_playdtmf );
-	res |= ast_register_application(app, senddtmf_exec, NULL, NULL);
+	res |= ast_register_application_xml(app, senddtmf_exec);
 
 	return res;
 }

Modified: team/group/appdocsxml/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/include/asterisk/module.h?view=diff&rev=128602&r1=128601&r2=128602
==============================================================================
--- team/group/appdocsxml/include/asterisk/module.h (original)
+++ team/group/appdocsxml/include/asterisk/module.h Mon Jul  7 09:51:18 2008
@@ -380,6 +380,23 @@
  */
 #define ast_register_application(app, execute, synopsis, description) ast_register_application2(app, execute, synopsis, description, ast_module_info->self)
 
+/*! 
+ * \brief Register an application using XML documentation.
+ *
+ * \param app Short name of the application
+ * \param execute a function callback to execute the application. It should return
+ *                non-zero if the channel needs to be hung up.
+ * 
+ * This registers an application with Asterisk's internal application list. 
+ * \note The individual applications themselves are responsible for registering and unregistering
+ *       and unregistering their own CLI commands.
+ * 
+ * \retval 0 success 
+ * \retval -1 failure.
+ */
+#define ast_register_application_xml(app, execute) ast_register_application(app, execute, NULL, NULL)
+
+
 /*!
  * \brief Register an application.
  *




More information about the asterisk-commits mailing list