internal IntPtr interface_name;
//[MarshalAs(UnmanagedType.LPStr)]
internal IntPtr desc;
- internal ApiFunction function;
+ internal ApiFunction function;\r
+ internal IntPtr syntax;
internal IntPtr next;
}
}
/* Allocate umanaged mem to to interface fields so GC doesn't disturb them */\r
apiInterfaceMarshal.interface_name = Marshal.StringToHGlobalAnsi(apiInterface.Name);\r
apiInterfaceMarshal.desc = Marshal.StringToHGlobalAnsi(apiInterface.Description);\r
+ apiInterfaceMarshal.syntax = Marshal.StringToHGlobalAnsi(apiInterface.Syntax);\r
apiInterfaceMarshal.function = new ApiFunction(apiInterface.ApiFunction);\r
\r
/* Set the handle of the managed object */\r
{\r
private string name;\r
private string description;\r
+ private string syntax;\r
private ApiFunction apiFunction;\r
public HandleRef handle;\r
\r
get { return description; }\r
}\r
\r
+ public string Syntax\r
+ {\r
+ set { syntax = value; }\r
+ get { return syntax; }\r
+ }\r
+\r
public ApiFunction ApiFunction\r
{\r
set { apiFunction = value; }\r
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;
};
/*.interface_name */ "fsctl",
/*.desc */ "control messages",
/*.function */ ctl_function,
+ /*.syntax */ NULL,
/*.next */
};
/*.interface_name */ "uuid_bridge",
/*.desc */ "uuid_bridge",
/*.function */ uuid_bridge_function,
+ /*.syntax */ NULL,
/*.next */ &ctl_api_interface
};
/*.interface_name */ "status",
/*.desc */ "status",
/*.function */ status_function,
+ /*.syntax */ NULL,
/*.next */ &uuid_bridge_api_interface
};
/*.interface_name */ "show",
/*.desc */ "Show",
/*.function */ show_function,
+ /*.syntax */ NULL,
/*.next */ &status_api_interface
};
/*.interface_name */ "pause",
/*.desc */ "Pause",
/*.function */ pause_function,
+ /*.syntax */ NULL,
/*.next */ &show_api_interface
};
/*.interface_name */ "transfer",
/*.desc */ "Transfer",
/*.function */ transfer_function,
+ /*.syntax */ NULL,
/*.next */ &pause_api_interface
};
/*.interface_name */ "load",
/*.desc */ "Load Module",
/*.function */ load_function,
+ /*.syntax */ NULL,
/*.next */ &transfer_api_interface
};
/*.interface_name */ "reloadxml",
/*.desc */ "Reload XML",
/*.function */ reload_function,
+ /*.syntax */ NULL,
/*.next */ &load_api_interface,
};
/*.interface_name */ "killchan",
/*.desc */ "Kill Channel",
/*.function */ kill_function,
+ /*.syntax */ NULL,
/*.next */ &reload_api_interface
};
/*.interface_name */ "originate",
/*.desc */ "Originate a Call",
/*.function */ originate_function,
+ /*.syntax */ NULL,
/*.next */ &commands_api_interface
};
static switch_api_interface_t conf_api_interface = {
/*.interface_name */ "conference",
/*.desc */ "Conference",
- /*.function */ conf_function
+ /*.function */ conf_function,
+ /*.syntax */ NULL,
/*.next */
};
/*.interface_name */ "strftime",
/*.desc */ "strftime",
/*.function */ strftime_api_function,
+ /*.syntax */ NULL,
/*.next */ NULL
};
/*.interface_name */ "dl_logout",
/*.desc */ "DingaLing Logout",
/*.function */ dl_logout,
+ /*.syntax */ NULL,
/*.next */ NULL
};
/*.interface_name */ "dl_login",
/*.desc */ "DingaLing Login",
/*.function */ dl_login,
+ /*.syntax */ NULL,
/*.next */ &logout_api_interface
};
/*.interface_name */ "padtmf",
/*.desc */ "PortAudio Dial DTMF",
/*.function */ send_dtmf,
+ /*.syntax */ NULL,
/*.next */ NULL
};
/*.interface_name */ "paoffhook",
/*.desc */ "PortAudio Answer Call",
/*.function */ answer_call,
+ /*.syntax */ NULL,
/*.next */ &send_dtmf_interface
};
/*.interface_name */ "painfo",
/*.desc */ "PortAudio Call Info",
/*.function */ call_info,
+ /*.syntax */ NULL,
/*.next */ &answer_call_interface
};
/*.interface_name */ "pahup",
/*.desc */ "PortAudio Hangup Call",
/*.function */ hup_call,
+ /*.syntax */ NULL,
/*.next */ &channel_info_interface
};
/*.interface_name */ "pacall",
/*.desc */ "PortAudio Call",
/*.function */ place_call,
+ /*.syntax */ NULL,
/*.next */ &channel_hup_interface
};
/*.interface_name */ "jsrun",
/*.desc */ "run a script",
/*.function */ launch_async,
+ /*.syntax */ NULL,
/*.next */ NULL
};