diff --git a/src/dotnet/Makefile b/src/dotnet/Makefile index 07b0b92c6b..a3d06096e1 100644 --- a/src/dotnet/Makefile +++ b/src/dotnet/Makefile @@ -1,8 +1,8 @@ all: $(MODNAME).so $(MODNAME).so: - gmcs -debug -unsafe -t:library -keyfile:public.snk \ - -out:Freeswitch.dll -reference:Mono.Posix.dll \ + /usr/local/freeswitch/bin/gmcs -debug -unsafe -t:library -keyfile:public.snk \ + -out:FreeSwitch.dll -reference:Mono.Posix.dll \ Properties/AssemblyInfo.cs \ Marshaling/Types/ApiInterfaceMarshal.cs \ Marshaling/Types/ApplicationInterfaceMarshal.cs \ @@ -24,6 +24,7 @@ $(MODNAME).so: Marshaling/Types/IOEventHooksMarshal.cs \ Marshaling/Types/LoadableModuleInterfaceMarshal.cs \ Marshaling/Types/LoadableModuleMarshal.cs \ + Marshaling/Types/StreamHandleMarshal.cs \ Marshaling/Types/TypesMarshal.cs \ Marshaling/BufferMarshaler.cs \ Marshaling/CallerExtensionMarshaler.cs \ @@ -57,6 +58,8 @@ $(MODNAME).so: Types/ChannelTimetable.cs \ Types/CoreSession.cs \ Types/DtmfCallbackFunction.cs \ + Types/InputCallbackFunction.cs \ + Types/InputType.cs \ Types/Event.cs \ Types/FileHandle.cs \ Types/LoadableModule.cs \ @@ -67,12 +70,10 @@ $(MODNAME).so: Types/StreamHandle.cs \ Types/TextChannel.cs \ Common.cs \ - Core.cs \ - Ivr.cs \ Module.cs \ clean: rm -fr *.dll install: - cp -f Freeswitch.dll /usr/local/freeswitch/lib/ + cp -f FreeSwitch.dll /usr/local/freeswitch/lib/ diff --git a/src/dotnet/Marshaling/BufferMarshaler.cs b/src/dotnet/Marshaling/BufferMarshaler.cs index 4cde49d9f9..ad474d9e06 100755 --- a/src/dotnet/Marshaling/BufferMarshaler.cs +++ b/src/dotnet/Marshaling/BufferMarshaler.cs @@ -31,10 +31,10 @@ */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling.Types; -using FreeSwitch.NET.Types; +using FreeSwitch.Marshaling.Types; +using FreeSwitch.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class BufferMarshaler : ICustomMarshaler { @@ -60,14 +60,14 @@ namespace FreeSwitch.NET.Marshaling public IntPtr MarshalManagedToNative(object obj) { - FreeSwitch.NET.Types.Buffer buffer = (FreeSwitch.NET.Types.Buffer)obj; + FreeSwitch.Types.Buffer buffer = (FreeSwitch.Types.Buffer)obj; return buffer.marshaledObject.Handle; } public object MarshalNativeToManaged(IntPtr bufferPtr) { - FreeSwitch.NET.Types.Buffer buffer = new FreeSwitch.NET.Types.Buffer(); + FreeSwitch.Types.Buffer buffer = new FreeSwitch.Types.Buffer(); BufferMarshal bufferMarshal = new BufferMarshal(); Marshal.PtrToStructure(bufferPtr, bufferMarshal); diff --git a/src/dotnet/Marshaling/CallerExtensionMarshaler.cs b/src/dotnet/Marshaling/CallerExtensionMarshaler.cs index e3d9c28dad..ef555f34c8 100755 --- a/src/dotnet/Marshaling/CallerExtensionMarshaler.cs +++ b/src/dotnet/Marshaling/CallerExtensionMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallerExtensionMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallerExtensionMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class CallerExtensionMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/CallerProfileMarshaler.cs b/src/dotnet/Marshaling/CallerProfileMarshaler.cs index a8eadedca2..a97fadc570 100755 --- a/src/dotnet/Marshaling/CallerProfileMarshaler.cs +++ b/src/dotnet/Marshaling/CallerProfileMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallerProfileMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallerProfileMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class CallerProfileMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/ChannelMarshaler.cs b/src/dotnet/Marshaling/ChannelMarshaler.cs index f72e59ef26..c9e32e7291 100755 --- a/src/dotnet/Marshaling/ChannelMarshaler.cs +++ b/src/dotnet/Marshaling/ChannelMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * ChannelMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * ChannelMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class ChannelMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs b/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs index a05456d05e..a652d4b0b3 100755 --- a/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs +++ b/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * ChannelTimetableMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * ChannelTimetableMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class ChannelTimetableMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/CoreSessionMarshaler.cs b/src/dotnet/Marshaling/CoreSessionMarshaler.cs index 29e1fd8dae..981b15a1ff 100755 --- a/src/dotnet/Marshaling/CoreSessionMarshaler.cs +++ b/src/dotnet/Marshaling/CoreSessionMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CoreSessionMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CoreSessionMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class CoreSessionMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/EventMarshaler.cs b/src/dotnet/Marshaling/EventMarshaler.cs index c23f7a56d3..0356ff2d97 100755 --- a/src/dotnet/Marshaling/EventMarshaler.cs +++ b/src/dotnet/Marshaling/EventMarshaler.cs @@ -1,41 +1,41 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * EventMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * EventMarshaler.cs -- + * */ using System; using System.Collections; -using FreeSwitch.NET.Marshaling.Types; -using FreeSwitch.NET.Types; +using FreeSwitch.Marshaling.Types; +using FreeSwitch.Types; using System.Runtime.InteropServices; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class EventMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/FileHandleMarshaler.cs b/src/dotnet/Marshaling/FileHandleMarshaler.cs index 1c432aa7ce..09ea148e79 100755 --- a/src/dotnet/Marshaling/FileHandleMarshaler.cs +++ b/src/dotnet/Marshaling/FileHandleMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * FileHandleMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * FileHandleMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class FileHandleMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/MemoryPoolMarshaler.cs b/src/dotnet/Marshaling/MemoryPoolMarshaler.cs index c71e72d036..66a274eba7 100755 --- a/src/dotnet/Marshaling/MemoryPoolMarshaler.cs +++ b/src/dotnet/Marshaling/MemoryPoolMarshaler.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * MemoryPoolMarshaler.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * MemoryPoolMarshaler.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class MemoryPoolMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/StreamHandleMarshaler.cs b/src/dotnet/Marshaling/StreamHandleMarshaler.cs index cd44856315..fd4fefd051 100755 --- a/src/dotnet/Marshaling/StreamHandleMarshaler.cs +++ b/src/dotnet/Marshaling/StreamHandleMarshaler.cs @@ -31,11 +31,11 @@ */ using System; using System.Collections; -using FreeSwitch.NET.Marshaling.Types; -using FreeSwitch.NET.Types; +using FreeSwitch.Marshaling.Types; +using FreeSwitch.Types; using System.Runtime.InteropServices; -namespace FreeSwitch.NET.Marshaling +namespace FreeSwitch.Marshaling { class StreamHandleMarshaler : ICustomMarshaler { diff --git a/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs b/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs index 33bad12fe5..fe84690312 100755 --- a/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs +++ b/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs @@ -28,21 +28,21 @@ * * ApiInterfaceMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class ApiInterfaceMarshal - { - //[MarshalAs(UnmanagedType.LPStr)] - internal IntPtr interface_name; - //[MarshalAs(UnmanagedType.LPStr)] - internal IntPtr desc; - internal ApiFunction function; - internal IntPtr next; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class ApiInterfaceMarshal + { + //[MarshalAs(UnmanagedType.LPStr)] + internal IntPtr interface_name; + //[MarshalAs(UnmanagedType.LPStr)] + internal IntPtr desc; + internal ApiFunction function; + internal IntPtr next; + } +} diff --git a/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs b/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs index 4c09cc3acf..3807ee466d 100755 --- a/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs +++ b/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs @@ -28,25 +28,25 @@ * * ApplicationInterfaceMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class ApplicationInterfaceMarshal - { - // [MarshalAs(UnmanagedType.LPStr)] - internal IntPtr interface_name; - internal ApplicationFunction application_function; - // [MarshalAs(UnmanagedType.LPStr)] - internal IntPtr long_desc; - //[MarshalAs(UnmanagedType.LPStr)] - internal IntPtr short_desc; - //[MarshalAs(UnmanagedType.LPStr)] - internal IntPtr syntax; - internal IntPtr next; - } + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class ApplicationInterfaceMarshal + { + // [MarshalAs(UnmanagedType.LPStr)] + internal IntPtr interface_name; + internal ApplicationFunction application_function; + // [MarshalAs(UnmanagedType.LPStr)] + internal IntPtr long_desc; + //[MarshalAs(UnmanagedType.LPStr)] + internal IntPtr short_desc; + //[MarshalAs(UnmanagedType.LPStr)] + internal IntPtr syntax; + internal IntPtr next; + } } \ No newline at end of file diff --git a/src/dotnet/Marshaling/Types/BufferMarshal.cs b/src/dotnet/Marshaling/Types/BufferMarshal.cs index 4b91216b08..09a3cddf82 100755 --- a/src/dotnet/Marshaling/Types/BufferMarshal.cs +++ b/src/dotnet/Marshaling/Types/BufferMarshal.cs @@ -28,19 +28,19 @@ * * BufferMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class BufferMarshal - { - [MarshalAs(UnmanagedType.LPStr)] - internal string data; - internal int used; - internal int datalen; - internal UInt32 id; - } -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class BufferMarshal + { + [MarshalAs(UnmanagedType.LPStr)] + internal string data; + internal int used; + internal int datalen; + internal UInt32 id; + } +} diff --git a/src/dotnet/Marshaling/Types/CallerExtensionMarshal.cs b/src/dotnet/Marshaling/Types/CallerExtensionMarshal.cs index 1d1fb6fc1e..09d2f535ce 100755 --- a/src/dotnet/Marshaling/Types/CallerExtensionMarshal.cs +++ b/src/dotnet/Marshaling/Types/CallerExtensionMarshal.cs @@ -28,19 +28,19 @@ * * CallerExtensionMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class CallerExtensionMarshal - { - internal IntPtr extension_name; - internal IntPtr extension_number; - internal IntPtr current_application; - internal IntPtr last_application; - internal IntPtr applications; - } -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class CallerExtensionMarshal + { + internal IntPtr extension_name; + internal IntPtr extension_number; + internal IntPtr current_application; + internal IntPtr last_application; + internal IntPtr applications; + } +} diff --git a/src/dotnet/Marshaling/Types/CallerProfileMarshal.cs b/src/dotnet/Marshaling/Types/CallerProfileMarshal.cs index 829c2cffc7..2e2709d384 100755 --- a/src/dotnet/Marshaling/Types/CallerProfileMarshal.cs +++ b/src/dotnet/Marshaling/Types/CallerProfileMarshal.cs @@ -1,38 +1,38 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallerProfileMarshal.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallerProfileMarshal.cs -- + * */ using System; using System.Runtime.InteropServices; -namespace FreeSwitch.NET.Marshaling.Types +namespace FreeSwitch.Marshaling.Types { [StructLayout(LayoutKind.Sequential)] internal class CallerProfileMarshal diff --git a/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs b/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs index eeb6c79b8b..60ec8b72f9 100755 --- a/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs +++ b/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs @@ -28,19 +28,19 @@ * * ChannelFlagMarshal.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Marshaling.Types -{ - internal enum ChannelFlagMarshal - { - CF_SEND_AUDIO, - CF_RECV_AUDIO, - CF_ANSWERED, - CF_OUTBOUND, - CF_EARLY_MEDIA, - CF_ORIGINATOR, - CF_TRANSFER - } -} + */ +using System; + +namespace FreeSwitch.Marshaling.Types +{ + internal enum ChannelFlagMarshal + { + CF_SEND_AUDIO, + CF_RECV_AUDIO, + CF_ANSWERED, + CF_OUTBOUND, + CF_EARLY_MEDIA, + CF_ORIGINATOR, + CF_TRANSFER + } +} diff --git a/src/dotnet/Marshaling/Types/ChannelMarshal.cs b/src/dotnet/Marshaling/Types/ChannelMarshal.cs index 43d7db61d9..5d9b46e159 100755 --- a/src/dotnet/Marshaling/Types/ChannelMarshal.cs +++ b/src/dotnet/Marshaling/Types/ChannelMarshal.cs @@ -1,39 +1,39 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * ChannelMarshal.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * ChannelMarshal.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; +using FreeSwitch.Types; -namespace FreeSwitch.NET.Marshaling.Types +namespace FreeSwitch.Marshaling.Types { [StructLayout(LayoutKind.Sequential)] internal class ChannelMarshal diff --git a/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs b/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs index 543f16cd5d..32608d400f 100755 --- a/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs +++ b/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs @@ -28,20 +28,20 @@ * * ChannelStateMarshal.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Marshaling.Types -{ - internal enum ChannelStateMarshal - { - CS_NEW, - CS_INIT, - CS_RING, - CS_TRANSMIT, - CS_EXECUTE, - CS_LOOPBACK, - CS_HANGUP, - CS_DONE - } -} + */ +using System; + +namespace FreeSwitch.Marshaling.Types +{ + internal enum ChannelStateMarshal + { + CS_NEW, + CS_INIT, + CS_RING, + CS_TRANSMIT, + CS_EXECUTE, + CS_LOOPBACK, + CS_HANGUP, + CS_DONE + } +} diff --git a/src/dotnet/Marshaling/Types/ChannelTimetableMarshal.cs b/src/dotnet/Marshaling/Types/ChannelTimetableMarshal.cs index 088c7d75a8..ec503623a6 100755 --- a/src/dotnet/Marshaling/Types/ChannelTimetableMarshal.cs +++ b/src/dotnet/Marshaling/Types/ChannelTimetableMarshal.cs @@ -28,17 +28,17 @@ * * ChannelTimetableMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class ChannelTimetableMarshal - { - internal Int64 created; - internal Int64 answered; - internal Int64 hungup; - } -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class ChannelTimetableMarshal + { + internal Int64 created; + internal Int64 answered; + internal Int64 hungup; + } +} diff --git a/src/dotnet/Marshaling/Types/CodecImplementationMarshal.cs b/src/dotnet/Marshaling/Types/CodecImplementationMarshal.cs index f8cce868e3..242f67aaa8 100755 --- a/src/dotnet/Marshaling/Types/CodecImplementationMarshal.cs +++ b/src/dotnet/Marshaling/Types/CodecImplementationMarshal.cs @@ -28,27 +28,27 @@ * * CodecImplementationMarshal.cs -- * - */ -using System; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - internal class CodecImplementationMarshal - { - internal UInt32 samples_per_seconds; - internal int bits_per_second; - internal int microseconds_per_frame; - internal UInt32 samples_per_frame; - internal UInt32 bytes_per_frame; - internal UInt32 encoded_bytes_per_frame; - internal Byte number_of_channels; - internal int pref_frames_per_packet; - internal int max_frames_per_packet; - //internal CodecInitMarshal init; - //internal CodecEncodeMarshal encode; - //internal CodecDecode decode; - //internal CodecDestroy destroy; - internal IntPtr next; - } -} + */ +using System; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + internal class CodecImplementationMarshal + { + internal UInt32 samples_per_seconds; + internal int bits_per_second; + internal int microseconds_per_frame; + internal UInt32 samples_per_frame; + internal UInt32 bytes_per_frame; + internal UInt32 encoded_bytes_per_frame; + internal Byte number_of_channels; + internal int pref_frames_per_packet; + internal int max_frames_per_packet; + //internal CodecInitMarshal init; + //internal CodecEncodeMarshal encode; + //internal CodecDecode decode; + //internal CodecDestroy destroy; + internal IntPtr next; + } +} diff --git a/src/dotnet/Marshaling/Types/CodecInterfaceMarshal.cs b/src/dotnet/Marshaling/Types/CodecInterfaceMarshal.cs index 9494c4ddfe..b05e83d6bb 100755 --- a/src/dotnet/Marshaling/Types/CodecInterfaceMarshal.cs +++ b/src/dotnet/Marshaling/Types/CodecInterfaceMarshal.cs @@ -28,36 +28,36 @@ * * CodecInterfaceMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class CodecInterfaceMarshal - { - [MarshalAs(UnmanagedType.LPStr)] - internal string interface_name; - /* - internal CodecImplementation application_function; - [MarshalAs(UnmanagedType.LPStr)] - internal string long_desc; - [MarshalAs(UnmanagedType.LPStr)] - internal string short_desc; - [MarshalAs(UnmanagedType.LPStr)] - internal string syntax; - internal IntPtr next; -} - - + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class CodecInterfaceMarshal + { + [MarshalAs(UnmanagedType.LPStr)] + internal string interface_name; + /* + internal CodecImplementation application_function; + [MarshalAs(UnmanagedType.LPStr)] + internal string long_desc; + [MarshalAs(UnmanagedType.LPStr)] + internal string short_desc; + [MarshalAs(UnmanagedType.LPStr)] + internal string syntax; + internal IntPtr next; +} + + struct switch_codec_interface { ! the name of the interface const char *interface_name; ! a list of codec implementations related to the codec const switch_codec_implementation_t *implementations; const struct switch_codec_interface *next; -};*/ - } +};*/ + } } \ No newline at end of file diff --git a/src/dotnet/Marshaling/Types/CodecMarshal.cs b/src/dotnet/Marshaling/Types/CodecMarshal.cs index 9c1e62a402..065a9fb744 100755 --- a/src/dotnet/Marshaling/Types/CodecMarshal.cs +++ b/src/dotnet/Marshaling/Types/CodecMarshal.cs @@ -28,19 +28,19 @@ * * CodecMarshal.cs -- * - */ -using System; -using System.Text; - -namespace FreeSwitch.NET.Marshaling.Types -{ - internal class CodecMarshal - { - internal IntPtr codec_interface; - internal IntPtr implementation; - //internal CodecSettingsMarshal codec_settings; - internal UInt32 flags; - //internal MemoryPoolMarshal memory_pool; - internal IntPtr private_info; - } -} + */ +using System; +using System.Text; + +namespace FreeSwitch.Marshaling.Types +{ + internal class CodecMarshal + { + internal IntPtr codec_interface; + internal IntPtr implementation; + //internal CodecSettingsMarshal codec_settings; + internal UInt32 flags; + //internal MemoryPoolMarshal memory_pool; + internal IntPtr private_info; + } +} diff --git a/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs b/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs index e8df17012e..1faa480bf1 100755 --- a/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs +++ b/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs @@ -28,16 +28,16 @@ * * CodecTypeMarshal.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Marshaling.Types -{ - internal enum CodecTypesMarshal - { - SWITCH_CODEC_TYPE_AUDIO, - SWITCH_CODEC_TYPE_VIDEO, - SWITCH_CODEC_TYPE_T38, - SWITCH_CODEC_TYPE_APP - } -} + */ +using System; + +namespace FreeSwitch.Marshaling.Types +{ + internal enum CodecTypesMarshal + { + SWITCH_CODEC_TYPE_AUDIO, + SWITCH_CODEC_TYPE_VIDEO, + SWITCH_CODEC_TYPE_T38, + SWITCH_CODEC_TYPE_APP + } +} diff --git a/src/dotnet/Marshaling/Types/CoreSessionMarshal.cs b/src/dotnet/Marshaling/Types/CoreSessionMarshal.cs index 0011c801a1..4a351beed2 100755 --- a/src/dotnet/Marshaling/Types/CoreSessionMarshal.cs +++ b/src/dotnet/Marshaling/Types/CoreSessionMarshal.cs @@ -28,41 +28,41 @@ * * CoreSessionMarshal.cs -- * - */ -using System; -using System.Text; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential, Pack=1)] - internal class CoreSessionMarshal - { - internal UInt32 id; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=80)] - internal byte[] name; - internal int thread_running; - internal IntPtr pool; - internal IntPtr channel; - internal IntPtr thread; - internal IntPtr endpoint_interface; - internal IOEventHooksMarshal event_hooks; - internal IntPtr read_codec; - internal IntPtr write_codec; - internal IntPtr raw_write_buffer; - internal FrameMarshal raw_write_frame; - internal FrameMarshal enc_write_frame; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] - internal byte[] raw_write_buf; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] - internal byte[] enc_write_buf; - internal IntPtr raw_read_buffer; - internal FrameMarshal raw_read_frame; - internal FrameMarshal enc_read_frame; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] - internal byte[] raw_read_buf; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] - internal byte[] enc_read_buf; + */ +using System; +using System.Text; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential, Pack=1)] + internal class CoreSessionMarshal + { + internal UInt32 id; + [MarshalAs(UnmanagedType.ByValArray, SizeConst=80)] + internal byte[] name; + internal int thread_running; + internal IntPtr pool; + internal IntPtr channel; + internal IntPtr thread; + internal IntPtr endpoint_interface; + internal IOEventHooksMarshal event_hooks; + internal IntPtr read_codec; + internal IntPtr write_codec; + internal IntPtr raw_write_buffer; + internal FrameMarshal raw_write_frame; + internal FrameMarshal enc_write_frame; + [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] + internal byte[] raw_write_buf; + [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] + internal byte[] enc_write_buf; + internal IntPtr raw_read_buffer; + internal FrameMarshal raw_read_frame; + internal FrameMarshal enc_read_frame; + [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] + internal byte[] raw_read_buf; + [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] + internal byte[] enc_read_buf; internal IntPtr read_resampler; internal IntPtr write_resampler; internal IntPtr mutex; @@ -73,8 +73,8 @@ namespace FreeSwitch.NET.Marshaling.Types internal int stream_count; /* 36 + 1 char string, but need to grab 40 bytes */ [MarshalAs(UnmanagedType.ByValArray, SizeConst=40)] - internal byte[] uuid_str; + internal byte[] uuid_str; internal IntPtr private_info; internal IntPtr event_queue; - } -} + } +} diff --git a/src/dotnet/Marshaling/Types/EventMarshal.cs b/src/dotnet/Marshaling/Types/EventMarshal.cs index e8d8b1db40..03a46de690 100755 --- a/src/dotnet/Marshaling/Types/EventMarshal.cs +++ b/src/dotnet/Marshaling/Types/EventMarshal.cs @@ -28,32 +28,32 @@ * * EventMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class EventMarshal - { - internal EventType event_id; - internal Priority priority; - internal IntPtr owner; - internal IntPtr subclass; - internal IntPtr headers; - internal IntPtr body; - internal IntPtr bind_user_data; - internal IntPtr event_user_data; - internal IntPtr next; - } - - [StructLayout(LayoutKind.Sequential)] - internal class EventHeaderMarshal - { - internal string name; - internal string value; - internal IntPtr next; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class EventMarshal + { + internal EventType event_id; + internal Priority priority; + internal IntPtr owner; + internal IntPtr subclass; + internal IntPtr headers; + internal IntPtr body; + internal IntPtr bind_user_data; + internal IntPtr event_user_data; + internal IntPtr next; + } + + [StructLayout(LayoutKind.Sequential)] + internal class EventHeaderMarshal + { + internal string name; + internal string value; + internal IntPtr next; + } +} diff --git a/src/dotnet/Marshaling/Types/FileHandleMarshal.cs b/src/dotnet/Marshaling/Types/FileHandleMarshal.cs index 2a0e5a78de..9cf0ee0f00 100755 --- a/src/dotnet/Marshaling/Types/FileHandleMarshal.cs +++ b/src/dotnet/Marshaling/Types/FileHandleMarshal.cs @@ -28,30 +28,30 @@ * * FileHandleMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class FileHandleMarshal - { - internal IntPtr file_interface; - internal UInt32 flags; - internal IntPtr fd; - internal uint samples; - internal UInt32 samplerate; - internal Byte channels; - internal uint format; - internal uint sections; - internal int seekable; - internal uint sample_count; - internal int speed; - internal IntPtr memory_pool; - internal IntPtr private_info; - internal Int64 pos; - internal IntPtr audio_buffer; - } - -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class FileHandleMarshal + { + internal IntPtr file_interface; + internal UInt32 flags; + internal IntPtr fd; + internal uint samples; + internal UInt32 samplerate; + internal Byte channels; + internal uint format; + internal uint sections; + internal int seekable; + internal uint sample_count; + internal int speed; + internal IntPtr memory_pool; + internal IntPtr private_info; + internal Int64 pos; + internal IntPtr audio_buffer; + } + +} diff --git a/src/dotnet/Marshaling/Types/FrameMarshal.cs b/src/dotnet/Marshaling/Types/FrameMarshal.cs index 37cd6696a1..7068b08088 100755 --- a/src/dotnet/Marshaling/Types/FrameMarshal.cs +++ b/src/dotnet/Marshaling/Types/FrameMarshal.cs @@ -28,27 +28,27 @@ * * FrameMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class FrameMarshal - { - internal IntPtr codec; - internal IntPtr source; - internal IntPtr packet; - internal UInt32 packetlen; - internal IntPtr data; - internal UInt32 datalen; - internal UInt32 buflen; - internal UInt32 samples; - internal UInt32 rate; - internal byte payload; - internal UInt32 timestamp; - internal byte flags; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class FrameMarshal + { + internal IntPtr codec; + internal IntPtr source; + internal IntPtr packet; + internal UInt32 packetlen; + internal IntPtr data; + internal UInt32 datalen; + internal UInt32 buflen; + internal UInt32 samples; + internal UInt32 rate; + internal byte payload; + internal UInt32 timestamp; + internal byte flags; + } +} diff --git a/src/dotnet/Marshaling/Types/IOEventHooksMarshal.cs b/src/dotnet/Marshaling/Types/IOEventHooksMarshal.cs index 8e23640c51..fc4de1cc66 100755 --- a/src/dotnet/Marshaling/Types/IOEventHooksMarshal.cs +++ b/src/dotnet/Marshaling/Types/IOEventHooksMarshal.cs @@ -28,24 +28,24 @@ * * IOEventHooksMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class IOEventHooksMarshal - { - internal IntPtr outgoing_channel; - internal IntPtr answer_channel; - internal IntPtr receive_message; - internal IntPtr receive_event; - internal IntPtr read_frame; - internal IntPtr write_frame; - internal IntPtr kill_channel; - internal IntPtr waitfor_read; - internal IntPtr waitfor_write; - internal IntPtr send_dtmf; - } -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class IOEventHooksMarshal + { + internal IntPtr outgoing_channel; + internal IntPtr answer_channel; + internal IntPtr receive_message; + internal IntPtr receive_event; + internal IntPtr read_frame; + internal IntPtr write_frame; + internal IntPtr kill_channel; + internal IntPtr waitfor_read; + internal IntPtr waitfor_write; + internal IntPtr send_dtmf; + } +} diff --git a/src/dotnet/Marshaling/Types/LoadableModuleInterfaceMarshal.cs b/src/dotnet/Marshaling/Types/LoadableModuleInterfaceMarshal.cs index 4a3949f9cd..ccc2db3d12 100755 --- a/src/dotnet/Marshaling/Types/LoadableModuleInterfaceMarshal.cs +++ b/src/dotnet/Marshaling/Types/LoadableModuleInterfaceMarshal.cs @@ -28,25 +28,25 @@ * * LoadableModuleInterfaceMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class LoadableModuleInterfaceMarshal - { - internal IntPtr module_name; - internal IntPtr endpoint_interface; - internal IntPtr timer_interface; - internal IntPtr dialplan_interface; - internal IntPtr codec_interface; - internal IntPtr application_interface; - internal IntPtr api_interface; - internal IntPtr file_interface; - internal IntPtr speech_interface; - internal IntPtr directory_interface; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class LoadableModuleInterfaceMarshal + { + internal IntPtr module_name; + internal IntPtr endpoint_interface; + internal IntPtr timer_interface; + internal IntPtr dialplan_interface; + internal IntPtr codec_interface; + internal IntPtr application_interface; + internal IntPtr api_interface; + internal IntPtr file_interface; + internal IntPtr speech_interface; + internal IntPtr directory_interface; + } +} diff --git a/src/dotnet/Marshaling/Types/LoadableModuleMarshal.cs b/src/dotnet/Marshaling/Types/LoadableModuleMarshal.cs index 14e848fb1d..c0485055b2 100755 --- a/src/dotnet/Marshaling/Types/LoadableModuleMarshal.cs +++ b/src/dotnet/Marshaling/Types/LoadableModuleMarshal.cs @@ -28,27 +28,27 @@ * * LoadableModuleMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - - - [StructLayout(LayoutKind.Sequential)] - public class LoadableModuleMarshal - { - public IntPtr filename; - public IntPtr module_interface; - public IntPtr lib; - public ModuleLoad module_load; - public ModuleReload module_reload; - public ModulePause module_pause; - public ModuleResume module_resume; - public ModuleStatus module_status; - public ModuleRuntime module_runtime; - public ModuleShutdown module_shutdown; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + + + [StructLayout(LayoutKind.Sequential)] + public class LoadableModuleMarshal + { + public IntPtr filename; + public IntPtr module_interface; + public IntPtr lib; + public ModuleLoad module_load; + public ModuleReload module_reload; + public ModulePause module_pause; + public ModuleResume module_resume; + public ModuleStatus module_status; + public ModuleRuntime module_runtime; + public ModuleShutdown module_shutdown; + } +} diff --git a/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs b/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs index 29f73e17e1..33878cc8f7 100755 --- a/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs +++ b/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs @@ -28,21 +28,21 @@ * * StreamHandleMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class StreamHandleMarshal - { - internal IntPtr write_function; - internal IntPtr data; - internal IntPtr end; - internal int data_size; - internal int data_len; - internal IntPtr _event; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + [StructLayout(LayoutKind.Sequential)] + internal class StreamHandleMarshal + { + internal IntPtr write_function; + internal IntPtr data; + internal IntPtr end; + internal int data_size; + internal int data_len; + internal IntPtr _event; + } +} diff --git a/src/dotnet/Marshaling/Types/TypesMarshal.cs b/src/dotnet/Marshaling/Types/TypesMarshal.cs index 8aadcbcd5f..0b6ebf147a 100755 --- a/src/dotnet/Marshaling/Types/TypesMarshal.cs +++ b/src/dotnet/Marshaling/Types/TypesMarshal.cs @@ -28,18 +28,18 @@ * * TypesMarshal.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; - -namespace FreeSwitch.NET.Marshaling.Types -{ - public delegate - Status DtmfCallbackFunctionMarshal( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] - CoreSession session, - string dtmf, - IntPtr buf, - uint buflen); -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Types; + +namespace FreeSwitch.Marshaling.Types +{ + public delegate + Status DtmfCallbackFunctionMarshal( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] + CoreSession session, + string dtmf, + IntPtr buf, + uint buflen); +} diff --git a/src/dotnet/Module.cs b/src/dotnet/Module.cs index c195c7e279..4c649bfa65 100644 --- a/src/dotnet/Module.cs +++ b/src/dotnet/Module.cs @@ -1,50 +1,50 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Module.cs -- - * - */ +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Module.cs -- + * + */ using System; using System.Collections; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using FreeSwitch.NET; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Modules; -using FreeSwitch.NET.Marshaling.Types; - -namespace FreeSwitch.NET -{ +using FreeSwitch.Types; +using FreeSwitch.Modules; +using FreeSwitch.Marshaling.Types; + +namespace FreeSwitch.NET +{ /// /// Base class for all Freeswitch.NET modules - /// - /// + /// + /// /// public class Example : Module /// { /// public Example() @@ -54,9 +54,9 @@ namespace FreeSwitch.NET /// /// Register(); /// } - /// } - /// - public class Module + /// } + /// + public class Module { private LoadableModuleInterfaceMarshal module_interface = new LoadableModuleInterfaceMarshal(); private LoadableModuleMarshal module = new LoadableModuleMarshal(); @@ -71,19 +71,19 @@ namespace FreeSwitch.NET /// /// Module constructor /// - public Module() + public Module() { - Console.WriteLine("*** Creating new module object"); - - load = new ModuleLoad(Load); - } - + Console.WriteLine("*** Creating new module object"); + + load = new ModuleLoad(Load); + } + /// /// Implementation of ModuleLoad Delegate /// /// /// - /// + /// public Status Load(ref IntPtr module, string name) { /* Allocate some unmanaged mem for the ModuleInterface */ @@ -110,13 +110,13 @@ namespace FreeSwitch.NET Marshal.StructureToPtr(module_interface, module, true); return Status.Success; - } - + } + /// /// AddApiInterface /// - /// - public void AddApiInterface(Api apiInterface) + /// + public void AddApiInterface(Api apiInterface) { /* Create a new ApiInterface type and allocate unmanaged mem */ ApiInterfaceMarshal apiInterfaceMarshal = new ApiInterfaceMarshal(); @@ -185,21 +185,21 @@ namespace FreeSwitch.NET /* Finally, add our new interface to the array */ applicationInterfaces.Add(applicationInterface); - } - + } + /// /// Register - /// - public void Register() + /// + public void Register() { module.module_load = new ModuleLoad(Load); - Switch.switch_loadable_module_build_dynamic(filename, - module.module_load, - module.module_runtime, - module.module_shutdown); + Switch.switch_loadable_module_build_dynamic(filename, + module.module_load, + module.module_runtime, + module.module_shutdown); } - - } -} + + } +} diff --git a/src/dotnet/Modules/Api.cs b/src/dotnet/Modules/Api.cs index 36aea931b6..88b89634f1 100755 --- a/src/dotnet/Modules/Api.cs +++ b/src/dotnet/Modules/Api.cs @@ -1,41 +1,41 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Api.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Api.cs -- + * */ using System; using System.Collections; using System.Text; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; +using FreeSwitch.Types; -namespace FreeSwitch.NET.Modules +namespace FreeSwitch.Modules { public class Api { diff --git a/src/dotnet/Modules/Application.cs b/src/dotnet/Modules/Application.cs index 045e10c8ed..9df61154db 100755 --- a/src/dotnet/Modules/Application.cs +++ b/src/dotnet/Modules/Application.cs @@ -1,43 +1,43 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Application.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Application.cs -- + * */ using System; using System.Collections; using System.Text; using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Marshaling; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Modules +namespace FreeSwitch.Modules { public class Application { diff --git a/src/dotnet/Switch/CallerProfile.cs b/src/dotnet/Switch/CallerProfile.cs index 6003d34ed2..8b02007386 100755 --- a/src/dotnet/Switch/CallerProfile.cs +++ b/src/dotnet/Switch/CallerProfile.cs @@ -1,42 +1,42 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallerProfile.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallerProfile.cs -- + * */ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET +namespace FreeSwitch { public partial class Switch { diff --git a/src/dotnet/Switch/Channel.cs b/src/dotnet/Switch/Channel.cs index 7b695c89e1..124ef36907 100755 --- a/src/dotnet/Switch/Channel.cs +++ b/src/dotnet/Switch/Channel.cs @@ -1,41 +1,41 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Channel.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Channel.cs -- + * */ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling; +using FreeSwitch.Types; +using FreeSwitch.Marshaling; -namespace FreeSwitch.NET +namespace FreeSwitch { public partial class Switch { @@ -60,14 +60,14 @@ namespace FreeSwitch.NET [DllImport("freeswitch")] public extern static - ChannelState switch_channel_perform_hangup( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel, - [MarshalAs(UnmanagedType.LPStr)] - string file, - [MarshalAs(UnmanagedType.LPStr)] - string func, - int line, + ChannelState switch_channel_perform_hangup( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] + Channel channel, + [MarshalAs(UnmanagedType.LPStr)] + string file, + [MarshalAs(UnmanagedType.LPStr)] + string func, + int line, CallCause hangup_cause); [DllImport("freeswitch")] diff --git a/src/dotnet/Switch/Console.cs b/src/dotnet/Switch/Console.cs index 58d40fbc15..f53ef7a2d8 100644 --- a/src/dotnet/Switch/Console.cs +++ b/src/dotnet/Switch/Console.cs @@ -34,7 +34,7 @@ using System.Runtime.CompilerServices; using System.Diagnostics; using System.Text; -namespace FreeSwitch.NET +namespace FreeSwitch { public partial class Switch { diff --git a/src/dotnet/Switch/CoreSession.cs b/src/dotnet/Switch/CoreSession.cs index 6130cafc47..42e4d6551b 100755 --- a/src/dotnet/Switch/CoreSession.cs +++ b/src/dotnet/Switch/CoreSession.cs @@ -1,41 +1,41 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CoreSession.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CoreSession.cs -- + * */ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling; +using FreeSwitch.Types; +using FreeSwitch.Marshaling; -namespace FreeSwitch.NET +namespace FreeSwitch { public partial class Switch { diff --git a/src/dotnet/Switch/Ivr.cs b/src/dotnet/Switch/Ivr.cs index 33219b5871..62aaf67129 100755 --- a/src/dotnet/Switch/Ivr.cs +++ b/src/dotnet/Switch/Ivr.cs @@ -1,42 +1,42 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Ivr.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Ivr.cs -- + * */ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET +namespace FreeSwitch { public partial class Switch { diff --git a/src/dotnet/Switch/LoadableModule.cs b/src/dotnet/Switch/LoadableModule.cs index 60bcbda57d..f67e4673f9 100755 --- a/src/dotnet/Switch/LoadableModule.cs +++ b/src/dotnet/Switch/LoadableModule.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * LoadableModule.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * LoadableModule.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET +namespace FreeSwitch { /* * SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname) diff --git a/src/dotnet/Switch/StreamHandle.cs b/src/dotnet/Switch/StreamHandle.cs index fa1315a245..0f8a4ea384 100755 --- a/src/dotnet/Switch/StreamHandle.cs +++ b/src/dotnet/Switch/StreamHandle.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * LoadableModule.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * LoadableModule.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Types; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET +namespace FreeSwitch { /* * SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname) diff --git a/src/dotnet/Types/ApplicationFunction.cs b/src/dotnet/Types/ApplicationFunction.cs index c3f7fd5b67..a50b042e2c 100755 --- a/src/dotnet/Types/ApplicationFunction.cs +++ b/src/dotnet/Types/ApplicationFunction.cs @@ -28,10 +28,10 @@ * * ApplicationFunction.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - -} + */ +using System; + +namespace FreeSwitch.Types +{ + +} diff --git a/src/dotnet/Types/ApplicationInterface.cs b/src/dotnet/Types/ApplicationInterface.cs index 91a49a6f4b..0d0b1eb12c 100755 --- a/src/dotnet/Types/ApplicationInterface.cs +++ b/src/dotnet/Types/ApplicationInterface.cs @@ -34,7 +34,7 @@ using System.Collections; using System.Runtime.InteropServices; using System.Text; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { /* public class ApplicationInterface diff --git a/src/dotnet/Types/Buffer.cs b/src/dotnet/Types/Buffer.cs index cd7a755531..9921f2e001 100755 --- a/src/dotnet/Types/Buffer.cs +++ b/src/dotnet/Types/Buffer.cs @@ -28,29 +28,29 @@ * * Buffer.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Types -{ - public class Buffer - { - internal HandleRef marshaledObject; - - public string Data - { - get { throw new NotImplementedException(); } - } - - public int Used - { - get { throw new NotImplementedException(); } - } - - public int Length - { - get { throw new NotImplementedException(); } - } - } -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Types +{ + public class Buffer + { + internal HandleRef marshaledObject; + + public string Data + { + get { throw new NotImplementedException(); } + } + + public int Used + { + get { throw new NotImplementedException(); } + } + + public int Length + { + get { throw new NotImplementedException(); } + } + } +} diff --git a/src/dotnet/Types/CallCause.cs b/src/dotnet/Types/CallCause.cs index 274b92a0c1..d03832f0dc 100755 --- a/src/dotnet/Types/CallCause.cs +++ b/src/dotnet/Types/CallCause.cs @@ -1,37 +1,37 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallCause.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallCause.cs -- + * */ using System; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { public enum CallCause { diff --git a/src/dotnet/Types/CallerExtension.cs b/src/dotnet/Types/CallerExtension.cs index 79f07c8cb8..86c8a5e105 100755 --- a/src/dotnet/Types/CallerExtension.cs +++ b/src/dotnet/Types/CallerExtension.cs @@ -1,39 +1,39 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallerExtension.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallerExtension.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { public class CallerExtension { diff --git a/src/dotnet/Types/CallerProfile.cs b/src/dotnet/Types/CallerProfile.cs index bd114fccc0..6d69c05277 100755 --- a/src/dotnet/Types/CallerProfile.cs +++ b/src/dotnet/Types/CallerProfile.cs @@ -1,39 +1,39 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CallerProfile.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CallerProfile.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { public class CallerProfile { diff --git a/src/dotnet/Types/Channel.cs b/src/dotnet/Types/Channel.cs index 4f6baaebf3..ac9a9032d7 100755 --- a/src/dotnet/Types/Channel.cs +++ b/src/dotnet/Types/Channel.cs @@ -1,63 +1,63 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Channel.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Channel.cs -- + * */ using System; using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { /* - * char *name; - switch_buffer_t *dtmf_buffer; - switch_mutex_t *dtmf_mutex; - switch_mutex_t *flag_mutex; - switch_mutex_t *profile_mutex; - switch_core_session_t *session; - switch_channel_state_t state; - uint32_t flags; - switch_caller_profile_t *caller_profile; - switch_caller_profile_t *originator_caller_profile; - switch_caller_profile_t *originatee_caller_profile; - switch_caller_extension_t *caller_extension; - const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS]; - int state_handler_index; - switch_hash_t *variables; - switch_channel_timetable_t *times; - void *private_info; - switch_call_cause_t hangup_cause; - int freq; - int bits; - int channels; - int ms; + * char *name; + switch_buffer_t *dtmf_buffer; + switch_mutex_t *dtmf_mutex; + switch_mutex_t *flag_mutex; + switch_mutex_t *profile_mutex; + switch_core_session_t *session; + switch_channel_state_t state; + uint32_t flags; + switch_caller_profile_t *caller_profile; + switch_caller_profile_t *originator_caller_profile; + switch_caller_profile_t *originatee_caller_profile; + switch_caller_extension_t *caller_extension; + const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS]; + int state_handler_index; + switch_hash_t *variables; + switch_channel_timetable_t *times; + void *private_info; + switch_call_cause_t hangup_cause; + int freq; + int bits; + int channels; + int ms; int kbps; */ public class Channel diff --git a/src/dotnet/Types/ChannelFlag.cs b/src/dotnet/Types/ChannelFlag.cs index 78c9e64328..2e9ef55b1f 100755 --- a/src/dotnet/Types/ChannelFlag.cs +++ b/src/dotnet/Types/ChannelFlag.cs @@ -28,19 +28,19 @@ * * ChannelFlag.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - public enum ChannelFlag - { - CF_SEND_AUDIO, - CF_RECV_AUDIO, - CF_ANSWERED, - CF_OUTBOUND, - CF_EARLY_MEDIA, - CF_ORIGINATOR, - CF_TRANSFER - } -} + */ +using System; + +namespace FreeSwitch.Types +{ + public enum ChannelFlag + { + CF_SEND_AUDIO, + CF_RECV_AUDIO, + CF_ANSWERED, + CF_OUTBOUND, + CF_EARLY_MEDIA, + CF_ORIGINATOR, + CF_TRANSFER + } +} diff --git a/src/dotnet/Types/ChannelState.cs b/src/dotnet/Types/ChannelState.cs index 52e688707e..b07f3b505b 100755 --- a/src/dotnet/Types/ChannelState.cs +++ b/src/dotnet/Types/ChannelState.cs @@ -28,20 +28,20 @@ * * ChannelState.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - public enum ChannelState - { - CS_NEW, - CS_INIT, - CS_RING, - CS_TRANSMIT, - CS_EXECUTE, - CS_LOOPBACK, - CS_HANGUP, - CS_DONE - } -} + */ +using System; + +namespace FreeSwitch.Types +{ + public enum ChannelState + { + CS_NEW, + CS_INIT, + CS_RING, + CS_TRANSMIT, + CS_EXECUTE, + CS_LOOPBACK, + CS_HANGUP, + CS_DONE + } +} diff --git a/src/dotnet/Types/ChannelTimetable.cs b/src/dotnet/Types/ChannelTimetable.cs index 1e3cdcb0c7..ea7e4dbb5c 100755 --- a/src/dotnet/Types/ChannelTimetable.cs +++ b/src/dotnet/Types/ChannelTimetable.cs @@ -28,29 +28,29 @@ * * ChannelTimetable.cs -- * - */ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.NET.Types -{ - public class ChannelTimetable - { - internal HandleRef marshaledObject; - - public Int64 Created - { - get { throw new NotImplementedException(); } - } - - public Int64 Answered - { - get { throw new NotImplementedException(); } - } - - public Int64 Hungup - { - get { throw new NotImplementedException(); } - } - } -} + */ +using System; +using System.Runtime.InteropServices; + +namespace FreeSwitch.Types +{ + public class ChannelTimetable + { + internal HandleRef marshaledObject; + + public Int64 Created + { + get { throw new NotImplementedException(); } + } + + public Int64 Answered + { + get { throw new NotImplementedException(); } + } + + public Int64 Hungup + { + get { throw new NotImplementedException(); } + } + } +} diff --git a/src/dotnet/Types/CoreSession.cs b/src/dotnet/Types/CoreSession.cs index 6c9165fe32..b8083ed009 100755 --- a/src/dotnet/Types/CoreSession.cs +++ b/src/dotnet/Types/CoreSession.cs @@ -1,80 +1,80 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * CoreSession.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * CoreSession.cs -- + * */ using System; using System.Collections; using System.Runtime.InteropServices; using System.Text; -using FreeSwitch.NET.Marshaling.Types; +using FreeSwitch.Marshaling.Types; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { /* - * uint32_t id; - char name[80]; - int thread_running; - switch_memory_pool_t *pool; - switch_channel_t *channel; - switch_thread_t *thread; - const switch_endpoint_interface_t *endpoint_interface; - switch_io_event_hooks_t event_hooks; - switch_codec_t *read_codec; - switch_codec_t *write_codec; - - switch_buffer_t *raw_write_buffer; - switch_frame_t raw_write_frame; - switch_frame_t enc_write_frame; - uint8_t raw_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; - uint8_t enc_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; - - switch_buffer_t *raw_read_buffer; - switch_frame_t raw_read_frame; - switch_frame_t enc_read_frame; - uint8_t raw_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; - uint8_t enc_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; - - - switch_audio_resampler_t *read_resampler; - switch_audio_resampler_t *write_resampler; - - switch_mutex_t *mutex; - switch_thread_cond_t *cond; - - switch_thread_rwlock_t *rwlock; - - void *streams[SWITCH_MAX_STREAMS]; - int stream_count; - - char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1]; - void *private_info; + * uint32_t id; + char name[80]; + int thread_running; + switch_memory_pool_t *pool; + switch_channel_t *channel; + switch_thread_t *thread; + const switch_endpoint_interface_t *endpoint_interface; + switch_io_event_hooks_t event_hooks; + switch_codec_t *read_codec; + switch_codec_t *write_codec; + + switch_buffer_t *raw_write_buffer; + switch_frame_t raw_write_frame; + switch_frame_t enc_write_frame; + uint8_t raw_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; + uint8_t enc_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; + + switch_buffer_t *raw_read_buffer; + switch_frame_t raw_read_frame; + switch_frame_t enc_read_frame; + uint8_t raw_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; + uint8_t enc_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; + + + switch_audio_resampler_t *read_resampler; + switch_audio_resampler_t *write_resampler; + + switch_mutex_t *mutex; + switch_thread_cond_t *cond; + + switch_thread_rwlock_t *rwlock; + + void *streams[SWITCH_MAX_STREAMS]; + int stream_count; + + char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1]; + void *private_info; switch_queue_t *event_queue; */ public class CoreSession diff --git a/src/dotnet/Types/DtmfCallbackFunction.cs b/src/dotnet/Types/DtmfCallbackFunction.cs index 53c41eb3df..d63788fbf2 100755 --- a/src/dotnet/Types/DtmfCallbackFunction.cs +++ b/src/dotnet/Types/DtmfCallbackFunction.cs @@ -28,10 +28,10 @@ * * DtmfCallbackFunction.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - public delegate Status DtmfCallbackFunction(CoreSession session, string dtmf); -} + */ +using System; + +namespace FreeSwitch.Types +{ + public delegate Status DtmfCallbackFunction(CoreSession session, string dtmf); +} diff --git a/src/dotnet/Types/Event.cs b/src/dotnet/Types/Event.cs index de064fbb49..d2800e992c 100755 --- a/src/dotnet/Types/Event.cs +++ b/src/dotnet/Types/Event.cs @@ -1,40 +1,40 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Event.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Event.cs -- + * */ using System; using System.Collections; using System.Text; using System.Runtime.InteropServices; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { public enum Priority { diff --git a/src/dotnet/Types/FileHandle.cs b/src/dotnet/Types/FileHandle.cs index 707e496aad..99cec4f6fc 100755 --- a/src/dotnet/Types/FileHandle.cs +++ b/src/dotnet/Types/FileHandle.cs @@ -28,15 +28,15 @@ * * FileHandle.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling.Types; - -namespace FreeSwitch.NET.Types -{ - public class FileHandle - { - internal HandleRef marshaledObject; - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Marshaling.Types; + +namespace FreeSwitch.Types +{ + public class FileHandle + { + internal HandleRef marshaledObject; + } +} diff --git a/src/dotnet/Types/InputCallbackFunction.cs b/src/dotnet/Types/InputCallbackFunction.cs index e233eef07c..c4d8aa50af 100755 --- a/src/dotnet/Types/InputCallbackFunction.cs +++ b/src/dotnet/Types/InputCallbackFunction.cs @@ -28,20 +28,20 @@ * * DtmfCallbackFunction.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling; - -namespace FreeSwitch.NET.Types -{ - public delegate Status InputCallbackFunction( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string input, - InputType inputType, - [MarshalAs(UnmanagedType.LPStr)] - string buffer, - int bufferLength); -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Marshaling; + +namespace FreeSwitch.Types +{ + public delegate Status InputCallbackFunction( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))] + CoreSession session, + [MarshalAs(UnmanagedType.LPStr)] + string input, + InputType inputType, + [MarshalAs(UnmanagedType.LPStr)] + string buffer, + int bufferLength); +} diff --git a/src/dotnet/Types/InputType.cs b/src/dotnet/Types/InputType.cs index 170aaabd00..fed6270cd7 100755 --- a/src/dotnet/Types/InputType.cs +++ b/src/dotnet/Types/InputType.cs @@ -28,14 +28,14 @@ * * ChannelState.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - public enum InputType - { + */ +using System; + +namespace FreeSwitch.Types +{ + public enum InputType + { INPUT_TYPE_DTMF, INPUT_TYPE_EVENT - } -} + } +} diff --git a/src/dotnet/Types/LoadableModule.cs b/src/dotnet/Types/LoadableModule.cs index 72535777e3..7d6cc24964 100755 --- a/src/dotnet/Types/LoadableModule.cs +++ b/src/dotnet/Types/LoadableModule.cs @@ -1,38 +1,38 @@ -/* - * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * Copyright (C) 2006, James Martelletti - * - * Version: MPL 1.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application - * - * The Initial Developer of the Original Code is - * James Martelletti - * Portions created by the Initial Developer are Copyright (C) - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * James Martelletti - * - * - * Channel.cs -- - * +/* + * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * Copyright (C) 2006, James Martelletti + * + * Version: MPL 1.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application + * + * The Initial Developer of the Original Code is + * James Martelletti + * Portions created by the Initial Developer are Copyright (C) + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * James Martelletti + * + * + * Channel.cs -- + * */ using System; using System.Runtime.InteropServices; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { public class LoadableModule { diff --git a/src/dotnet/Types/LoadableModuleInterface.cs b/src/dotnet/Types/LoadableModuleInterface.cs index f0832f11bf..8bb5bbc5fd 100755 --- a/src/dotnet/Types/LoadableModuleInterface.cs +++ b/src/dotnet/Types/LoadableModuleInterface.cs @@ -28,34 +28,34 @@ * * LoadableModuleInterfaces.cs -- * - */ -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Text; -using FreeSwitch.NET.Marshaling; - -namespace FreeSwitch.NET.Types -{ - public delegate Status WriteFunction( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))] - StreamHandle streamHandle, - [MarshalAs(UnmanagedType.LPStr)] - string fmt); - - //public delegate void ModuleLoad(); - - public class LoadableModuleInterface - { - private string module_name; - //private EndpointInterface endpoint_interface; - //private TimerInterface timer_interface; - //private DialplanInterface dialplan_interface; - //private CodecInterface codec_interface; - //private ApplicationInterface application_interface; - //private ApiInterface api_interface; - //private FileInterface file_interface; - //private SpeechInterface speech_interface; - //private DirectoryInterface directory_interface; - } + */ +using System; +using System.Collections; +using System.Runtime.InteropServices; +using System.Text; +using FreeSwitch.Marshaling; + +namespace FreeSwitch.Types +{ + public delegate Status WriteFunction( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))] + StreamHandle streamHandle, + [MarshalAs(UnmanagedType.LPStr)] + string fmt); + + //public delegate void ModuleLoad(); + + public class LoadableModuleInterface + { + private string module_name; + //private EndpointInterface endpoint_interface; + //private TimerInterface timer_interface; + //private DialplanInterface dialplan_interface; + //private CodecInterface codec_interface; + //private ApplicationInterface application_interface; + //private ApiInterface api_interface; + //private FileInterface file_interface; + //private SpeechInterface speech_interface; + //private DirectoryInterface directory_interface; + } } diff --git a/src/dotnet/Types/MemoryPool.cs b/src/dotnet/Types/MemoryPool.cs index 5b0aad3ff8..51db5a420d 100755 --- a/src/dotnet/Types/MemoryPool.cs +++ b/src/dotnet/Types/MemoryPool.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.InteropServices; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { public class MemoryPool { diff --git a/src/dotnet/Types/Module.cs b/src/dotnet/Types/Module.cs index 1d313c80d9..a8cd2060dd 100755 --- a/src/dotnet/Types/Module.cs +++ b/src/dotnet/Types/Module.cs @@ -28,32 +28,32 @@ * * Module.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling; - -namespace FreeSwitch.NET.Types -{ - public delegate Status ModuleReload(); - public delegate bool ModulePause(); - public delegate bool ModuleResume(); - public delegate bool ModuleStatus(); - public delegate Status ModuleRuntime(); - public delegate bool ModuleShutdown(); - public delegate Status ModuleLoad(ref IntPtr module, string name); - - public delegate void - ApplicationFunction( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string data); - - public delegate Status - ApiFunction( - [MarshalAs(UnmanagedType.LPStr)] - string command, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StreamHandleMarshaler))] - StreamHandle streamHandle); -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Marshaling; + +namespace FreeSwitch.Types +{ + public delegate Status ModuleReload(); + public delegate bool ModulePause(); + public delegate bool ModuleResume(); + public delegate bool ModuleStatus(); + public delegate Status ModuleRuntime(); + public delegate bool ModuleShutdown(); + public delegate Status ModuleLoad(ref IntPtr module, string name); + + public delegate void + ApplicationFunction( + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] + CoreSession session, + [MarshalAs(UnmanagedType.LPStr)] + string data); + + public delegate Status + ApiFunction( + [MarshalAs(UnmanagedType.LPStr)] + string command, + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StreamHandleMarshaler))] + StreamHandle streamHandle); +} diff --git a/src/dotnet/Types/ModuleInterfaces.cs b/src/dotnet/Types/ModuleInterfaces.cs index 5bff3ff0e5..46022bce7f 100755 --- a/src/dotnet/Types/ModuleInterfaces.cs +++ b/src/dotnet/Types/ModuleInterfaces.cs @@ -34,7 +34,7 @@ using System.Collections; using System.Runtime.InteropServices; using System.Text; -namespace FreeSwitch.NET.Types +namespace FreeSwitch.Types { /* public class ApplicationInterface @@ -44,26 +44,26 @@ namespace FreeSwitch.NET.Types private string long_desc; private string short_desc; private string syntax; - //const struct switch_application_interface *next; - - public string InterfaceName - { - get { return interface_name; } - } - - public ApplicationFunction ApplicationFunction - { - get { return application_function; } - } - - public string LongDesc - { - get { return long_desc; } - } - - public string ShortDesc - { - get { return short_desc; } + //const struct switch_application_interface *next; + + public string InterfaceName + { + get { return interface_name; } + } + + public ApplicationFunction ApplicationFunction + { + get { return application_function; } + } + + public string LongDesc + { + get { return long_desc; } + } + + public string ShortDesc + { + get { return short_desc; } } }*/ } diff --git a/src/dotnet/Types/Status.cs b/src/dotnet/Types/Status.cs index bc7314b222..22e5a00f54 100755 --- a/src/dotnet/Types/Status.cs +++ b/src/dotnet/Types/Status.cs @@ -28,24 +28,24 @@ * * Status.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - public enum Status - { - Success, - False, - Timeout, - Restart, - Terminate, - NotImplemented, - MemoryError, - NoOp, - Resample, - GeneralError, - InUse, - Break - } -} + */ +using System; + +namespace FreeSwitch.Types +{ + public enum Status + { + Success, + False, + Timeout, + Restart, + Terminate, + NotImplemented, + MemoryError, + NoOp, + Resample, + GeneralError, + InUse, + Break + } +} diff --git a/src/dotnet/Types/StreamHandle.cs b/src/dotnet/Types/StreamHandle.cs index 2c7ed33baf..72306d607b 100755 --- a/src/dotnet/Types/StreamHandle.cs +++ b/src/dotnet/Types/StreamHandle.cs @@ -28,24 +28,24 @@ * * StreamHandle.cs -- * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.NET.Marshaling.Types; - -namespace FreeSwitch.NET.Types -{ - public class StreamHandle - { - internal HandleRef marshaledObject; - internal WriteFunction writeFunction; - - public void Write(string data) - { - StreamHandleMarshal streamHandleMarshal = (StreamHandleMarshal)marshaledObject.Wrapper; - WriteFunction writeFunction = (WriteFunction)Marshal.GetDelegateForFunctionPointer(streamHandleMarshal.write_function, typeof(WriteFunction)); - - writeFunction(this, data); - } - } -} + */ +using System; +using System.Runtime.InteropServices; +using FreeSwitch.Marshaling.Types; + +namespace FreeSwitch.Types +{ + public class StreamHandle + { + internal HandleRef marshaledObject; + internal WriteFunction writeFunction; + + public void Write(string data) + { + StreamHandleMarshal streamHandleMarshal = (StreamHandleMarshal)marshaledObject.Wrapper; + WriteFunction writeFunction = (WriteFunction)Marshal.GetDelegateForFunctionPointer(streamHandleMarshal.write_function, typeof(WriteFunction)); + + writeFunction(this, data); + } + } +} diff --git a/src/dotnet/Types/TextChannel.cs b/src/dotnet/Types/TextChannel.cs index 2e45fc1636..925fb60361 100755 --- a/src/dotnet/Types/TextChannel.cs +++ b/src/dotnet/Types/TextChannel.cs @@ -28,15 +28,15 @@ * * TextChannel.cs -- * - */ -using System; - -namespace FreeSwitch.NET.Types -{ - public enum TextChannel - { - ChannelIdConsole, - ChannelIdConsoleClean, - ChannelIdEvent - } -} + */ +using System; + +namespace FreeSwitch.Types +{ + public enum TextChannel + { + ChannelIdConsole, + ChannelIdConsoleClean, + ChannelIdEvent + } +}