]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add syntax field to the api interface struct.
authorMichael Jerris <mike@jerris.com>
Sun, 8 Oct 2006 05:04:34 +0000 (05:04 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 8 Oct 2006 05:04:34 +0000 (05:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3000 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs
src/dotnet/Module.cs
src/dotnet/Modules/Api.cs
src/include/switch_module_interfaces.h
src/mod/applications/mod_commands/mod_commands.c
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_dptools/mod_dptools.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

index fe84690312a2edfe86c6d568299a4386f0cc1ba8..950b83c908180d0be1acfb253fbde8126f7b5c70 100755 (executable)
@@ -42,7 +42,8 @@ namespace FreeSwitch.Marshaling.Types
         internal IntPtr      interface_name;
         //[MarshalAs(UnmanagedType.LPStr)]
         internal IntPtr      desc;
-        internal ApiFunction function;
+        internal ApiFunction function;\r
+        internal IntPtr      syntax;
         internal IntPtr      next;
     }
 }
index 59078eceddf75349037728957079f992096de412..b1f4f81394181d28de198d2464851d0071dd3b79 100644 (file)
@@ -130,6 +130,7 @@ namespace FreeSwitch
             /* 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
index 88b89634f1cd5a47215a4eb1b95d7edad39a5117..cacd6acbe76cf977ba2cd2c4437e0eeb0293d1fb 100755 (executable)
@@ -41,6 +41,7 @@ namespace FreeSwitch.Modules
     {\r
         private string name;\r
         private string description;\r
+        private string syntax;\r
         private ApiFunction apiFunction;\r
         public HandleRef handle;\r
 \r
@@ -56,6 +57,12 @@ namespace FreeSwitch.Modules
             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
index 703a982a9ba1cd1bcc0189d7ac863c7912d3ed48..d7df94948ee43ec8b3c00049ae35e7c3def3fb0d 100644 (file)
@@ -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;
 };
 
index 1444308ae78c1e9faa570fc04d6e7a5bd476b9a7..699e0b8b5e322cc8d82d1b3b82b1368535f6e395 100644 (file)
@@ -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
 };
 
index a957b0f5e9564b026e9903a087a43f3206cc16fd..e8675af6097a7bc6e61cb263bd8a2249f5c1364c 100644 (file)
@@ -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 */ 
 };
 
index 33b653818ea08b33bfcc61eb9aa8a1ce9b920667..710d5236fb3b51a7751d05b054040772329553ec 100644 (file)
@@ -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
 };
 
index 8ed278828586f4b81fb82d21687a99659d250add..753532ec5b49fb60dc93ef4ec32e2a222a703930 100644 (file)
@@ -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
 };
 
index 0b6660163bce6b680506b3b55895939ec53bda9a..983187269fb3e0b4ad07e42fa5bae393151557a1 100644 (file)
@@ -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
 };
 
index 179f11f3656e22727c98d38062cfed315afe830a..70aa0756d8a2d364bc4d88bf70a596eba0e788d7 100644 (file)
@@ -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
 };