[Freeswitch-branches] [commit] r3874 - freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference

Freeswitch SVN knhor at freeswitch.org
Sat Dec 30 16:52:09 EST 2006


Author: knhor
Date: Sat Dec 30 16:52:09 2006
New Revision: 3874

Modified:
   freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c

Log:
fix void function pointer for mikej

Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c	Sat Dec 30 16:52:09 2006
@@ -158,7 +158,7 @@
 #ifdef OPTION_IVR_MENU_SUPPORT
 	switch_xml_t menus;
 #endif
-//	switch_xml_t chat_admin;
+	switch_xml_t chat_permissions;
 } conf_xml_cfg_t;
 
 /* Conference Object */
@@ -199,8 +199,7 @@
 	int32_t energy_level;
 	uint8_t min;
 	conf_xml_cfg_t xml_cfg;
-//	switch_hash_t *chat_admin;
-//	switch_hash_t *chat_id;
+//	switch_hash_t *chat_permissions;
 } conference_obj_t;
 
 /* Relationship with another member */
@@ -258,10 +257,12 @@
 	CONF_API_SUB_ARGS_AS_ONE
 } conference_fntype_t;
 
+typedef void (*api_cmd_fn_t)(void *);
+
 /* API command parser */
 typedef struct api_command {
 	char *pname;
-	void *pfnapicmd;
+	api_cmd_fn_t pfnapicmd;
 	conference_fntype_t fntype;
 	char *psyntax;
 } api_command_t;
@@ -1373,13 +1374,13 @@
 	{"mute", 		"0", 	CALLER_CONTROL_MUTE, 		conference_loop_fn_mute_toggle}, 
 	{"deaf mute", 		"*", 	CALLER_CONTROL_DEAF_MUTE, 	conference_loop_fn_deafmute_toggle}, 
 	{"energy up", 		"9", 	CALLER_CONTROL_ENERGY_UP, 	conference_loop_fn_energy_up}, 
-	{"energy equ", 		"8", 	CALLER_CONTROL_ENERGY_EQU_CONF, 	conference_loop_fn_energy_equ_conf}, 
+	{"energy equ", 		"8", 	CALLER_CONTROL_ENERGY_EQU_CONF, conference_loop_fn_energy_equ_conf}, 
 	{"energy dn", 		"7", 	CALLER_CONTROL_ENERGEY_DN, 	conference_loop_fn_energy_dn}, 
-	{"vol talk up", 		"3", 	CALLER_CONTROL_VOL_TALK_UP, 	conference_loop_fn_volume_talk_up}, 
+	{"vol talk up", 	"3", 	CALLER_CONTROL_VOL_TALK_UP, 	conference_loop_fn_volume_talk_up}, 
 	{"vol talk zero", 	"2", 	CALLER_CONTROL_VOL_TALK_ZERO, 	conference_loop_fn_volume_talk_zero}, 
-	{"vol talk dn", 		"1", 	CALLER_CONTROL_VOL_TALK_DN, 	conference_loop_fn_volume_talk_dn}, 
+	{"vol talk dn", 	"1", 	CALLER_CONTROL_VOL_TALK_DN, 	conference_loop_fn_volume_talk_dn}, 
 	{"vol listen up", 	"6", 	CALLER_CONTROL_VOL_LISTEN_UP, 	conference_loop_fn_volume_listen_up}, 
-	{"vol listen zero", 	"5", 	CALLER_CONTROL_VOL_LISTEN_ZERO, 	conference_loop_fn_volume_listen_zero}, 
+	{"vol listen zero", 	"5", 	CALLER_CONTROL_VOL_LISTEN_ZERO, conference_loop_fn_volume_listen_zero}, 
 	{"vol listen dn", 	"4", 	CALLER_CONTROL_VOL_LISTEN_DN, 	conference_loop_fn_volume_listen_dn}, 
 	{"hangup", 		"#", 	CALLER_CONTROL_HANGUP, 		conference_loop_fn_hangup}, 
 #ifdef OPTION_IVR_MENU_SUPPORT
@@ -3252,26 +3253,26 @@
 
 /* API Interface Function sub-commands */
 static api_command_t conf_api_sub_commands[] = {
-    {"deaf",         &conf_api_sub_deaf,          CONF_API_SUB_MEMBER_TARGET,    "<confname> deaf <[member_id|all]|last>"},    
-    {"dial",         &conf_api_sub_dial,          CONF_API_SUB_ARGS_SPLIT,       "<confname> dial <endpoint_module_name>/<destination> <callerid number> <callerid name>"},    
-    {"energy",       &conf_api_sub_energy,        CONF_API_SUB_MEMBER_TARGET,    "<confname> energy <member_id|all|last> [<newval>]"}, 
-    {"kick",         &conf_api_sub_kick,          CONF_API_SUB_MEMBER_TARGET,    "<confname> kick <[member_id|all|last]>"},    
-    {"list",         &conf_api_sub_list,          CONF_API_SUB_ARGS_SPLIT,       "<confname> list [delim <string>]"}, 
-    {"lock",         &conf_api_sub_lock,          CONF_API_SUB_ARGS_SPLIT,       "<confname> lock"},    
-    {"mute",         &conf_api_sub_mute,          CONF_API_SUB_MEMBER_TARGET,    "<confname> mute <[member_id|all]|last>"},    
-    {"norecord",     &conf_api_sub_norecord,      CONF_API_SUB_ARGS_SPLIT,       "<confname> norecord <[filename|all]>"},    
-    {"play",         &conf_api_sub_play,          CONF_API_SUB_ARGS_SPLIT,       "<confname> play <file_path> [<member_id>]"}, 
-    {"record",       &conf_api_sub_record,        CONF_API_SUB_ARGS_SPLIT,       "<confname> record <filename>"},    
-    {"relate",       &conf_api_sub_relate,        CONF_API_SUB_ARGS_SPLIT,       "<confname> relate <member_id> <other_member_id> [nospeak|nohear|clear]"},    
-    {"say",          &conf_api_sub_say,           CONF_API_SUB_ARGS_AS_ONE,      "<confname> say <text>"}, 
-    {"saymember",    &conf_api_sub_saymember,     CONF_API_SUB_ARGS_AS_ONE,      "<confname> saymember <member_id> <text>"},    
-    {"stop",         &conf_api_sub_stop,          CONF_API_SUB_MEMBER_TARGET,    "<confname> stop <[current|all|last]> [<member_id>]"},    
-    {"transfer",     &conf_api_sub_transfer,      CONF_API_SUB_ARGS_SPLIT,       "<confname> transfer <conference_name> <member id> [...<member id>]"},    
-    {"undeaf",       &conf_api_sub_undeaf,        CONF_API_SUB_MEMBER_TARGET,    "<confname> undeaf <[member_id|all]|last>"},    
-    {"unlock",       &conf_api_sub_unlock,        CONF_API_SUB_ARGS_SPLIT,       "<confname> unlock"},    
-    {"unmute",       &conf_api_sub_unmute,        CONF_API_SUB_MEMBER_TARGET,    "<confname> unmute <[member_id|all]|last>"},    
-    {"volume_in",    &conf_api_sub_volume_in,     CONF_API_SUB_MEMBER_TARGET,    "<confname> volume_in <member_id|all|last> [<newval>]"}, 
-    {"volume_out",   &conf_api_sub_volume_out,    CONF_API_SUB_MEMBER_TARGET,    "<confname> volume_out <member_id|all|last> [<newval>]"}, 
+    {"deaf",         (api_cmd_fn_t)&conf_api_sub_deaf,          CONF_API_SUB_MEMBER_TARGET,    "<confname> deaf <[member_id|all]|last>"},    
+    {"dial",         (api_cmd_fn_t)&conf_api_sub_dial,          CONF_API_SUB_ARGS_SPLIT,       "<confname> dial <endpoint_module_name>/<destination> <callerid number> <callerid name>"},    
+    {"energy",       (api_cmd_fn_t)&conf_api_sub_energy,        CONF_API_SUB_MEMBER_TARGET,    "<confname> energy <member_id|all|last> [<newval>]"}, 
+    {"kick",         (api_cmd_fn_t)&conf_api_sub_kick,          CONF_API_SUB_MEMBER_TARGET,    "<confname> kick <[member_id|all|last]>"},    
+    {"list",         (api_cmd_fn_t)&conf_api_sub_list,          CONF_API_SUB_ARGS_SPLIT,       "<confname> list [delim <string>]"}, 
+    {"lock",         (api_cmd_fn_t)&conf_api_sub_lock,          CONF_API_SUB_ARGS_SPLIT,       "<confname> lock"},    
+    {"mute",         (api_cmd_fn_t)&conf_api_sub_mute,          CONF_API_SUB_MEMBER_TARGET,    "<confname> mute <[member_id|all]|last>"},    
+    {"norecord",     (api_cmd_fn_t)&conf_api_sub_norecord,      CONF_API_SUB_ARGS_SPLIT,       "<confname> norecord <[filename|all]>"},    
+    {"play",         (api_cmd_fn_t)&conf_api_sub_play,          CONF_API_SUB_ARGS_SPLIT,       "<confname> play <file_path> [<member_id>]"}, 
+    {"record",       (api_cmd_fn_t)&conf_api_sub_record,        CONF_API_SUB_ARGS_SPLIT,       "<confname> record <filename>"},    
+    {"relate",       (api_cmd_fn_t)&conf_api_sub_relate,        CONF_API_SUB_ARGS_SPLIT,       "<confname> relate <member_id> <other_member_id> [nospeak|nohear|clear]"},    
+    {"say",          (api_cmd_fn_t)&conf_api_sub_say,           CONF_API_SUB_ARGS_AS_ONE,      "<confname> say <text>"}, 
+    {"saymember",    (api_cmd_fn_t)&conf_api_sub_saymember,     CONF_API_SUB_ARGS_AS_ONE,      "<confname> saymember <member_id> <text>"},    
+    {"stop",         (api_cmd_fn_t)&conf_api_sub_stop,          CONF_API_SUB_MEMBER_TARGET,    "<confname> stop <[current|all|last]> [<member_id>]"},    
+    {"transfer",     (api_cmd_fn_t)&conf_api_sub_transfer,      CONF_API_SUB_ARGS_SPLIT,       "<confname> transfer <conference_name> <member id> [...<member id>]"},    
+    {"undeaf",       (api_cmd_fn_t)&conf_api_sub_undeaf,        CONF_API_SUB_MEMBER_TARGET,    "<confname> undeaf <[member_id|all]|last>"},    
+    {"unlock",       (api_cmd_fn_t)&conf_api_sub_unlock,        CONF_API_SUB_ARGS_SPLIT,       "<confname> unlock"},    
+    {"unmute",       (api_cmd_fn_t)&conf_api_sub_unmute,        CONF_API_SUB_MEMBER_TARGET,    "<confname> unmute <[member_id|all]|last>"},    
+    {"volume_in",    (api_cmd_fn_t)&conf_api_sub_volume_in,     CONF_API_SUB_MEMBER_TARGET,    "<confname> volume_in <member_id|all|last> [<newval>]"}, 
+    {"volume_out",   (api_cmd_fn_t)&conf_api_sub_volume_out,    CONF_API_SUB_MEMBER_TARGET,    "<confname> volume_out <member_id|all|last> [<newval>]"}, 
 };
 
 #define CONFFUNCAPISIZE (sizeof(conf_api_sub_commands)/sizeof(conf_api_sub_commands[0]))
@@ -3308,7 +3309,7 @@
                     int last = ( id == 0 && strcasecmp(argv[1], "last") == 0 );
 
                     if (all) {
-                        conference_member_itterator(conference, stream, conf_api_sub_commands[i].pfnapicmd, argv[2]);
+                        conference_member_itterator(conference, stream, (conf_api_member_cmd_t)conf_api_sub_commands[i].pfnapicmd, argv[2]);
                     } else if (last) {
                         conference_member_t *member = NULL;
                         conference_member_t *last_member = NULL;
@@ -3626,7 +3627,7 @@
 #ifdef OPTION_IVR_MENU_SUPPORT
 		xml_cfg->menus = switch_xml_child(cfg, "menus");
 #endif
-//		xml_cfg->chat_admin = switch_xml_child(cfg, "chat-admin");
+		xml_cfg->chat_permissions = switch_xml_child(cfg, "chat-permisions");
 		status = SWITCH_STATUS_SUCCESS;
 	    }
 	}



More information about the Freeswitch-branches mailing list