add syntax field to the api interface struct.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3000 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
dd3cd99301
commit
2b53e80e34
|
@ -42,7 +42,8 @@ namespace FreeSwitch.Marshaling.Types
|
|||
internal IntPtr interface_name;
|
||||
//[MarshalAs(UnmanagedType.LPStr)]
|
||||
internal IntPtr desc;
|
||||
internal ApiFunction function;
|
||||
internal ApiFunction function;
|
||||
internal IntPtr syntax;
|
||||
internal IntPtr next;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ namespace FreeSwitch
|
|||
/* 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 */
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace FreeSwitch.Modules
|
|||
{
|
||||
private string name;
|
||||
private string description;
|
||||
private string syntax;
|
||||
private ApiFunction apiFunction;
|
||||
public HandleRef handle;
|
||||
|
||||
|
@ -56,6 +57,12 @@ namespace FreeSwitch.Modules
|
|||
get { return description; }
|
||||
}
|
||||
|
||||
public string Syntax
|
||||
{
|
||||
set { syntax = value; }
|
||||
get { return syntax; }
|
||||
}
|
||||
|
||||
public ApiFunction ApiFunction
|
||||
{
|
||||
set { apiFunction = value; }
|
||||
|
|
|
@ -537,6 +537,8 @@ struct switch_api_interface {
|
|||
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;
|
||||
};
|
||||
|
||||
|
|
|
@ -491,6 +491,7 @@ static switch_api_interface_t ctl_api_interface = {
|
|||
/*.interface_name */ "fsctl",
|
||||
/*.desc */ "control messages",
|
||||
/*.function */ ctl_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */
|
||||
};
|
||||
|
||||
|
@ -498,6 +499,7 @@ static switch_api_interface_t uuid_bridge_api_interface = {
|
|||
/*.interface_name */ "uuid_bridge",
|
||||
/*.desc */ "uuid_bridge",
|
||||
/*.function */ uuid_bridge_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &ctl_api_interface
|
||||
};
|
||||
|
||||
|
@ -505,6 +507,7 @@ static switch_api_interface_t status_api_interface = {
|
|||
/*.interface_name */ "status",
|
||||
/*.desc */ "status",
|
||||
/*.function */ status_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &uuid_bridge_api_interface
|
||||
};
|
||||
|
||||
|
@ -512,6 +515,7 @@ static switch_api_interface_t show_api_interface = {
|
|||
/*.interface_name */ "show",
|
||||
/*.desc */ "Show",
|
||||
/*.function */ show_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &status_api_interface
|
||||
};
|
||||
|
||||
|
@ -519,6 +523,7 @@ static switch_api_interface_t pause_api_interface = {
|
|||
/*.interface_name */ "pause",
|
||||
/*.desc */ "Pause",
|
||||
/*.function */ pause_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &show_api_interface
|
||||
};
|
||||
|
||||
|
@ -526,6 +531,7 @@ static switch_api_interface_t transfer_api_interface = {
|
|||
/*.interface_name */ "transfer",
|
||||
/*.desc */ "Transfer",
|
||||
/*.function */ transfer_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &pause_api_interface
|
||||
};
|
||||
|
||||
|
@ -533,6 +539,7 @@ static switch_api_interface_t load_api_interface = {
|
|||
/*.interface_name */ "load",
|
||||
/*.desc */ "Load Module",
|
||||
/*.function */ load_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &transfer_api_interface
|
||||
};
|
||||
|
||||
|
@ -540,6 +547,7 @@ static switch_api_interface_t reload_api_interface = {
|
|||
/*.interface_name */ "reloadxml",
|
||||
/*.desc */ "Reload XML",
|
||||
/*.function */ reload_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &load_api_interface,
|
||||
|
||||
};
|
||||
|
@ -548,6 +556,7 @@ static switch_api_interface_t commands_api_interface = {
|
|||
/*.interface_name */ "killchan",
|
||||
/*.desc */ "Kill Channel",
|
||||
/*.function */ kill_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &reload_api_interface
|
||||
};
|
||||
|
||||
|
@ -555,6 +564,7 @@ static switch_api_interface_t originate_api_interface = {
|
|||
/*.interface_name */ "originate",
|
||||
/*.desc */ "Originate a Call",
|
||||
/*.function */ originate_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &commands_api_interface
|
||||
};
|
||||
|
||||
|
|
|
@ -2665,7 +2665,8 @@ static const switch_application_interface_t conference_application_interface = {
|
|||
static switch_api_interface_t conf_api_interface = {
|
||||
/*.interface_name */ "conference",
|
||||
/*.desc */ "Conference",
|
||||
/*.function */ conf_function
|
||||
/*.function */ conf_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */
|
||||
};
|
||||
|
||||
|
|
|
@ -133,6 +133,7 @@ static switch_api_interface_t dptools_api_interface = {
|
|||
/*.interface_name */ "strftime",
|
||||
/*.desc */ "strftime",
|
||||
/*.function */ strftime_api_function,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -1071,6 +1071,7 @@ static switch_api_interface_t logout_api_interface = {
|
|||
/*.interface_name */ "dl_logout",
|
||||
/*.desc */ "DingaLing Logout",
|
||||
/*.function */ dl_logout,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ NULL
|
||||
};
|
||||
|
||||
|
@ -1078,6 +1079,7 @@ static switch_api_interface_t login_api_interface = {
|
|||
/*.interface_name */ "dl_login",
|
||||
/*.desc */ "DingaLing Login",
|
||||
/*.function */ dl_login,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &logout_api_interface
|
||||
};
|
||||
|
||||
|
|
|
@ -440,6 +440,7 @@ static switch_api_interface_t send_dtmf_interface = {
|
|||
/*.interface_name */ "padtmf",
|
||||
/*.desc */ "PortAudio Dial DTMF",
|
||||
/*.function */ send_dtmf,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ NULL
|
||||
};
|
||||
|
||||
|
@ -447,6 +448,7 @@ static switch_api_interface_t answer_call_interface = {
|
|||
/*.interface_name */ "paoffhook",
|
||||
/*.desc */ "PortAudio Answer Call",
|
||||
/*.function */ answer_call,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &send_dtmf_interface
|
||||
};
|
||||
|
||||
|
@ -454,6 +456,7 @@ static switch_api_interface_t channel_info_interface = {
|
|||
/*.interface_name */ "painfo",
|
||||
/*.desc */ "PortAudio Call Info",
|
||||
/*.function */ call_info,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &answer_call_interface
|
||||
};
|
||||
|
||||
|
@ -461,6 +464,7 @@ static switch_api_interface_t channel_hup_interface = {
|
|||
/*.interface_name */ "pahup",
|
||||
/*.desc */ "PortAudio Hangup Call",
|
||||
/*.function */ hup_call,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &channel_info_interface
|
||||
};
|
||||
|
||||
|
@ -468,6 +472,7 @@ static switch_api_interface_t channel_api_interface = {
|
|||
/*.interface_name */ "pacall",
|
||||
/*.desc */ "PortAudio Call",
|
||||
/*.function */ place_call,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ &channel_hup_interface
|
||||
};
|
||||
|
||||
|
|
|
@ -2696,6 +2696,7 @@ static switch_api_interface_t js_run_interface = {
|
|||
/*.interface_name */ "jsrun",
|
||||
/*.desc */ "run a script",
|
||||
/*.function */ launch_async,
|
||||
/*.syntax */ NULL,
|
||||
/*.next */ NULL
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue