[commit] r3000 - in freeswitch/trunk/src: dotnet dotnet/Marshaling/Types dotnet/Modules include mod/applications/mod_commands mod/applications/mod_conference mod/applications/mod_dptools mod/endpoints/mod_dingaling mod/endpoints/mod_portaudio mod/languages/mod_spidermonkey
Author: mikej Date: Sun Oct 8 01:04:34 2006 New Revision: 3000 Modified: freeswitch/trunk/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs freeswitch/trunk/src/dotnet/Module.cs freeswitch/trunk/src/dotnet/Modules/Api.cs freeswitch/trunk/src/include/switch_module_interfaces.h freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Log: add syntax field to the api interface struct. Modified: freeswitch/trunk/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs ============================================================================== --- freeswitch/trunk/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs (original) +++ freeswitch/trunk/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs Sun Oct 8 01:04:34 2006 @@ -42,7 +42,8 @@ internal IntPtr interface_name; //[MarshalAs(UnmanagedType.LPStr)] internal IntPtr desc; - internal ApiFunction function; + internal ApiFunction function; + internal IntPtr syntax; internal IntPtr next; } } Modified: freeswitch/trunk/src/dotnet/Module.cs ============================================================================== --- freeswitch/trunk/src/dotnet/Module.cs (original) +++ freeswitch/trunk/src/dotnet/Module.cs Sun Oct 8 01:04:34 2006 @@ -130,6 +130,7 @@ /* Allocate umanaged mem to to interface fields so GC doesn't disturb them */ apiInterfaceMarshal.interface_name = Marshal.StringToHGlobalAnsi(apiInterface.Name); apiInterfaceMarshal.desc = Marshal.StringToHGlobalAnsi(apiInterface.Description); + apiInterfaceMarshal.syntax = Marshal.StringToHGlobalAnsi(apiInterface.Syntax); apiInterfaceMarshal.function = new ApiFunction(apiInterface.ApiFunction); /* Set the handle of the managed object */ Modified: freeswitch/trunk/src/dotnet/Modules/Api.cs ============================================================================== --- freeswitch/trunk/src/dotnet/Modules/Api.cs (original) +++ freeswitch/trunk/src/dotnet/Modules/Api.cs Sun Oct 8 01:04:34 2006 @@ -41,6 +41,7 @@ { private string name; private string description; + private string syntax; private ApiFunction apiFunction; public HandleRef handle; @@ -54,6 +55,12 @@ { set { description = value; } get { return description; } + } + + public string Syntax + { + set { syntax = value; } + get { return syntax; } } public ApiFunction ApiFunction Modified: freeswitch/trunk/src/include/switch_module_interfaces.h ============================================================================== --- freeswitch/trunk/src/include/switch_module_interfaces.h (original) +++ freeswitch/trunk/src/include/switch_module_interfaces.h Sun Oct 8 01:04:34 2006 @@ -537,6 +537,8 @@ const char *desc; /*! function the api call uses */ switch_api_function_t function; + /*! an example of the application syntax */ + const char *syntax; const struct switch_api_interface *next; }; Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original) +++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Sun Oct 8 01:04:34 2006 @@ -491,6 +491,7 @@ /*.interface_name */ "fsctl", /*.desc */ "control messages", /*.function */ ctl_function, + /*.syntax */ NULL, /*.next */ }; @@ -498,6 +499,7 @@ /*.interface_name */ "uuid_bridge", /*.desc */ "uuid_bridge", /*.function */ uuid_bridge_function, + /*.syntax */ NULL, /*.next */ &ctl_api_interface }; @@ -505,6 +507,7 @@ /*.interface_name */ "status", /*.desc */ "status", /*.function */ status_function, + /*.syntax */ NULL, /*.next */ &uuid_bridge_api_interface }; @@ -512,6 +515,7 @@ /*.interface_name */ "show", /*.desc */ "Show", /*.function */ show_function, + /*.syntax */ NULL, /*.next */ &status_api_interface }; @@ -519,6 +523,7 @@ /*.interface_name */ "pause", /*.desc */ "Pause", /*.function */ pause_function, + /*.syntax */ NULL, /*.next */ &show_api_interface }; @@ -526,6 +531,7 @@ /*.interface_name */ "transfer", /*.desc */ "Transfer", /*.function */ transfer_function, + /*.syntax */ NULL, /*.next */ &pause_api_interface }; @@ -533,6 +539,7 @@ /*.interface_name */ "load", /*.desc */ "Load Module", /*.function */ load_function, + /*.syntax */ NULL, /*.next */ &transfer_api_interface }; @@ -540,6 +547,7 @@ /*.interface_name */ "reloadxml", /*.desc */ "Reload XML", /*.function */ reload_function, + /*.syntax */ NULL, /*.next */ &load_api_interface, }; @@ -548,6 +556,7 @@ /*.interface_name */ "killchan", /*.desc */ "Kill Channel", /*.function */ kill_function, + /*.syntax */ NULL, /*.next */ &reload_api_interface }; @@ -555,6 +564,7 @@ /*.interface_name */ "originate", /*.desc */ "Originate a Call", /*.function */ originate_function, + /*.syntax */ NULL, /*.next */ &commands_api_interface }; Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original) +++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Sun Oct 8 01:04:34 2006 @@ -2665,7 +2665,8 @@ static switch_api_interface_t conf_api_interface = { /*.interface_name */ "conference", /*.desc */ "Conference", - /*.function */ conf_function + /*.function */ conf_function, + /*.syntax */ NULL, /*.next */ }; Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original) +++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Sun Oct 8 01:04:34 2006 @@ -133,6 +133,7 @@ /*.interface_name */ "strftime", /*.desc */ "strftime", /*.function */ strftime_api_function, + /*.syntax */ NULL, /*.next */ NULL }; Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Sun Oct 8 01:04:34 2006 @@ -1071,6 +1071,7 @@ /*.interface_name */ "dl_logout", /*.desc */ "DingaLing Logout", /*.function */ dl_logout, + /*.syntax */ NULL, /*.next */ NULL }; @@ -1078,6 +1079,7 @@ /*.interface_name */ "dl_login", /*.desc */ "DingaLing Login", /*.function */ dl_login, + /*.syntax */ NULL, /*.next */ &logout_api_interface }; Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Sun Oct 8 01:04:34 2006 @@ -440,6 +440,7 @@ /*.interface_name */ "padtmf", /*.desc */ "PortAudio Dial DTMF", /*.function */ send_dtmf, + /*.syntax */ NULL, /*.next */ NULL }; @@ -447,6 +448,7 @@ /*.interface_name */ "paoffhook", /*.desc */ "PortAudio Answer Call", /*.function */ answer_call, + /*.syntax */ NULL, /*.next */ &send_dtmf_interface }; @@ -454,6 +456,7 @@ /*.interface_name */ "painfo", /*.desc */ "PortAudio Call Info", /*.function */ call_info, + /*.syntax */ NULL, /*.next */ &answer_call_interface }; @@ -461,6 +464,7 @@ /*.interface_name */ "pahup", /*.desc */ "PortAudio Hangup Call", /*.function */ hup_call, + /*.syntax */ NULL, /*.next */ &channel_info_interface }; @@ -468,6 +472,7 @@ /*.interface_name */ "pacall", /*.desc */ "PortAudio Call", /*.function */ place_call, + /*.syntax */ NULL, /*.next */ &channel_hup_interface }; Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c ============================================================================== --- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original) +++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Sun Oct 8 01:04:34 2006 @@ -2696,6 +2696,7 @@ /*.interface_name */ "jsrun", /*.desc */ "run a script", /*.function */ launch_async, + /*.syntax */ NULL, /*.next */ NULL };
participants (1)
-
Freeswitch SVN