[Asterisk-cvs] asterisk/doc CODING-GUIDELINES,1.8,1.9

kpfleming at lists.digium.com kpfleming at lists.digium.com
Sun May 1 15:27:50 CDT 2005


Update of /usr/cvsroot/asterisk/doc
In directory localhost.localdomain:/tmp/cvs-serv22544/doc

Modified Files:
	CODING-GUIDELINES 
Log Message:
add some notes regarding the distinction between applications and functions


Index: CODING-GUIDELINES
===================================================================
RCS file: /usr/cvsroot/asterisk/doc/CODING-GUIDELINES,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CODING-GUIDELINES	23 Apr 2005 15:11:28 -0000	1.8
+++ CODING-GUIDELINES	1 May 2005 19:34:50 -0000	1.9
@@ -4,7 +4,13 @@
 disclaimed to Digium or placed in the public domain. For more information
 see http://bugs.digium.com
 
-Patches should be in the form of a unified (-u) diff.
+Patches should be in the form of a unified (-u) diff, made from the directory
+above the top-level Asterisk source directory. For example:
+
+- the base code you are working from is in ~/work/asterisk-base
+- the changes are in ~/work/asterisk-new
+
+~/work$ diff -urN asterisk-base asterisk-new
 
 All code, filenames, function names and comments must be in ENGLISH.
 
@@ -168,3 +174,21 @@
 not
 
 *CLI> show iax2 peer <peername>
+
+== New dialplan applications/functions ==
+
+There are two methods of adding functionality to the Asterisk
+dialplan: applications and functions. Applications (found generally in
+the apps/ directory) should be collections of code that interact with
+a channel and/or user in some significant way. Functions (which can be
+provided by any type of module) are used when the provided
+functionality is simple... getting/retrieving a value, for
+example. Functions should also be used when the operation is in no way
+related to a channel (a computation or string operation, for example).
+
+Applications are registered and invoked using the
+ast_register_application function; see the apps/app_skel.c file for an
+example.
+
+Functions are registered using 'struct ast_custom_function_obj'
+structures and the ast_custom_function_register function.




More information about the svn-commits mailing list