[Asterisk-cvs] asterisk/include/asterisk pbx.h,1.49,1.50

kpfleming kpfleming
Sat Aug 27 19:53:42 CDT 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv19278/include/asterisk

Modified Files:
	pbx.h 
Log Message:
preserve hint watchers and laststate across 'extensions reload' (issue #2522)


Index: pbx.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/pbx.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- pbx.h	15 Jul 2005 23:24:51 -0000	1.49
+++ pbx.h	27 Aug 2005 23:55:14 -0000	1.50
@@ -34,14 +34,20 @@
 #define PRIORITY_HINT	-1
 
 /*! Extension states */
-/*! No device INUSE or BUSY  */
-#define AST_EXTENSION_NOT_INUSE		0
-/*! One or more devices INUSE */
-#define AST_EXTENSION_INUSE		1
-/*! All devices BUSY */
-#define AST_EXTENSION_BUSY		2
-/*! All devices UNAVAILABLE/UNREGISTERED */
-#define AST_EXTENSION_UNAVAILABLE 	3
+enum ast_extension_states {
+	/*! Extension removed */
+	AST_EXTENSION_REMOVED = -2,
+	/*! Extension hint removed */
+	AST_EXTENSION_DEACTIVATED = -1,
+	/*! No device INUSE or BUSY  */
+	AST_EXTENSION_NOT_INUSE = 0,
+	/*! One or more devices INUSE */
+	AST_EXTENSION_INUSE = 1,
+	/*! All devices BUSY */
+	AST_EXTENSION_BUSY = 2,
+	/*! All devices UNAVAILABLE/UNREGISTERED */
+	AST_EXTENSION_UNAVAILABLE = 3,
+};
 
 struct ast_context;
 struct ast_exten;     
@@ -49,7 +55,7 @@
 struct ast_ignorepat;
 struct ast_sw;
 
-typedef int (*ast_state_cb_type)(char *context, char* id, int state, void *data);
+typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data);
 
 /*! Data structure associated with a custom function */
 struct ast_custom_function {




More information about the svn-commits mailing list