diff --git a/src/dotnet/Common.cs b/src/dotnet/Common.cs deleted file mode 100755 index 411b4189f9..0000000000 --- a/src/dotnet/Common.cs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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 - * - * - * Common.cs -- - * - */ -using System; -using System.Reflection; - -namespace FreeSwitch -{ - public class Common - { - public static void DumpHex(string label, IntPtr pointer, int length) - { - Console.WriteLine("DUMP-{0}:", label); - - DumpHex(pointer, length); - } - - public static void DumpProperties(string label, object dumpObject) - { - Type type = dumpObject.GetType(); - PropertyInfo[] properties = type.GetProperties(); - - foreach (PropertyInfo p in properties) - { - Console.WriteLine("%%% - {0}: {1}:{2}", label, p.Name, p.GetValue(dumpObject, null)); - } - } - - public static void DumpHex(IntPtr pointer, int length) - { - if (pointer == IntPtr.Zero) - throw new NullReferenceException(); - - for (int i = 0; i < length; i++) - { - IntPtr offset = new IntPtr(pointer.ToInt32() + i); - - if (i % 20 == 0) - Console.Write("\n0x{0:x}: ", offset.ToInt32()); - - Console.Write("{0:x2} ", System.Runtime.InteropServices.Marshal.ReadByte(offset)); - } - - Console.WriteLine("\n"); - } - } -} diff --git a/src/dotnet/FreeSwitch.NET.csproj b/src/dotnet/FreeSwitch.NET.csproj deleted file mode 100755 index 6a1fe5488a..0000000000 --- a/src/dotnet/FreeSwitch.NET.csproj +++ /dev/null @@ -1,148 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {251CAABC-16C3-4593-A491-603B908094E0} - Library - Properties - FreeSwitch - FreeSwitch.NET - - - true - public.snk - - - true - full - false - ..\..\debug\ - DEBUG;TRACE - prompt - 4 - true - 0649,0169 - true - - - pdbonly - true - ..\..\release\ - TRACE - prompt - 4 - true - 0649,0169 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/dotnet/Ivr.cs b/src/dotnet/Ivr.cs deleted file mode 100644 index 49fffb3142..0000000000 --- a/src/dotnet/Ivr.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using FreeSwitch.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - public class Ivr - { - public static Status MultiThreadedBridge(CoreSession session, CoreSession peerSession, InputCallbackFunction dtmfCallback) - { - return Switch.switch_ivr_multi_threaded_bridge(session, peerSession, dtmfCallback, IntPtr.Zero, IntPtr.Zero); - } - - public static Status Originate(CoreSession session, CoreSession peerSession, CallCause callCause, string data, uint timelimit) - { - IntPtr callCausePtr = Marshal.AllocHGlobal(4); - IntPtr dataPtr = Marshal.StringToHGlobalAnsi(data); - - Marshal.StructureToPtr(callCause, callCausePtr, true); - - return Switch.switch_ivr_originate(session, ref peerSession, callCausePtr, dataPtr, timelimit, null, null, null, null); - } - - public static Status RecordFile(CoreSession coreSession, FileHandle fileHandle, string file, DtmfCallbackFunction dtmfCallbackFunction) - { - Byte[] filename = Encoding.Default.GetBytes(file); - - Console.WriteLine("File: {0}", file); - - dtmfCallbackFunction(coreSession, "1"); - dtmfCallbackFunction(coreSession, "2"); - dtmfCallbackFunction(coreSession, "3"); - - Encoding ansiEncoding = Encoding.GetEncoding(1252); - //filename = Encoding.Convert(Encoding.Default, ansiEncoding, filename); - - Console.WriteLine("Filename: {0}", file); - //Console.WriteLine("Status record: {0}", status.ToString()); - return Status.Success; - } - } -} \ No newline at end of file diff --git a/src/dotnet/Log.cs b/src/dotnet/Log.cs deleted file mode 100644 index 7991df64f1..0000000000 --- a/src/dotnet/Log.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using FreeSwitch.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - public class Log - { - public static void Printf(LogLevel level, string message) - { - Switch.switch_log_printf(null, "File", "Func.NET", 123, level, message); - } - } -} \ No newline at end of file diff --git a/src/dotnet/Makefile b/src/dotnet/Makefile deleted file mode 100644 index 53670e7f59..0000000000 --- a/src/dotnet/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -all: $(MODNAME).so - -$(MODNAME).so: - /usr/local/freeswitch/bin/gmcs -debug -unsafe -t:library -keyfile:public.snk \ - -out:FreeSwitch.NET.dll -reference:Mono.Posix.dll \ - Properties/AssemblyInfo.cs \ - Marshaling/Types/ApiInterfaceMarshal.cs \ - Marshaling/Types/ApplicationInterfaceMarshal.cs \ - Marshaling/Types/BufferMarshal.cs \ - Marshaling/Types/CallerExtensionMarshal.cs \ - Marshaling/Types/CallerProfileMarshal.cs \ - Marshaling/Types/ChannelFlagMarshal.cs \ - Marshaling/Types/ChannelMarshal.cs \ - Marshaling/Types/ChannelStateMarshal.cs \ - Marshaling/Types/ChannelTimetableMarshal.cs \ - Marshaling/Types/CodecImplementationMarshal.cs \ - Marshaling/Types/CodecInterfaceMarshal.cs \ - Marshaling/Types/CodecMarshal.cs \ - Marshaling/Types/CodecTypeMarshal.cs \ - Marshaling/Types/CoreSessionMarshal.cs \ - Marshaling/Types/EventMarshal.cs \ - Marshaling/Types/FileHandleMarshal.cs \ - Marshaling/Types/FrameMarshal.cs \ - Marshaling/Types/IOEventHooksMarshal.cs \ - Marshaling/Types/LoadableModuleInterfaceMarshal.cs \ - Marshaling/Types/LoadableModuleMarshal.cs \ - Marshaling/Types/SpeechHandleMarshal.cs \ - Marshaling/Types/StateHandlerTableMarshal.cs \ - Marshaling/Types/StreamHandleMarshal.cs \ - Marshaling/Types/TypesMarshal.cs \ - Marshaling/Types/TimerMarshal.cs \ - Marshaling/BufferMarshaler.cs \ - Marshaling/CallerExtensionMarshaler.cs \ - Marshaling/CallerProfileMarshaler.cs \ - Marshaling/ChannelMarshaler.cs \ - Marshaling/ChannelTimetableMarshaler.cs \ - Marshaling/CodecMarshaler.cs \ - Marshaling/CoreSessionMarshaler.cs \ - Marshaling/EventMarshaler.cs \ - Marshaling/FileHandleMarshaler.cs \ - Marshaling/MemoryPoolMarshaler.cs \ - Marshaling/SpeechHandleMarshaler.cs \ - Marshaling/StateHandlerTableMarshaler.cs \ - Marshaling/StreamHandleMarshaler.cs \ - Marshaling/TimerMarshaler.cs \ - Modules/Api.cs \ - Modules/Application.cs \ - Switch/CallerProfile.cs \ - Switch/Channel.cs \ - Switch/Console.cs \ - Switch/CoreSession.cs \ - Switch/Event.cs \ - Switch/Ivr.cs \ - Switch/LoadableModule.cs \ - Switch/Log.cs \ - Switch/StreamHandle.cs \ - Types/ApiFunction.cs \ - Types/ApplicationFunction.cs \ - Types/ApplicationInterface.cs \ - Types/Buffer.cs \ - Types/CallCause.cs \ - Types/CallerExtension.cs \ - Types/CallerProfile.cs \ - Types/Channel.cs \ - Types/ChannelFlag.cs \ - Types/ChannelState.cs \ - Types/ChannelTimetable.cs \ - Types/Codec.cs \ - Types/CoreSession.cs \ - Types/DtmfCallbackFunction.cs \ - Types/InputCallbackFunction.cs \ - Types/InputType.cs \ - Types/Event.cs \ - Types/EventCallback.cs \ - Types/EventType.cs \ - Types/FileHandle.cs \ - Types/LoadableModule.cs \ - Types/LoadableModuleInterface.cs \ - Types/LogLevel.cs \ - Types/MemoryPool.cs \ - Types/Module.cs \ - Types/Status.cs \ - Types/SpeechHandle.cs \ - Types/StateHandlerTable.cs \ - Types/StreamHandle.cs \ - Types/TextChannel.cs \ - Types/Timer.cs \ - Common.cs \ - Module.cs \ - Ivr.cs \ - Log.cs \ - -clean: - rm -fr *.dll - -install: - cp -f FreeSwitch.NET.dll /usr/local/freeswitch/lib/ diff --git a/src/dotnet/Marshaling/BufferMarshaler.cs b/src/dotnet/Marshaling/BufferMarshaler.cs deleted file mode 100755 index ad474d9e06..0000000000 --- a/src/dotnet/Marshaling/BufferMarshaler.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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 - * - * - * BufferMarshaler.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling.Types; -using FreeSwitch.Types; - -namespace FreeSwitch.Marshaling -{ - class BufferMarshaler : ICustomMarshaler - { - private static BufferMarshaler Instance = new BufferMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - FreeSwitch.Types.Buffer buffer = (FreeSwitch.Types.Buffer)obj; - - return buffer.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr bufferPtr) - { - FreeSwitch.Types.Buffer buffer = new FreeSwitch.Types.Buffer(); - BufferMarshal bufferMarshal = new BufferMarshal(); - - Marshal.PtrToStructure(bufferPtr, bufferMarshal); - - buffer.marshaledObject = new HandleRef(bufferMarshal, bufferPtr); - - return buffer; - } - } -} diff --git a/src/dotnet/Marshaling/CallerExtensionMarshaler.cs b/src/dotnet/Marshaling/CallerExtensionMarshaler.cs deleted file mode 100755 index ef555f34c8..0000000000 --- a/src/dotnet/Marshaling/CallerExtensionMarshaler.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class CallerExtensionMarshaler : ICustomMarshaler - { - private static CallerExtensionMarshaler Instance = new CallerExtensionMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - CallerExtension callerExtension = (CallerExtension)obj; - - return callerExtension.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr callerExtensionPtr) - { - CallerExtensionMarshal callerExtensionMarshal = new CallerExtensionMarshal(); - CallerExtension callerExtension = new CallerExtension(); - - Marshal.PtrToStructure(callerExtensionPtr, callerExtensionMarshal); - - callerExtension.marshaledObject = new HandleRef(callerExtensionMarshal, callerExtensionPtr); - - return callerExtension; - } - } -} diff --git a/src/dotnet/Marshaling/CallerProfileMarshaler.cs b/src/dotnet/Marshaling/CallerProfileMarshaler.cs deleted file mode 100755 index a97fadc570..0000000000 --- a/src/dotnet/Marshaling/CallerProfileMarshaler.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class CallerProfileMarshaler : ICustomMarshaler - { - - private static CallerProfileMarshaler Instance = new CallerProfileMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - CallerProfile callerProfile = (CallerProfile) obj; - - return callerProfile.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr callerProfilePtr) - { - CallerProfileMarshal callerProfileMarshal = new CallerProfileMarshal(); - CallerProfile callerProfile = new CallerProfile(); - - Marshal.PtrToStructure(callerProfilePtr, callerProfileMarshal); - - callerProfile.marshaledObject = new HandleRef(callerProfileMarshal, callerProfilePtr); - - return callerProfile; - } - } -} diff --git a/src/dotnet/Marshaling/ChannelMarshaler.cs b/src/dotnet/Marshaling/ChannelMarshaler.cs deleted file mode 100755 index c9e32e7291..0000000000 --- a/src/dotnet/Marshaling/ChannelMarshaler.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class ChannelMarshaler : ICustomMarshaler - { - private static ChannelMarshaler Instance = new ChannelMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - Channel channel = (Channel) obj; - - return channel.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr ptr) - { - ChannelMarshal channelMarshal = new ChannelMarshal(); - Channel channel = new Channel(); - - Marshal.PtrToStructure(ptr, channelMarshal); - - channel.marshaledObject = new HandleRef(channelMarshal, ptr); - - return channel; - } - } -} diff --git a/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs b/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs deleted file mode 100755 index a652d4b0b3..0000000000 --- a/src/dotnet/Marshaling/ChannelTimetableMarshaler.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class ChannelTimetableMarshaler : ICustomMarshaler - { - private static ChannelTimetableMarshaler Instance = new ChannelTimetableMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - ChannelTimetable channelTimetable = (ChannelTimetable)obj; - - return channelTimetable.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr channelTimetablePtr) - { - ChannelTimetableMarshal channelTimetableMarshal = new ChannelTimetableMarshal(); - ChannelTimetable channelTimetable = new ChannelTimetable(); - - Marshal.PtrToStructure(channelTimetablePtr, channelTimetableMarshal); - - channelTimetable.marshaledObject = new HandleRef(channelTimetableMarshal, channelTimetablePtr); - - return channelTimetable; - } - } -} diff --git a/src/dotnet/Marshaling/CodecMarshaler.cs b/src/dotnet/Marshaling/CodecMarshaler.cs deleted file mode 100644 index 7313c3810a..0000000000 --- a/src/dotnet/Marshaling/CodecMarshaler.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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 - * - * - * CodecMarshaler.cs -- - * - */ -using System; -using System.Collections; -using FreeSwitch.Marshaling.Types; -using FreeSwitch.Types; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Marshaling -{ - class CodecMarshaler : ICustomMarshaler - { - private static CodecMarshaler Instance = new CodecMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - Codec streamHandleObj = (Codec)obj; - - return streamHandleObj.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr codecPtr) - { - CodecMarshal codecMarshal = new CodecMarshal(); - Codec codecObj = new Codec(); - - - Marshal.PtrToStructure(codecPtr, codecMarshal); - - codecObj.marshaledObject = new HandleRef(codecMarshal, codecPtr); - - return codecObj; - } - } -} \ No newline at end of file diff --git a/src/dotnet/Marshaling/CoreSessionMarshaler.cs b/src/dotnet/Marshaling/CoreSessionMarshaler.cs deleted file mode 100755 index 11c537928d..0000000000 --- a/src/dotnet/Marshaling/CoreSessionMarshaler.cs +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class CoreSessionMarshaler : ICustomMarshaler - { - private static CoreSessionMarshaler Instance = new CoreSessionMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - CoreSession coreSession = (CoreSession)obj; - - Console.WriteLine("CoreSession: Marshalling Managed to Native"); - - if (coreSession.marshaledObject.Handle != IntPtr.Zero) - { - - Console.WriteLine("Returning: 0x{0:x}", coreSession.marshaledObject.Handle.ToInt32()); - return coreSession.marshaledObject.Handle; - } - else - { - CoreSessionMarshal coreSessionMarshal = new CoreSessionMarshal(); - IntPtr coreSessionPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CoreSessionMarshal))); - - Marshal.StructureToPtr(coreSessionMarshal, coreSessionPtr, true); - - coreSession.marshaledObject = new HandleRef(coreSessionMarshal, coreSessionPtr); - - Console.WriteLine("CoreSession: NO OBJECT EXISTS OMG"); - Console.WriteLine("Returning: 0x{0:x}", coreSession.marshaledObject.Handle.ToInt32()); - return coreSession.marshaledObject.Handle; - } - } - - public object MarshalNativeToManaged(IntPtr coreSessionPtr) - { - CoreSessionMarshal coreSessionMarshal = new CoreSessionMarshal(); - CoreSession coreSession = new CoreSession(); - - Console.WriteLine("CoreSession: Marshalling Native to Managed"); - - Marshal.PtrToStructure(coreSessionPtr, coreSessionMarshal); - - coreSession.marshaledObject = new HandleRef(coreSessionMarshal, coreSessionPtr); - - return coreSession; - } - } -} diff --git a/src/dotnet/Marshaling/EventMarshaler.cs b/src/dotnet/Marshaling/EventMarshaler.cs deleted file mode 100755 index 0356ff2d97..0000000000 --- a/src/dotnet/Marshaling/EventMarshaler.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.Marshaling.Types; -using FreeSwitch.Types; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Marshaling -{ - class EventMarshaler : ICustomMarshaler - { - private static EventMarshaler Instance = new EventMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - Event eventObj = (Event)obj; - - return eventObj.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr eventPtr) - { - EventMarshal eventMarshal = new EventMarshal(); - Event eventObj = new Event(); - - Marshal.PtrToStructure(eventPtr, eventMarshal); - - eventObj.marshaledObject = new HandleRef(eventMarshal, eventPtr); - - return eventObj; - } - } -} diff --git a/src/dotnet/Marshaling/FileHandleMarshaler.cs b/src/dotnet/Marshaling/FileHandleMarshaler.cs deleted file mode 100755 index 09ea148e79..0000000000 --- a/src/dotnet/Marshaling/FileHandleMarshaler.cs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class FileHandleMarshaler : ICustomMarshaler - { - private static FileHandleMarshaler Instance = new FileHandleMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - FileHandle fileHandle = (FileHandle)obj; - - return fileHandle.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr file_handle) - { - FileHandleMarshal fileHandleMarshal = new FileHandleMarshal(); - FileHandle fileHandle = new FileHandle(); - - fileHandle.marshaledObject = new HandleRef(fileHandleMarshal, file_handle); - - return fileHandle; - } - } -} diff --git a/src/dotnet/Marshaling/MemoryPoolMarshaler.cs b/src/dotnet/Marshaling/MemoryPoolMarshaler.cs deleted file mode 100755 index 66a274eba7..0000000000 --- a/src/dotnet/Marshaling/MemoryPoolMarshaler.cs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Marshaling -{ - class MemoryPoolMarshaler : ICustomMarshaler - { - private static MemoryPoolMarshaler Instance = new MemoryPoolMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - MemoryPool memoryPool = (MemoryPool) obj; - - return memoryPool.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr pool) - { - MemoryPool memoryPool = new MemoryPool(); - - memoryPool.marshaledObject = new HandleRef(new IntPtr(), pool); - - return memoryPool; - } - } -} diff --git a/src/dotnet/Marshaling/SpeechHandleMarshaler.cs b/src/dotnet/Marshaling/SpeechHandleMarshaler.cs deleted file mode 100644 index 9c25384c3c..0000000000 --- a/src/dotnet/Marshaling/SpeechHandleMarshaler.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - * - * - * SpeechHandleMarshaler.cs -- - * - */ -using System; -using System.Collections; -using FreeSwitch.Marshaling.Types; -using FreeSwitch.Types; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Marshaling -{ - class SpeechHandleMarshaler : ICustomMarshaler - { - private static SpeechHandleMarshaler Instance = new SpeechHandleMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - SpeechHandle speechHandleObj = (SpeechHandle)obj; - - return speechHandleObj.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr speechHandlePtr) - { - SpeechHandleMarshal speechHandleMarshal = new SpeechHandleMarshal(); - SpeechHandle speechHandleObj = new SpeechHandle(); - - Marshal.PtrToStructure(speechHandlePtr, speechHandleMarshal); - - speechHandleObj.marshaledObject = new HandleRef(speechHandleMarshal, speechHandlePtr); - - return speechHandleObj; - } - } -} diff --git a/src/dotnet/Marshaling/StateHandlerTableMarshaler.cs b/src/dotnet/Marshaling/StateHandlerTableMarshaler.cs deleted file mode 100644 index db4fe3f704..0000000000 --- a/src/dotnet/Marshaling/StateHandlerTableMarshaler.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - * - * - * StateHandlerTableMarshaler.cs -- - * - */ -using System; -using System.Collections; -using FreeSwitch.Marshaling.Types; -using FreeSwitch.Types; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Marshaling -{ - class StateHandlerTableMarshaler : ICustomMarshaler - { - private static StateHandlerTableMarshaler Instance = new StateHandlerTableMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - StateHandlerTable stateHandlerTableObj = (StateHandlerTable)obj; - - return stateHandlerTableObj.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr stateHandlerTablePtr) - { - StateHandlerTableMarshal stateHandlerTableMarshal = new StateHandlerTableMarshal(); - StateHandlerTable stateHandlerTableObj = new StateHandlerTable(); - - Marshal.PtrToStructure(stateHandlerTablePtr, stateHandlerTableMarshal); - - stateHandlerTableObj.marshaledObject = new HandleRef(stateHandlerTableMarshal, stateHandlerTablePtr); - - return stateHandlerTableObj; - } - } -} diff --git a/src/dotnet/Marshaling/StreamHandleMarshaler.cs b/src/dotnet/Marshaling/StreamHandleMarshaler.cs deleted file mode 100755 index fd4fefd051..0000000000 --- a/src/dotnet/Marshaling/StreamHandleMarshaler.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - * - * - * StreamHandleMarshaler.cs -- - * - */ -using System; -using System.Collections; -using FreeSwitch.Marshaling.Types; -using FreeSwitch.Types; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Marshaling -{ - class StreamHandleMarshaler : ICustomMarshaler - { - private static StreamHandleMarshaler Instance = new StreamHandleMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - StreamHandle streamHandleObj = (StreamHandle)obj; - - return streamHandleObj.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr streamHandlePtr) - { - StreamHandleMarshal streamHandleMarshal = new StreamHandleMarshal(); - StreamHandle streamHandleObj = new StreamHandle(); - - Marshal.PtrToStructure(streamHandlePtr, streamHandleMarshal); - - streamHandleObj.marshaledObject = new HandleRef(streamHandleMarshal, streamHandlePtr); - - return streamHandleObj; - } - } -} diff --git a/src/dotnet/Marshaling/TimerMarshaler.cs b/src/dotnet/Marshaling/TimerMarshaler.cs deleted file mode 100644 index 0b85deac6a..0000000000 --- a/src/dotnet/Marshaling/TimerMarshaler.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - * - * - * TimerMarshaler.cs -- - * - */ -using System; -using System.Collections; -using FreeSwitch.Marshaling.Types; -using FreeSwitch.Types; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Marshaling -{ - class TimerMarshaler : ICustomMarshaler - { - private static TimerMarshaler Instance = new TimerMarshaler(); - - public static ICustomMarshaler GetInstance(string s) - { - return Instance; - } - - public void CleanUpManagedData(object o) - { - } - - public void CleanUpNativeData(IntPtr pNativeData) - { - } - - public int GetNativeDataSize() - { - return IntPtr.Size; - } - - public IntPtr MarshalManagedToNative(object obj) - { - Timer timerObj = (Timer)obj; - - return timerObj.marshaledObject.Handle; - } - - public object MarshalNativeToManaged(IntPtr timerPtr) - { - TimerMarshal timerMarshal = new TimerMarshal(); - Timer timerObj = new Timer(); - - Marshal.PtrToStructure(timerPtr, timerMarshal); - - timerObj.marshaledObject = new HandleRef(timerMarshal, timerPtr); - - return timerObj; - } - } -} diff --git a/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs b/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs deleted file mode 100755 index 950b83c908..0000000000 --- a/src/dotnet/Marshaling/Types/ApiInterfaceMarshal.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 - * - * - * ApiInterfaceMarshal.cs -- - * - */ -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 syntax; - internal IntPtr next; - } -} diff --git a/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs b/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs deleted file mode 100755 index 3807ee466d..0000000000 --- a/src/dotnet/Marshaling/Types/ApplicationInterfaceMarshal.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * - * ApplicationInterfaceMarshal.cs -- - * - */ -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 deleted file mode 100755 index 09a3cddf82..0000000000 --- a/src/dotnet/Marshaling/Types/BufferMarshal.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - * - * - * BufferMarshal.cs -- - * - */ -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 deleted file mode 100755 index 09d2f535ce..0000000000 --- a/src/dotnet/Marshaling/Types/CallerExtensionMarshal.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - * - * - * CallerExtensionMarshal.cs -- - * - */ -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 deleted file mode 100755 index 2e2709d384..0000000000 --- a/src/dotnet/Marshaling/Types/CallerProfileMarshal.cs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class CallerProfileMarshal - { - [MarshalAs(UnmanagedType.LPStr)] - internal string username; - [MarshalAs(UnmanagedType.LPStr)] - internal string dialplan; - [MarshalAs(UnmanagedType.LPStr)] - internal string caller_id_name; - [MarshalAs(UnmanagedType.LPStr)] - internal string caller_id_number; - [MarshalAs(UnmanagedType.LPStr)] - internal string network_addr; - [MarshalAs(UnmanagedType.LPStr)] - internal string ani; - [MarshalAs(UnmanagedType.LPStr)] - internal string ani2; - [MarshalAs(UnmanagedType.LPStr)] - internal string rdnis; - [MarshalAs(UnmanagedType.LPStr)] - internal string destination_number; - [MarshalAs(UnmanagedType.LPStr)] - internal string source; - [MarshalAs(UnmanagedType.LPStr)] - internal string chan_name; - [MarshalAs(UnmanagedType.LPStr)] - internal string uuid; - [MarshalAs(UnmanagedType.LPStr)] - internal string context; - internal IntPtr next; - } -} diff --git a/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs b/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs deleted file mode 100755 index 60ec8b72f9..0000000000 --- a/src/dotnet/Marshaling/Types/ChannelFlagMarshal.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - * - * - * ChannelFlagMarshal.cs -- - * - */ -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 deleted file mode 100755 index 5d9b46e159..0000000000 --- a/src/dotnet/Marshaling/Types/ChannelMarshal.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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.Types; - -namespace FreeSwitch.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class ChannelMarshal - { - internal IntPtr name; - internal IntPtr dtmf_buffer; - internal IntPtr dtmf_mutex; - internal IntPtr flag_mutex; - internal IntPtr profile_mutex; - internal IntPtr session; - internal ChannelState state; - internal UInt32 flags; - internal IntPtr caller_profile; - internal IntPtr originator_caller_profile; - internal IntPtr originatee_caller_profile; - internal IntPtr caller_extension; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=120)] - internal byte[] state_handlers; - internal int state_handler_index; - internal IntPtr variables; - internal IntPtr times; - internal IntPtr private_info; - internal IntPtr hangup_cause; - internal int freq; - internal int bits; - internal int channels; - internal int ms; - internal int kbps; - } -} diff --git a/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs b/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs deleted file mode 100755 index 32608d400f..0000000000 --- a/src/dotnet/Marshaling/Types/ChannelStateMarshal.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * - * ChannelStateMarshal.cs -- - * - */ -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 deleted file mode 100755 index ec503623a6..0000000000 --- a/src/dotnet/Marshaling/Types/ChannelTimetableMarshal.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 - * - * - * ChannelTimetableMarshal.cs -- - * - */ -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 deleted file mode 100755 index 242f67aaa8..0000000000 --- a/src/dotnet/Marshaling/Types/CodecImplementationMarshal.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - * - * - * CodecImplementationMarshal.cs -- - * - */ -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 deleted file mode 100755 index b05e83d6bb..0000000000 --- a/src/dotnet/Marshaling/Types/CodecInterfaceMarshal.cs +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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 - * - * - * CodecInterfaceMarshal.cs -- - * - */ -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 deleted file mode 100755 index 7035c5a842..0000000000 --- a/src/dotnet/Marshaling/Types/CodecMarshal.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - * - * - * CodecMarshal.cs -- - * - */ -using System; -using System.Text; - -namespace FreeSwitch.Marshaling.Types -{ - internal class CodecMarshal - { - internal IntPtr codec_interface; - internal IntPtr implementation; - internal IntPtr codec_settings; - internal UInt32 flags; - internal IntPtr memory_pool; - internal IntPtr private_info; - } -} diff --git a/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs b/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs deleted file mode 100755 index 1faa480bf1..0000000000 --- a/src/dotnet/Marshaling/Types/CodecTypeMarshal.cs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 - * - * - * CodecTypeMarshal.cs -- - * - */ -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 deleted file mode 100755 index 4a351beed2..0000000000 --- a/src/dotnet/Marshaling/Types/CoreSessionMarshal.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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 - * - * - * CoreSessionMarshal.cs -- - * - */ -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; - internal IntPtr cond; - internal IntPtr rwlock; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=128)] - internal IntPtr[] streams; - internal int stream_count; - /* 36 + 1 char string, but need to grab 40 bytes */ - [MarshalAs(UnmanagedType.ByValArray, SizeConst=40)] - 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 deleted file mode 100755 index 03a46de690..0000000000 --- a/src/dotnet/Marshaling/Types/EventMarshal.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 - * - * - * EventMarshal.cs -- - * - */ -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 deleted file mode 100755 index 9cf0ee0f00..0000000000 --- a/src/dotnet/Marshaling/Types/FileHandleMarshal.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 - * - * - * FileHandleMarshal.cs -- - * - */ -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 deleted file mode 100755 index 7068b08088..0000000000 --- a/src/dotnet/Marshaling/Types/FrameMarshal.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - * - * - * FrameMarshal.cs -- - * - */ -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 deleted file mode 100755 index fc4de1cc66..0000000000 --- a/src/dotnet/Marshaling/Types/IOEventHooksMarshal.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * - * IOEventHooksMarshal.cs -- - * - */ -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 deleted file mode 100755 index ccc2db3d12..0000000000 --- a/src/dotnet/Marshaling/Types/LoadableModuleInterfaceMarshal.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * - * LoadableModuleInterfaceMarshal.cs -- - * - */ -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 deleted file mode 100755 index c0485055b2..0000000000 --- a/src/dotnet/Marshaling/Types/LoadableModuleMarshal.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - * - * - * LoadableModuleMarshal.cs -- - * - */ -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/SpeechHandleMarshal.cs b/src/dotnet/Marshaling/Types/SpeechHandleMarshal.cs deleted file mode 100644 index 937cbd653b..0000000000 --- a/src/dotnet/Marshaling/Types/SpeechHandleMarshal.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 - * - * - * SpeechHandleMarshal.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Types; - -namespace FreeSwitch.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class SpeechHandleMarshal - { - internal IntPtr speech_interface; - internal UInt32 flags; - internal IntPtr name; - internal UInt32 rate; - internal UInt32 speed; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=80)] - internal byte[] voice; - [MarshalAs(UnmanagedType.ByValArray, SizeConst=80)] - internal byte[] engine; - internal IntPtr memory_pool; - internal IntPtr private_info; - } -} diff --git a/src/dotnet/Marshaling/Types/StateHandlerTableMarshal.cs b/src/dotnet/Marshaling/Types/StateHandlerTableMarshal.cs deleted file mode 100644 index 1e7f68c755..0000000000 --- a/src/dotnet/Marshaling/Types/StateHandlerTableMarshal.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 - * - * - * StateHandlerTableMarshal.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Types; - -namespace FreeSwitch.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class StateHandlerTableMarshal - { - internal IntPtr on_init; - internal IntPtr on_ring; - internal IntPtr on_execute; - internal IntPtr on_hangup; - internal IntPtr on_loopback; - internal IntPtr on_transmit; - internal IntPtr on_hold; - } -} \ No newline at end of file diff --git a/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs b/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs deleted file mode 100755 index e50e747b70..0000000000 --- a/src/dotnet/Marshaling/Types/StreamHandleMarshal.cs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * StreamHandleMarshal.cs -- - * - */ -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 int alloc_len; - internal int alloc_chunk; - internal IntPtr _event; - } -} diff --git a/src/dotnet/Marshaling/Types/TimerMarshal.cs b/src/dotnet/Marshaling/Types/TimerMarshal.cs deleted file mode 100644 index 39d70c2dfe..0000000000 --- a/src/dotnet/Marshaling/Types/TimerMarshal.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 - * - * - * TimerMarshal.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Types; - -namespace FreeSwitch.Marshaling.Types -{ - [StructLayout(LayoutKind.Sequential)] - internal class TimerMarshal - { - int interval; - UInt32 flags; - uint samples; - uint samplecount; - IntPtr timer_interface; - IntPtr memory_pool; - IntPtr private_info; - } -} diff --git a/src/dotnet/Marshaling/Types/TypesMarshal.cs b/src/dotnet/Marshaling/Types/TypesMarshal.cs deleted file mode 100755 index 0b6ebf147a..0000000000 --- a/src/dotnet/Marshaling/Types/TypesMarshal.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 - * - * - * TypesMarshal.cs -- - * - */ -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 deleted file mode 100644 index b1f4f81394..0000000000 --- a/src/dotnet/Module.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Modules; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - /// - /// Base class for all Freeswitch.NET modules - /// - /// - /// public class Example : Module - /// { - /// public Example() - /// { - /// AddApiInterface(new ExampleApi()); - /// AddApplicationInterface(new ExampleApplication()); - /// - /// Register(); - /// } - /// } - /// - public class Module - { - private LoadableModuleInterfaceMarshal module_interface = new LoadableModuleInterfaceMarshal(); - private LoadableModuleMarshal module = new LoadableModuleMarshal(); - - private ArrayList applicationInterfaces = new ArrayList(); - private ArrayList apiInterfaces = new ArrayList(); - - private ModuleLoad load; - private string name; - private string filename = Assembly.GetCallingAssembly().GetName().Name; - - /// - /// Module constructor - /// - public Module() - { - 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 */ - module = Marshal.AllocHGlobal(Marshal.SizeOf(module_interface)); - - /* Set the module_name field of the LoadableModuleInterface */ - module_interface.module_name = Marshal.StringToHGlobalAnsi(filename); - - if (apiInterfaces.Count > 0) - { - /* Grab the first ApiInterface in our array and add a pointer to this in our ModuleInterface*/ - Api apiIndex = (Api)apiInterfaces[0]; - - module_interface.api_interface = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ApiInterfaceMarshal))); - - Marshal.StructureToPtr(apiIndex.handle.Wrapper, module_interface.api_interface, true); - } - - if (applicationInterfaces.Count > 0) - { - /* For each Application interface */ - Application applicationIndex = (Application)applicationInterfaces[0]; - - module_interface.application_interface = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ApplicationInterfaceMarshal))); - - Marshal.StructureToPtr(applicationIndex.handle.Wrapper, module_interface.application_interface, true); - } - - /* Finally, marshal the moduleinterface class and return */ - Marshal.StructureToPtr(module_interface, module, true); - - return Status.Success; - } - - /// - /// AddApiInterface - /// - /// - public void AddApiInterface(Api apiInterface) - { - /* Create a new ApiInterface type and allocate unmanaged mem */ - ApiInterfaceMarshal apiInterfaceMarshal = new ApiInterfaceMarshal(); - IntPtr apiInterfacePtr = Marshal.AllocHGlobal(Marshal.SizeOf(apiInterfaceMarshal)); - - /* Allocate umanaged mem to to interface fields so GC doesn't disturb them */ - apiInterfaceMarshal.interface_name = Marshal.StringToHGlobalAnsi(apiInterface.Name); - apiInterfaceMarshal.desc = Marshal.StringToHGlobalAnsi(apiInterface.Description); - apiInterfaceMarshal.syntax = Marshal.StringToHGlobalAnsi(apiInterface.Syntax); - apiInterfaceMarshal.function = new ApiFunction(apiInterface.ApiFunction); - - /* Set the handle of the managed object */ - apiInterface.handle = new HandleRef(apiInterfaceMarshal, apiInterfacePtr); - - Marshal.StructureToPtr(apiInterfaceMarshal, apiInterface.handle.Handle, true); - - /* Check to see whether there is already an interface defined, if there is then - * we want to set the *next pointer of the last element before adding the new - * interface to the array - */ - if (apiInterfaces.Count > 0) - { - Api apiInterfaceElement = (Api)apiInterfaces[apiInterfaces.Count - 1]; - ApiInterfaceMarshal apiInterfacePrev = (ApiInterfaceMarshal)apiInterfaceElement.handle.Wrapper; - - apiInterfacePrev.next = apiInterface.handle.Handle; - } - - /* Finally, add our new interface to the array */ - apiInterfaces.Add(apiInterface); - } - - /// - /// AddApplicationInterface - /// - /// - public void AddApplicationInterface(Application applicationInterface) - { - /* Create a new ApplicationInterface type and allocate unmanaged mem */ - ApplicationInterfaceMarshal applicationInterfaceMarshal = new ApplicationInterfaceMarshal(); - IntPtr applicationInterfacePtr = Marshal.AllocHGlobal(Marshal.SizeOf(applicationInterfaceMarshal)); - - /* Allocate umanaged mem to to interface fields so GC doesn't disturb them */ - applicationInterfaceMarshal.interface_name = Marshal.StringToHGlobalAnsi(applicationInterface.Name); - applicationInterfaceMarshal.syntax = Marshal.StringToHGlobalAnsi(applicationInterface.Syntax); - applicationInterfaceMarshal.long_desc = Marshal.StringToHGlobalAnsi(applicationInterface.LongDescription); - applicationInterfaceMarshal.short_desc = Marshal.StringToHGlobalAnsi(applicationInterface.ShortDescription); - - applicationInterfaceMarshal.application_function = new ApplicationFunction(applicationInterface.ApplicationFunction); - - /* Set the handle of the managed object */ - applicationInterface.handle = new HandleRef(applicationInterfaceMarshal, applicationInterfacePtr); - - Marshal.StructureToPtr(applicationInterfaceMarshal, applicationInterface.handle.Handle, true); - - /* Check to see whether there is already an interface defined, if there is then - * we want to set the *next pointer of the last element before adding the new - * interface to the array - */ - if (applicationInterfaces.Count > 0) - { - Application applicationInterfaceElement = (Application)applicationInterfaces[applicationInterfaces.Count - 1]; - ApplicationInterfaceMarshal applicationInterfacePrev = (ApplicationInterfaceMarshal)applicationInterfaceElement.handle.Wrapper; - - applicationInterfacePrev.next = applicationInterface.handle.Handle; - } - - /* Finally, add our new interface to the array */ - applicationInterfaces.Add(applicationInterface); - } - - /// - /// 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); - } - - public string Name - { - set { name = value; } - get { return name; } - } - } -} diff --git a/src/dotnet/Modules/Api.cs b/src/dotnet/Modules/Api.cs deleted file mode 100755 index cacd6acbe7..0000000000 --- a/src/dotnet/Modules/Api.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.Types; - -namespace FreeSwitch.Modules -{ - public class Api - { - private string name; - private string description; - private string syntax; - private ApiFunction apiFunction; - public HandleRef handle; - - public string Name - { - set { name = value; } - get { return name; } - } - - public string Description - { - set { description = value; } - get { return description; } - } - - public string Syntax - { - set { syntax = value; } - get { return syntax; } - } - - public ApiFunction ApiFunction - { - set { apiFunction = value; } - get { return apiFunction; } - } - } -} \ No newline at end of file diff --git a/src/dotnet/Modules/Application.cs b/src/dotnet/Modules/Application.cs deleted file mode 100755 index 9df61154db..0000000000 --- a/src/dotnet/Modules/Application.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.Marshaling; -using FreeSwitch.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Modules -{ - public class Application - { - private string name; - private string longDescription; - private string shortDescription; - private string syntax; - private ApplicationFunction applicationFunction; - public HandleRef handle; - - public string Name - { - set { name = value; } - get { return name; } - } - - public string ShortDescription - { - set { shortDescription = value; } - get { return shortDescription; } - } - - public string LongDescription - { - set { longDescription = value; } - get { return longDescription; } - } - - public string Syntax - { - set { syntax = value; } - get { return syntax; } - } - - public ApplicationFunction ApplicationFunction - { - set { applicationFunction = value; } - get { return applicationFunction; } - } - } -} \ No newline at end of file diff --git a/src/dotnet/Properties/AssemblyInfo.cs b/src/dotnet/Properties/AssemblyInfo.cs deleted file mode 100644 index 895c50f78e..0000000000 --- a/src/dotnet/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,5 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("Freeswitch API")] -[assembly: AssemblyDescription("mod_mono allows you to load .NET assemblies that can interact with Freeswitch's module system.")] \ No newline at end of file diff --git a/src/dotnet/Switch/CallerProfile.cs b/src/dotnet/Switch/CallerProfile.cs deleted file mode 100755 index 8b02007386..0000000000 --- a/src/dotnet/Switch/CallerProfile.cs +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - public partial class Switch - { - /* - * TODO: Figure out how to stop mono from trying to free the returned string. - */ - [DllImport("freeswitch")] - //[return: MarshalAs(UnmanagedType.LPStr)] - public extern static - IntPtr switch_caller_get_field_by_name( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerProfileMarshaler))] - CallerProfile caller_profile, - [MarshalAs(UnmanagedType.LPStr)] - string name); - /* - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerProfileMarshaler))] - public extern static - CallerProfile switch_caller_profile_clone( - [MarshalAs - switch_core_session_t *session, switch_caller_profile_t *tocopy) - */ - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerProfileMarshaler))] - public extern static - CallerProfile switch_caller_profile_new( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(MemoryPoolMarshaler))] - MemoryPool pool, - [MarshalAs(UnmanagedType.LPStr)] - string username, - [MarshalAs(UnmanagedType.LPStr)] - string dialplan, - [MarshalAs(UnmanagedType.LPStr)] - string callerIdName, - [MarshalAs(UnmanagedType.LPStr)] - string callerIdNumber, - [MarshalAs(UnmanagedType.LPStr)] - string networkAddress, - [MarshalAs(UnmanagedType.LPStr)] - string ani, - [MarshalAs(UnmanagedType.LPStr)] - string ani2, - [MarshalAs(UnmanagedType.LPStr)] - string rdnis, - [MarshalAs(UnmanagedType.LPStr)] - string source, - [MarshalAs(UnmanagedType.LPStr)] - string context, - [MarshalAs(UnmanagedType.LPStr)] - string destinationNumber); - } -} diff --git a/src/dotnet/Switch/Channel.cs b/src/dotnet/Switch/Channel.cs deleted file mode 100755 index 04711ccb53..0000000000 --- a/src/dotnet/Switch/Channel.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling; - -namespace FreeSwitch -{ - public partial class Switch - { - [DllImport("freeswitch")] - public extern static - ChannelState switch_channel_set_state( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel, - ChannelState channelState); - - [DllImport("freeswitch")] - public extern static - ChannelState switch_channel_get_state( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel); - - [DllImport("freeswitch")] - public extern static - Status switch_channel_answer( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel); - - [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, - CallCause hangup_cause); - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerExtensionMarshaler))] - public extern static - CallerExtension switch_channel_get_caller_extension( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel); - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CallerProfileMarshaler))] - public extern static - CallerProfile switch_channel_get_caller_profile( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ChannelMarshaler))] - Channel channel); - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.LPStr)] - public extern static - string switch_channel_get_variable( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ChannelMarshaler))] - Channel channel, - [MarshalAs(UnmanagedType.LPStr)] - string varname); - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerProfileMarshaler))] - public extern static - CallerProfile switch_channel_get_originator_caller_profile( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel); - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CallerProfileMarshaler))] - public extern static - CallerProfile switch_channel_get_originatee_caller_profile( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ChannelMarshaler))] - Channel channel); - - [DllImport("freeswitch")] - public extern static - ChannelState switch_channel_hangup( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel, - CallCause hangup_cause); - - [DllImport("freeswitch")] - public extern static - uint switch_channel_ready( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel); - } -} diff --git a/src/dotnet/Switch/Console.cs b/src/dotnet/Switch/Console.cs deleted file mode 100644 index f53ef7a2d8..0000000000 --- a/src/dotnet/Switch/Console.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 - * - * - * Console.cs -- - * - */ -using System; -using System.Runtime.CompilerServices; -using System.Diagnostics; -using System.Text; - -namespace FreeSwitch -{ - public partial class Switch - { - } -} diff --git a/src/dotnet/Switch/CoreSession.cs b/src/dotnet/Switch/CoreSession.cs deleted file mode 100755 index 42e4d6551b..0000000000 --- a/src/dotnet/Switch/CoreSession.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling; - -namespace FreeSwitch -{ - public partial class Switch - { - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - public extern static - Channel switch_core_session_get_channel( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session); - - [DllImport("freeswitch")] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(MemoryPoolMarshaler))] - public extern static - MemoryPool switch_core_session_get_pool( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session); - - [DllImport("freeswitch")] - public extern static - Status switch_core_session_outgoing_channel( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string endpointName, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerProfileMarshaler))] - CallerProfile caller_profile, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - ref CoreSession new_session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(MemoryPoolMarshaler))] - MemoryPool pool); - } -} \ No newline at end of file diff --git a/src/dotnet/Switch/Event.cs b/src/dotnet/Switch/Event.cs deleted file mode 100644 index 1e70efad3e..0000000000 --- a/src/dotnet/Switch/Event.cs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling; - -namespace FreeSwitch -{ - public partial class Switch - { - [DllImport("freeswitch")] - public extern static - Status switch_event_bind( - [MarshalAs(UnmanagedType.LPStr)] - string id, - EventType eventType, - string subClassName, - EventCallback callback, - IntPtr userData); - } -} diff --git a/src/dotnet/Switch/Ivr.cs b/src/dotnet/Switch/Ivr.cs deleted file mode 100755 index f370445819..0000000000 --- a/src/dotnet/Switch/Ivr.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - public partial class Switch - { - [DllImport("freeswitch")] - public extern static - Status switch_ivr_sleep( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - UInt32 ms); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_park( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_collect_digits_callback( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - InputCallbackFunction dtmfCallback, - IntPtr buf, - uint buflen); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_collect_digits_count( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string buffer, - uint buflen, - uint maxdigits, - [MarshalAs(UnmanagedType.LPStr)] - string terminators, - [MarshalAs(UnmanagedType.LPStr)] - string terminator, - uint timeout); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_record_session( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string file, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileHandleMarshaler))] - FileHandle fh); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_stop_record_session( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string file); - - [DllImport("freeswitch")] - extern public static - Status switch_ivr_play_file( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileHandleMarshaler))] - FileHandle fh, - [MarshalAs(UnmanagedType.LPStr)] - string file, - [MarshalAs(UnmanagedType.LPStr)] - string timer_name, - InputCallbackFunction input_callback, - IntPtr buf, - uint buflen); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_record_file( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileHandleMarshaler))] - FileHandle fh, - IntPtr file, - InputCallbackFunction input_callback, - IntPtr buf, - uint buflen); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_speak_text_handle( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(SpeechHandleMarshaler))] - SpeechHandle sh, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CodecMarshaler))] - Codec codec, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(TimerMarshaler))] - Timer timer, - InputCallbackFunction dtmfCallback, - [MarshalAs(UnmanagedType.LPStr)] - string text, - IntPtr buf, - uint buflen); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_speak_text( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string tts_name, - [MarshalAs(UnmanagedType.LPStr)] - string voice_name, - [MarshalAs(UnmanagedType.LPStr)] - string timer_name, - uint rate, - InputCallbackFunction dtmfCallback, - [MarshalAs(UnmanagedType.LPStr)] - string text, - IntPtr buf, - uint buflen); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_originate( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - ref CoreSession bleg, - IntPtr cause, - IntPtr bridgeto, - UInt32 timelimit_sec, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StateHandlerTableMarshaler))] - StateHandlerTable table, - [MarshalAs(UnmanagedType.LPStr)] - string cid_name_override, - [MarshalAs(UnmanagedType.LPStr)] - string cid_num_override, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CallerProfileMarshaler))] - CallerProfile caller_profile_override); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_multi_threaded_bridge( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession peer_session, - InputCallbackFunction dtmfCallback, - IntPtr session_data, - IntPtr peer_session_data); - - [DllImport("freeswitch")] - public extern static - Status switch_ivr_session_transfer( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.LPStr)] - string extension, - [MarshalAs(UnmanagedType.LPStr)] - string dialplan, - [MarshalAs(UnmanagedType.LPStr)] - string context); - } -} diff --git a/src/dotnet/Switch/LoadableModule.cs b/src/dotnet/Switch/LoadableModule.cs deleted file mode 100755 index f67e4673f9..0000000000 --- a/src/dotnet/Switch/LoadableModule.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - /* - * SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname) - * SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filename, - * SWITCH_DECLARE(switch_status_t) switch_loadable_module_init() - * SWITCH_DECLARE(void) switch_loadable_module_shutdown(void) - * SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoint_interface(char *name) - * SWITCH_DECLARE(switch_codec_interface_t *) switch_loadable_module_get_codec_interface(char *name) - * SWITCH_DECLARE(switch_dialplan_interface_t *) switch_loadable_module_get_dialplan_interface(char *name) - * SWITCH_DECLARE(switch_timer_interface_t *) switch_loadable_module_get_timer_interface(char *name) - * SWITCH_DECLARE(switch_application_interface_t *) switch_loadable_module_get_application_interface(char *name) - * SWITCH_DECLARE(switch_api_interface_t *) switch_loadable_module_get_api_interface(char *name) - * SWITCH_DECLARE(switch_file_interface_t *) switch_loadable_module_get_file_interface(char *name) - * SWITCH_DECLARE(switch_speech_interface_t *) switch_loadable_module_get_speech_interface(char *name) - * SWITCH_DECLARE(switch_directory_interface_t *) switch_loadable_module_get_directory_interface(char *name) - * SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, switch_codec_interface_t **array, - * SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface_t **array, - * SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, char *retbuf, switch_size_t len) - */ - public partial class Switch - { - [DllImport("__Internal")] - public static extern - Status - switch_loadable_module_build_dynamic( - string filename, - [MarshalAs(UnmanagedType.FunctionPtr)] - ModuleLoad switch_module_load, - [MarshalAs(UnmanagedType.FunctionPtr)] - ModuleRuntime switch_module_runtime, - [MarshalAs(UnmanagedType.FunctionPtr)] - ModuleShutdown switch_module_shutdown); - } -} diff --git a/src/dotnet/Switch/Log.cs b/src/dotnet/Switch/Log.cs deleted file mode 100644 index 4c14ef4ea0..0000000000 --- a/src/dotnet/Switch/Log.cs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 - * - * - * Log.cs -- - * - */ -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using FreeSwitch.Types; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - /* - src/switch_log.c:SWITCH_DECLARE(const char *) switch_log_level2str(switch_log_level_t level) - src/switch_log.c:SWITCH_DECLARE(switch_log_level_t) switch_log_str2level(const char *str) - src/switch_log.c:SWITCH_DECLARE(switch_status_t) switch_log_bind_logger(switch_log_function_t function, switch_log_level_t level) - src/switch_log.c:SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file, const char *func, int line, switch_log_level_t level, char *fmt, ...) - src/switch_log.c:SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool) - src/switch_log.c:SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void) - */ - public partial class Switch - { - [DllImport("freeswitch")] - public extern static - void switch_log_printf( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] - Channel channel, - string file, - string func, - int line, - LogLevel level, - string format); - } -} diff --git a/src/dotnet/Switch/StreamHandle.cs b/src/dotnet/Switch/StreamHandle.cs deleted file mode 100755 index 0f8a4ea384..0000000000 --- a/src/dotnet/Switch/StreamHandle.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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.Types; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch -{ - /* - * SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname) - * SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filename, - * SWITCH_DECLARE(switch_status_t) switch_loadable_module_init() - * SWITCH_DECLARE(void) switch_loadable_module_shutdown(void) - * SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoint_interface(char *name) - * SWITCH_DECLARE(switch_codec_interface_t *) switch_loadable_module_get_codec_interface(char *name) - * SWITCH_DECLARE(switch_dialplan_interface_t *) switch_loadable_module_get_dialplan_interface(char *name) - * SWITCH_DECLARE(switch_timer_interface_t *) switch_loadable_module_get_timer_interface(char *name) - * SWITCH_DECLARE(switch_application_interface_t *) switch_loadable_module_get_application_interface(char *name) - * SWITCH_DECLARE(switch_api_interface_t *) switch_loadable_module_get_api_interface(char *name) - * SWITCH_DECLARE(switch_file_interface_t *) switch_loadable_module_get_file_interface(char *name) - * SWITCH_DECLARE(switch_speech_interface_t *) switch_loadable_module_get_speech_interface(char *name) - * SWITCH_DECLARE(switch_directory_interface_t *) switch_loadable_module_get_directory_interface(char *name) - * SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, switch_codec_interface_t **array, - * SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface_t **array, - * SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, char *retbuf, switch_size_t len) - */ - public partial class Switch - { - - } -} diff --git a/src/dotnet/Types/ApiFunction.cs b/src/dotnet/Types/ApiFunction.cs deleted file mode 100755 index e91251889d..0000000000 --- a/src/dotnet/Types/ApiFunction.cs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 - * - * - * ApiFunction.cs -- - * - */ \ No newline at end of file diff --git a/src/dotnet/Types/ApplicationFunction.cs b/src/dotnet/Types/ApplicationFunction.cs deleted file mode 100755 index a50b042e2c..0000000000 --- a/src/dotnet/Types/ApplicationFunction.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 - * - * - * ApplicationFunction.cs -- - * - */ -using System; - -namespace FreeSwitch.Types -{ - -} diff --git a/src/dotnet/Types/ApplicationInterface.cs b/src/dotnet/Types/ApplicationInterface.cs deleted file mode 100755 index 0d0b1eb12c..0000000000 --- a/src/dotnet/Types/ApplicationInterface.cs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * - * ApplicationInterface.cs -- - * - */ -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Text; - -namespace FreeSwitch.Types -{ - /* - public class ApplicationInterface - { - private string interface_name; - private IntPtr application_function; - private string long_desc; - private string short_desc; - private string syntax; - //const struct switch_application_interface *next; - } - * */ -} diff --git a/src/dotnet/Types/Buffer.cs b/src/dotnet/Types/Buffer.cs deleted file mode 100755 index 9921f2e001..0000000000 --- a/src/dotnet/Types/Buffer.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 - * - * - * Buffer.cs -- - * - */ -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 deleted file mode 100755 index d03832f0dc..0000000000 --- a/src/dotnet/Types/CallCause.cs +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.Types -{ - public enum CallCause - { - Unallocated, - NoRouteTransitNet, - NoRouteDestination, - ChannelUnacceptable, - CallAwardedDelivered, - NormalClearing, - UserBusy, - NoUserResponse, - NoAnswer, - CallRejected, - NumberChanged, - DestinationOutOfOrder, - InvalidNumberFormat, - FacilityRejected, - ResponseToStatusEnquiry, - NormalUnspecified, - NormalCircuitCongestion, - NetworkOutOfOrder, - NormalTemporaryFailure, - SwitchCongestion, - AccessInfoDescarded, - RequestedChannelUnavailable, - PreEmpted, - FacilityNotSubscribed, - OutgoingCallBarred, - IncomingCallBarred, - BearerCapabilityNotAuth, - BearerCapabilityNotAvail, - BearerCapabilityNotImpl, - ChanNotImplemented, - FacilityNotImplemented, - InvalidCallReference, - IncompatibleDestination, - InvalidMsgUnspecified, - MandatoryIeMissing, - MessageTypeNonExistant, - WrongMessage, - IoNonExistant, - InvalidIeContents, - WrongCallState, - RecoveryOnTimeExpire, - MandatoryIeLengthError, - ProtocolError, - Internetworking - } -} diff --git a/src/dotnet/Types/CallerExtension.cs b/src/dotnet/Types/CallerExtension.cs deleted file mode 100755 index 86c8a5e105..0000000000 --- a/src/dotnet/Types/CallerExtension.cs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.Marshaling.Types; - -namespace FreeSwitch.Types -{ - public class CallerExtension - { - internal HandleRef marshaledObject; - - public string ExtensionName - { - get - { - CallerExtensionMarshal callerExtension = (CallerExtensionMarshal)marshaledObject.Wrapper; - - return Marshal.PtrToStringAnsi(callerExtension.extension_name); - } - } - - public string ExtensionNumber - { - get - { - CallerExtensionMarshal callerExtension = (CallerExtensionMarshal)marshaledObject.Wrapper; - - return Marshal.PtrToStringAnsi(callerExtension.extension_number); - } - } - } -} diff --git a/src/dotnet/Types/CallerProfile.cs b/src/dotnet/Types/CallerProfile.cs deleted file mode 100755 index 6d69c05277..0000000000 --- a/src/dotnet/Types/CallerProfile.cs +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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.Marshaling.Types; - -namespace FreeSwitch.Types -{ - public class CallerProfile - { - internal HandleRef marshaledObject; - - public static CallerProfile New(MemoryPool pool, - string username, - string dialplan, - string callerIdName, - string callerIdNumber, - string networkAddress, - string ani, - string ani2, - string rdnis, - string source, - string context, - string destinationNumber) - { - return Switch.switch_caller_profile_new(pool, username, dialplan, callerIdName, callerIdNumber, networkAddress, ani, ani2, rdnis, source, context, destinationNumber); - } - - public string GetFieldByName(string field) - { - IntPtr ptr; - - ptr = Switch.switch_caller_get_field_by_name(this, field); - - if (ptr != IntPtr.Zero) - return Marshal.PtrToStringAnsi(ptr); - else - return ""; - } - - - /* - * Properties - */ - public string Dialplan - { - get { return GetFieldByName("dialplan"); } - } - - public string CallerIdName - { - get { return GetFieldByName("caller_id_name"); } - } - - public string CallerIdNumber - { - get { return GetFieldByName("caller_id_number"); } - } - - public string NetworkAddress - { - get { return GetFieldByName("network_addr"); } - } - - public string Ani - { - get { return GetFieldByName("ani"); } - } - - public string Ani2 - { - get { return GetFieldByName("ani2"); } - } - - public string Rdnis - { - get { return GetFieldByName("rdnis"); } - } - - public string Source - { - get { return GetFieldByName("source"); } - } - - public string Context - { - get { return GetFieldByName("context"); } - } - - public string DestinationNumber - { - get { return GetFieldByName("destination_number"); } - } - - public string ChannelName - { - get { return GetFieldByName("chan_name"); } - } - - public string Uuid - { - get{ return GetFieldByName("uuid"); } - } - - public string Username - { - get { return GetFieldByName("username"); } - } - } -} diff --git a/src/dotnet/Types/Channel.cs b/src/dotnet/Types/Channel.cs deleted file mode 100755 index acdd3d3e4e..0000000000 --- a/src/dotnet/Types/Channel.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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.Marshaling.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; - int kbps; - */ - public class Channel - { - internal HandleRef marshaledObject; - - public string Name - { - get - { - ChannelMarshal channel = (ChannelMarshal) marshaledObject.Wrapper; - - return Marshal.PtrToStringAnsi(channel.name); - } - } - - public Buffer DtmfBuffer - { - get - { - Console.WriteLine("Buffer"); - return new Buffer(); - //throw new NotImplementedException(); - } - } - - public ChannelState State - { - set - { - Switch.switch_channel_set_state(this, value); - } - get - { - return Switch.switch_channel_get_state(this); - } - } - - public bool IsReady - { - get - { - uint isReady = Switch.switch_channel_ready(this); - - if (isReady != 0) - return true; - else - return false; - } - } - - public ChannelFlag Flags - { - get - { - Console.WriteLine("ChannelFlag"); - return new ChannelFlag(); - //throw new NotImplementedException(); - } - } - - public CallerProfile CallerProfile - { - get - { - return Switch.switch_channel_get_caller_profile(this); - } - } - - public CallerProfile OriginatorCallerProfile - { - get - { - return Switch.switch_channel_get_originator_caller_profile(this); - } - } - - public CallerProfile OriginateeCallerProfile - { - get - { - return Switch.switch_channel_get_originatee_caller_profile(this); - } - } - - public CallerExtension CallerExtension - { - get - { - return Switch.switch_channel_get_caller_extension(this); - } - } - - public ChannelTimetable Times - { - get - { - Console.WriteLine("Channel Timetable"); - return new ChannelTimetable(); - // throw new NotImplementedException(); - } - } - - public int Freq - { - get - { - ChannelMarshal channel = (ChannelMarshal) marshaledObject.Wrapper; - - return channel.freq; - } - } - - public int Bits - { - get - { - ChannelMarshal channel = (ChannelMarshal) marshaledObject.Wrapper; - - return channel.bits; - } - } - - public int Channels - { - get - { - ChannelMarshal channel = (ChannelMarshal) marshaledObject.Wrapper; - - return channel.channels; - } - } - - public int Ms - { - get - { - ChannelMarshal channel = (ChannelMarshal) marshaledObject.Wrapper; - - return channel.ms; - } - } - - public int Kbps - { - get { - ChannelMarshal channel = (ChannelMarshal) marshaledObject.Wrapper; - - return channel.kbps; - } - } - - public void PerformHangup() - { - Switch.switch_channel_perform_hangup(this, "file", "func", 100, CallCause.OutgoingCallBarred); - } - - public Status Answer() - { - return Switch.switch_channel_answer(this); - } - - public ChannelState Hangup(CallCause cause) - { - return Switch.switch_channel_perform_hangup(this, "file", "func", 666, cause); - } - - public string GetVariable(string varname) - { - return Switch.switch_channel_get_variable(this, varname); - } - } -} diff --git a/src/dotnet/Types/ChannelFlag.cs b/src/dotnet/Types/ChannelFlag.cs deleted file mode 100755 index 2e9ef55b1f..0000000000 --- a/src/dotnet/Types/ChannelFlag.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - * - * - * ChannelFlag.cs -- - * - */ -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 deleted file mode 100755 index b07f3b505b..0000000000 --- a/src/dotnet/Types/ChannelState.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * - * ChannelState.cs -- - * - */ -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 deleted file mode 100755 index ea7e4dbb5c..0000000000 --- a/src/dotnet/Types/ChannelTimetable.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 - * - * - * ChannelTimetable.cs -- - * - */ -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/Codec.cs b/src/dotnet/Types/Codec.cs deleted file mode 100644 index 97506611eb..0000000000 --- a/src/dotnet/Types/Codec.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 - * - * - * Codec.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Types -{ - public class Codec - { - internal HandleRef marshaledObject; - - } -} \ No newline at end of file diff --git a/src/dotnet/Types/CoreSession.cs b/src/dotnet/Types/CoreSession.cs deleted file mode 100755 index 59ca061bb6..0000000000 --- a/src/dotnet/Types/CoreSession.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* - * 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.Marshaling.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; - switch_queue_t *event_queue; - */ - public class CoreSession - { - public HandleRef marshaledObject; - - /* - * Properties - */ - public UInt32 Id - { - get - { - CoreSessionMarshal coreSessionMarshal = (CoreSessionMarshal)marshaledObject.Wrapper; - - return coreSessionMarshal.id; - } - } - - public string Name - { - get - { - CoreSessionMarshal coreSessionMarshal = (CoreSessionMarshal) marshaledObject.Wrapper; - - return Encoding.ASCII.GetString(coreSessionMarshal.name); - } - } - - public bool IsThreadRunning - { - get - { - CoreSessionMarshal coreSessionMarshal = (CoreSessionMarshal)marshaledObject.Wrapper; - - if (coreSessionMarshal.thread_running <= 0) - return false; - else - return true; - } - } - - public MemoryPool Pool - { - get - { - return Switch.switch_core_session_get_pool(this); - } - } - - - public Channel Channel - { - get - { - return Switch.switch_core_session_get_channel(this); - } - } - - public string Uuid - { - get - { - CoreSessionMarshal coreSessionMarshal = (CoreSessionMarshal)marshaledObject.Wrapper; - - return Encoding.ASCII.GetString(coreSessionMarshal.uuid_str); - } - } - - - public CoreSession OutgoingChannel(string endpointName, CallerProfile callerProfile) - { - CoreSession newSession = new CoreSession(); - MemoryPool pool = new MemoryPool(); - - Status status = Switch.switch_core_session_outgoing_channel(this, endpointName, callerProfile, ref newSession, pool); - - if (status != Status.Success) - throw new Exception("Unsuccessful"); - - - return newSession; - } - - public CoreSession() - { - //CoreSessionMarshal coreSessionMarshal = new CoreSessionMarshal(); - //IntPtr coreSessionPtr = Marshal.AllocHGlobal(Marshal.SizeOf(coreSessionMarshal)); - - //marshaledObject = new HandleRef(coreSessionMarshal, coreSessionPtr); - } - - public Status DtmfCallbackFunctionWrapper(CoreSession session, string dtmf, IntPtr buf, uint buflen) - { - return Status.Success; - } - } -} \ No newline at end of file diff --git a/src/dotnet/Types/DtmfCallbackFunction.cs b/src/dotnet/Types/DtmfCallbackFunction.cs deleted file mode 100755 index d63788fbf2..0000000000 --- a/src/dotnet/Types/DtmfCallbackFunction.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 - * - * - * DtmfCallbackFunction.cs -- - * - */ -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 deleted file mode 100755 index 3f726bbb81..0000000000 --- a/src/dotnet/Types/Event.cs +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.Types -{ - public enum Priority - { - SWITCH_PRIORITY_NORMAL, - SWITCH_PRIORITY_LOW, - SWITCH_PRIORITY_HIGH - } - - public class Event - { - internal HandleRef marshaledObject; - - public EventType EventId - { - get { throw new NotImplementedException(); } - } - - public Priority Priority - { - get { throw new NotImplementedException(); } - } - - public string Owner - { - get { throw new NotImplementedException(); } - } - - public IntPtr Subclass - { - get { throw new NotImplementedException(); } - } - - public ArrayList Headers - { - get { throw new NotImplementedException(); } - } - - public string Body - { - get { throw new NotImplementedException(); } - } - - public IntPtr BindUserData - { - get { throw new NotImplementedException(); } - } - - public IntPtr EventUserData - { - get { throw new NotImplementedException(); } - } - } - - [StructLayout(LayoutKind.Sequential)] - public class EventSubclass - { - private string owner; - private string name; - } - - [StructLayout(LayoutKind.Sequential)] - public class EventHeader - { - public string Name; - public string Value; - } -} diff --git a/src/dotnet/Types/EventCallback.cs b/src/dotnet/Types/EventCallback.cs deleted file mode 100644 index 719964bcff..0000000000 --- a/src/dotnet/Types/EventCallback.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 - * - * - * EventCallback.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; - -namespace FreeSwitch.Types -{ - public delegate void EventCallback( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(EventMarshaler))] - Event _event); -} \ No newline at end of file diff --git a/src/dotnet/Types/EventType.cs b/src/dotnet/Types/EventType.cs deleted file mode 100644 index 16cade1706..0000000000 --- a/src/dotnet/Types/EventType.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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 - * - * - * EventType.cs -- - * - */ -using System; -using System.Collections; -using System.Text; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Types -{ - public enum EventType - { - Custom, - Create, - Destroy, - State, - Answer, - Hangup, - Execute, - Bridge, - UnBridge, - Progress, - Outgoing, - Park, - UnPark, - Api, - Log, - InboundChan, - OutboundChan, - Startup, - Shutdown, - Publish, - UnPublish, - Talk, - NoTalk, - SessionCrash, - ModuleLoad, - Dtmf, - Message, - Codec, - BackgroundJob, - All - } -} \ No newline at end of file diff --git a/src/dotnet/Types/FileHandle.cs b/src/dotnet/Types/FileHandle.cs deleted file mode 100755 index 99cec4f6fc..0000000000 --- a/src/dotnet/Types/FileHandle.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 - * - * - * FileHandle.cs -- - * - */ -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 deleted file mode 100755 index e16ecfd5a2..0000000000 --- a/src/dotnet/Types/InputCallbackFunction.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * - * DtmfCallbackFunction.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; - -namespace FreeSwitch.Types -{ - public delegate Status InputCallbackFunction( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] - 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 deleted file mode 100755 index fed6270cd7..0000000000 --- a/src/dotnet/Types/InputType.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 - * - * - * ChannelState.cs -- - * - */ -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 deleted file mode 100755 index 7d6cc24964..0000000000 --- a/src/dotnet/Types/LoadableModule.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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.Types -{ - public class LoadableModule - { - internal IntPtr address; - - private string name; - private Buffer dtmfBuffer; - internal IntPtr dtmf_mutex; - internal IntPtr session; - private ChannelState state; - private ChannelFlag flags; - private CallerProfile callerProfile; - private CallerProfile originatorCallerProfile; - private CallerProfile originateeCallerProfile; - private CallerExtension callerExtension; - internal byte[] state_handlers; - internal int state_handler_index; - internal IntPtr variables; - private ChannelTimetable times; - internal IntPtr privateInfo; - private int freq; - private int bits; - private int channels; - private int ms; - private int kbps; - - public string Name - { - set { name = value; } - get { return name; } - } - - public Buffer DtmfBuffer - { - set { dtmfBuffer = value; } - get { return dtmfBuffer; } - } - - public ChannelState State - { - set { state = value; } - get { return state; } - } - - public ChannelFlag Flags - { - set { flags = value; } - get { return flags; } - } - - public CallerProfile CallerProfile - { - set { callerProfile = value; } - get { return callerProfile; } - } - - public CallerProfile OriginatorCallerProfile - { - set { originatorCallerProfile = value; } - get { return originatorCallerProfile; } - } - - public CallerProfile OriginateeCallerProfile - { - set { originateeCallerProfile = value; } - get { return originateeCallerProfile; } - } - - public CallerExtension CallerExtension - { - set { callerExtension = value; } - get { return callerExtension; } - } - - public ChannelTimetable Times - { - set { times = value; } - get { return times; } - } - - public int Freq - { - set { freq = value; } - get { return freq; } - } - - public int Bits - { - set { bits = value; } - get { return bits; } - } - - public int Channels - { - set { channels = value; } - get { return channels; } - } - - public int Ms - { - set { ms = value; } - get { return ms; } - } - - public int Kbps - { - set { kbps = value; } - get { return kbps; } - } - } -} diff --git a/src/dotnet/Types/LoadableModuleInterface.cs b/src/dotnet/Types/LoadableModuleInterface.cs deleted file mode 100755 index 89cdb154a5..0000000000 --- a/src/dotnet/Types/LoadableModuleInterface.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 - * - * - * LoadableModuleInterfaces.cs -- - * - */ -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Text; -using FreeSwitch.Marshaling; - -namespace FreeSwitch.Types -{ - - - //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/LogLevel.cs b/src/dotnet/Types/LogLevel.cs deleted file mode 100644 index 9224adcb7b..0000000000 --- a/src/dotnet/Types/LogLevel.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * - * LogLevel.cs -- - * - */ -using System; -using System.Collections; -using System.Text; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Types -{ - public enum LogLevel - { - Console, - Debug, - Info, - Notice, - Warning, - Error, - Crit, - Alert, - Emerg - } -} \ No newline at end of file diff --git a/src/dotnet/Types/MemoryPool.cs b/src/dotnet/Types/MemoryPool.cs deleted file mode 100755 index 51db5a420d..0000000000 --- a/src/dotnet/Types/MemoryPool.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace FreeSwitch.Types -{ - public class MemoryPool - { - public HandleRef marshaledObject; - } -} diff --git a/src/dotnet/Types/Module.cs b/src/dotnet/Types/Module.cs deleted file mode 100755 index 760244b046..0000000000 --- a/src/dotnet/Types/Module.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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.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 input, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(CoreSessionMarshaler))] - CoreSession session, - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StreamHandleMarshaler))] - StreamHandle streamHandle); -} diff --git a/src/dotnet/Types/ModuleInterfaces.cs b/src/dotnet/Types/ModuleInterfaces.cs deleted file mode 100755 index 46022bce7f..0000000000 --- a/src/dotnet/Types/ModuleInterfaces.cs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 - * - * - * ApplicationInterface.cs -- - * - */ -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Text; - -namespace FreeSwitch.Types -{ - /* - public class ApplicationInterface - { - private string interface_name; - private ApplicationFunction application_function; - 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; } - } - }*/ -} diff --git a/src/dotnet/Types/SpeechHandle.cs b/src/dotnet/Types/SpeechHandle.cs deleted file mode 100644 index b4d64af6e8..0000000000 --- a/src/dotnet/Types/SpeechHandle.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 - * - * - * SpeechHandle.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Types -{ - /* - internal IntPtr speech_interface; - internal UInt32 flags; - internal IntPtr name; - internal UInt32 rate; - internal UInt32 speed; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] - internal byte[] voice; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] - internal byte[] engine; - internal IntPtr memory_pool; - internal IntPtr private_info; - */ - public class SpeechHandle - { - internal HandleRef marshaledObject; - - public UInt32 flags - { - get - { - SpeechHandleMarshal speechHandleMarshal = (SpeechHandleMarshal)marshaledObject.Wrapper; - - return speechHandleMarshal.flags; - } - } - } -} diff --git a/src/dotnet/Types/StateHandlerTable.cs b/src/dotnet/Types/StateHandlerTable.cs deleted file mode 100644 index 66c99aa4a0..0000000000 --- a/src/dotnet/Types/StateHandlerTable.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 - * - * - * StateHandlerTable.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Types -{ - public class StateHandlerTable - { - internal HandleRef marshaledObject; - - } -} diff --git a/src/dotnet/Types/Status.cs b/src/dotnet/Types/Status.cs deleted file mode 100755 index 22e5a00f54..0000000000 --- a/src/dotnet/Types/Status.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * - * Status.cs -- - * - */ -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 deleted file mode 100755 index dacd11664a..0000000000 --- a/src/dotnet/Types/StreamHandle.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 - * - * - * StreamHandle.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Types -{ - public delegate Status StreamHandleWriteFunction( - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StreamHandleMarshaler))] - StreamHandle streamHandle, - [MarshalAs(UnmanagedType.LPStr)] - string fmt); - - public class StreamHandle - { - internal HandleRef marshaledObject; - - public void Write(string data) - { - StreamHandleMarshal streamHandleMarshal = (StreamHandleMarshal)marshaledObject.Wrapper; - StreamHandleWriteFunction writeFunction = (StreamHandleWriteFunction)Marshal.GetDelegateForFunctionPointer(streamHandleMarshal.write_function, typeof(StreamHandleWriteFunction)); - - writeFunction(this, data); - } - } -} diff --git a/src/dotnet/Types/TextChannel.cs b/src/dotnet/Types/TextChannel.cs deleted file mode 100755 index 925fb60361..0000000000 --- a/src/dotnet/Types/TextChannel.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 - * - * - * TextChannel.cs -- - * - */ -using System; - -namespace FreeSwitch.Types -{ - public enum TextChannel - { - ChannelIdConsole, - ChannelIdConsoleClean, - ChannelIdEvent - } -} diff --git a/src/dotnet/Types/Timer.cs b/src/dotnet/Types/Timer.cs deleted file mode 100644 index 8e199e4b73..0000000000 --- a/src/dotnet/Types/Timer.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 - * - * - * Timer.cs -- - * - */ -using System; -using System.Runtime.InteropServices; -using FreeSwitch.Marshaling; -using FreeSwitch.Marshaling.Types; - -namespace FreeSwitch.Types -{ - public class Timer - { - internal HandleRef marshaledObject; - - } -} diff --git a/src/dotnet/public.snk b/src/dotnet/public.snk deleted file mode 100644 index 60ac3d5855..0000000000 Binary files a/src/dotnet/public.snk and /dev/null differ