Changed namespace.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2720 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
James Green 2006-09-17 03:30:31 +00:00
parent 036599fb68
commit 1fdc0a26a7
67 changed files with 1648 additions and 1647 deletions

View File

@ -1,8 +1,8 @@
all: $(MODNAME).so all: $(MODNAME).so
$(MODNAME).so: $(MODNAME).so:
gmcs -debug -unsafe -t:library -keyfile:public.snk \ /usr/local/freeswitch/bin/gmcs -debug -unsafe -t:library -keyfile:public.snk \
-out:Freeswitch.dll -reference:Mono.Posix.dll \ -out:FreeSwitch.dll -reference:Mono.Posix.dll \
Properties/AssemblyInfo.cs \ Properties/AssemblyInfo.cs \
Marshaling/Types/ApiInterfaceMarshal.cs \ Marshaling/Types/ApiInterfaceMarshal.cs \
Marshaling/Types/ApplicationInterfaceMarshal.cs \ Marshaling/Types/ApplicationInterfaceMarshal.cs \
@ -24,6 +24,7 @@ $(MODNAME).so:
Marshaling/Types/IOEventHooksMarshal.cs \ Marshaling/Types/IOEventHooksMarshal.cs \
Marshaling/Types/LoadableModuleInterfaceMarshal.cs \ Marshaling/Types/LoadableModuleInterfaceMarshal.cs \
Marshaling/Types/LoadableModuleMarshal.cs \ Marshaling/Types/LoadableModuleMarshal.cs \
Marshaling/Types/StreamHandleMarshal.cs \
Marshaling/Types/TypesMarshal.cs \ Marshaling/Types/TypesMarshal.cs \
Marshaling/BufferMarshaler.cs \ Marshaling/BufferMarshaler.cs \
Marshaling/CallerExtensionMarshaler.cs \ Marshaling/CallerExtensionMarshaler.cs \
@ -57,6 +58,8 @@ $(MODNAME).so:
Types/ChannelTimetable.cs \ Types/ChannelTimetable.cs \
Types/CoreSession.cs \ Types/CoreSession.cs \
Types/DtmfCallbackFunction.cs \ Types/DtmfCallbackFunction.cs \
Types/InputCallbackFunction.cs \
Types/InputType.cs \
Types/Event.cs \ Types/Event.cs \
Types/FileHandle.cs \ Types/FileHandle.cs \
Types/LoadableModule.cs \ Types/LoadableModule.cs \
@ -67,12 +70,10 @@ $(MODNAME).so:
Types/StreamHandle.cs \ Types/StreamHandle.cs \
Types/TextChannel.cs \ Types/TextChannel.cs \
Common.cs \ Common.cs \
Core.cs \
Ivr.cs \
Module.cs \ Module.cs \
clean: clean:
rm -fr *.dll rm -fr *.dll
install: install:
cp -f Freeswitch.dll /usr/local/freeswitch/lib/ cp -f FreeSwitch.dll /usr/local/freeswitch/lib/

View File

@ -31,10 +31,10 @@
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class BufferMarshaler : ICustomMarshaler class BufferMarshaler : ICustomMarshaler
{ {
@ -60,14 +60,14 @@ namespace FreeSwitch.NET.Marshaling
public IntPtr MarshalManagedToNative(object obj) public IntPtr MarshalManagedToNative(object obj)
{ {
FreeSwitch.NET.Types.Buffer buffer = (FreeSwitch.NET.Types.Buffer)obj; FreeSwitch.Types.Buffer buffer = (FreeSwitch.Types.Buffer)obj;
return buffer.marshaledObject.Handle; return buffer.marshaledObject.Handle;
} }
public object MarshalNativeToManaged(IntPtr bufferPtr) public object MarshalNativeToManaged(IntPtr bufferPtr)
{ {
FreeSwitch.NET.Types.Buffer buffer = new FreeSwitch.NET.Types.Buffer(); FreeSwitch.Types.Buffer buffer = new FreeSwitch.Types.Buffer();
BufferMarshal bufferMarshal = new BufferMarshal(); BufferMarshal bufferMarshal = new BufferMarshal();
Marshal.PtrToStructure(bufferPtr, bufferMarshal); Marshal.PtrToStructure(bufferPtr, bufferMarshal);

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallerExtensionMarshaler.cs -- * CallerExtensionMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class CallerExtensionMarshaler : ICustomMarshaler class CallerExtensionMarshaler : ICustomMarshaler
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallerProfileMarshaler.cs -- * CallerProfileMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class CallerProfileMarshaler : ICustomMarshaler class CallerProfileMarshaler : ICustomMarshaler
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* ChannelMarshaler.cs -- * ChannelMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class ChannelMarshaler : ICustomMarshaler class ChannelMarshaler : ICustomMarshaler
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* ChannelTimetableMarshaler.cs -- * ChannelTimetableMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class ChannelTimetableMarshaler : ICustomMarshaler class ChannelTimetableMarshaler : ICustomMarshaler
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CoreSessionMarshaler.cs -- * CoreSessionMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class CoreSessionMarshaler : ICustomMarshaler class CoreSessionMarshaler : ICustomMarshaler
{ {

View File

@ -1,41 +1,41 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* EventMarshaler.cs -- * EventMarshaler.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class EventMarshaler : ICustomMarshaler class EventMarshaler : ICustomMarshaler
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* FileHandleMarshaler.cs -- * FileHandleMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class FileHandleMarshaler : ICustomMarshaler class FileHandleMarshaler : ICustomMarshaler
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* MemoryPoolMarshaler.cs -- * MemoryPoolMarshaler.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class MemoryPoolMarshaler : ICustomMarshaler class MemoryPoolMarshaler : ICustomMarshaler
{ {

View File

@ -31,11 +31,11 @@
*/ */
using System; using System;
using System.Collections; using System.Collections;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling namespace FreeSwitch.Marshaling
{ {
class StreamHandleMarshaler : ICustomMarshaler class StreamHandleMarshaler : ICustomMarshaler
{ {

View File

@ -28,21 +28,21 @@
* *
* ApiInterfaceMarshal.cs -- * ApiInterfaceMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class ApiInterfaceMarshal internal class ApiInterfaceMarshal
{ {
//[MarshalAs(UnmanagedType.LPStr)] //[MarshalAs(UnmanagedType.LPStr)]
internal IntPtr interface_name; internal IntPtr interface_name;
//[MarshalAs(UnmanagedType.LPStr)] //[MarshalAs(UnmanagedType.LPStr)]
internal IntPtr desc; internal IntPtr desc;
internal ApiFunction function; internal ApiFunction function;
internal IntPtr next; internal IntPtr next;
} }
} }

View File

@ -28,25 +28,25 @@
* *
* ApplicationInterfaceMarshal.cs -- * ApplicationInterfaceMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class ApplicationInterfaceMarshal internal class ApplicationInterfaceMarshal
{ {
// [MarshalAs(UnmanagedType.LPStr)] // [MarshalAs(UnmanagedType.LPStr)]
internal IntPtr interface_name; internal IntPtr interface_name;
internal ApplicationFunction application_function; internal ApplicationFunction application_function;
// [MarshalAs(UnmanagedType.LPStr)] // [MarshalAs(UnmanagedType.LPStr)]
internal IntPtr long_desc; internal IntPtr long_desc;
//[MarshalAs(UnmanagedType.LPStr)] //[MarshalAs(UnmanagedType.LPStr)]
internal IntPtr short_desc; internal IntPtr short_desc;
//[MarshalAs(UnmanagedType.LPStr)] //[MarshalAs(UnmanagedType.LPStr)]
internal IntPtr syntax; internal IntPtr syntax;
internal IntPtr next; internal IntPtr next;
} }
} }

View File

@ -28,19 +28,19 @@
* *
* BufferMarshal.cs -- * BufferMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class BufferMarshal internal class BufferMarshal
{ {
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
internal string data; internal string data;
internal int used; internal int used;
internal int datalen; internal int datalen;
internal UInt32 id; internal UInt32 id;
} }
} }

View File

@ -28,19 +28,19 @@
* *
* CallerExtensionMarshal.cs -- * CallerExtensionMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class CallerExtensionMarshal internal class CallerExtensionMarshal
{ {
internal IntPtr extension_name; internal IntPtr extension_name;
internal IntPtr extension_number; internal IntPtr extension_number;
internal IntPtr current_application; internal IntPtr current_application;
internal IntPtr last_application; internal IntPtr last_application;
internal IntPtr applications; internal IntPtr applications;
} }
} }

View File

@ -1,38 +1,38 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallerProfileMarshal.cs -- * CallerProfileMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class CallerProfileMarshal internal class CallerProfileMarshal

View File

@ -28,19 +28,19 @@
* *
* ChannelFlagMarshal.cs -- * ChannelFlagMarshal.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
internal enum ChannelFlagMarshal internal enum ChannelFlagMarshal
{ {
CF_SEND_AUDIO, CF_SEND_AUDIO,
CF_RECV_AUDIO, CF_RECV_AUDIO,
CF_ANSWERED, CF_ANSWERED,
CF_OUTBOUND, CF_OUTBOUND,
CF_EARLY_MEDIA, CF_EARLY_MEDIA,
CF_ORIGINATOR, CF_ORIGINATOR,
CF_TRANSFER CF_TRANSFER
} }
} }

View File

@ -1,39 +1,39 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* ChannelMarshal.cs -- * ChannelMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class ChannelMarshal internal class ChannelMarshal

View File

@ -28,20 +28,20 @@
* *
* ChannelStateMarshal.cs -- * ChannelStateMarshal.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
internal enum ChannelStateMarshal internal enum ChannelStateMarshal
{ {
CS_NEW, CS_NEW,
CS_INIT, CS_INIT,
CS_RING, CS_RING,
CS_TRANSMIT, CS_TRANSMIT,
CS_EXECUTE, CS_EXECUTE,
CS_LOOPBACK, CS_LOOPBACK,
CS_HANGUP, CS_HANGUP,
CS_DONE CS_DONE
} }
} }

View File

@ -28,17 +28,17 @@
* *
* ChannelTimetableMarshal.cs -- * ChannelTimetableMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class ChannelTimetableMarshal internal class ChannelTimetableMarshal
{ {
internal Int64 created; internal Int64 created;
internal Int64 answered; internal Int64 answered;
internal Int64 hungup; internal Int64 hungup;
} }
} }

View File

@ -28,27 +28,27 @@
* *
* CodecImplementationMarshal.cs -- * CodecImplementationMarshal.cs --
* *
*/ */
using System; using System;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
internal class CodecImplementationMarshal internal class CodecImplementationMarshal
{ {
internal UInt32 samples_per_seconds; internal UInt32 samples_per_seconds;
internal int bits_per_second; internal int bits_per_second;
internal int microseconds_per_frame; internal int microseconds_per_frame;
internal UInt32 samples_per_frame; internal UInt32 samples_per_frame;
internal UInt32 bytes_per_frame; internal UInt32 bytes_per_frame;
internal UInt32 encoded_bytes_per_frame; internal UInt32 encoded_bytes_per_frame;
internal Byte number_of_channels; internal Byte number_of_channels;
internal int pref_frames_per_packet; internal int pref_frames_per_packet;
internal int max_frames_per_packet; internal int max_frames_per_packet;
//internal CodecInitMarshal init; //internal CodecInitMarshal init;
//internal CodecEncodeMarshal encode; //internal CodecEncodeMarshal encode;
//internal CodecDecode decode; //internal CodecDecode decode;
//internal CodecDestroy destroy; //internal CodecDestroy destroy;
internal IntPtr next; internal IntPtr next;
} }
} }

View File

@ -28,36 +28,36 @@
* *
* CodecInterfaceMarshal.cs -- * CodecInterfaceMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class CodecInterfaceMarshal internal class CodecInterfaceMarshal
{ {
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
internal string interface_name; internal string interface_name;
/* /*
internal CodecImplementation application_function; internal CodecImplementation application_function;
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
internal string long_desc; internal string long_desc;
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
internal string short_desc; internal string short_desc;
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
internal string syntax; internal string syntax;
internal IntPtr next; internal IntPtr next;
} }
struct switch_codec_interface { struct switch_codec_interface {
! the name of the interface ! the name of the interface
const char *interface_name; const char *interface_name;
! a list of codec implementations related to the codec ! a list of codec implementations related to the codec
const switch_codec_implementation_t *implementations; const switch_codec_implementation_t *implementations;
const struct switch_codec_interface *next; const struct switch_codec_interface *next;
};*/ };*/
} }
} }

View File

@ -28,19 +28,19 @@
* *
* CodecMarshal.cs -- * CodecMarshal.cs --
* *
*/ */
using System; using System;
using System.Text; using System.Text;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
internal class CodecMarshal internal class CodecMarshal
{ {
internal IntPtr codec_interface; internal IntPtr codec_interface;
internal IntPtr implementation; internal IntPtr implementation;
//internal CodecSettingsMarshal codec_settings; //internal CodecSettingsMarshal codec_settings;
internal UInt32 flags; internal UInt32 flags;
//internal MemoryPoolMarshal memory_pool; //internal MemoryPoolMarshal memory_pool;
internal IntPtr private_info; internal IntPtr private_info;
} }
} }

View File

@ -28,16 +28,16 @@
* *
* CodecTypeMarshal.cs -- * CodecTypeMarshal.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
internal enum CodecTypesMarshal internal enum CodecTypesMarshal
{ {
SWITCH_CODEC_TYPE_AUDIO, SWITCH_CODEC_TYPE_AUDIO,
SWITCH_CODEC_TYPE_VIDEO, SWITCH_CODEC_TYPE_VIDEO,
SWITCH_CODEC_TYPE_T38, SWITCH_CODEC_TYPE_T38,
SWITCH_CODEC_TYPE_APP SWITCH_CODEC_TYPE_APP
} }
} }

View File

@ -28,41 +28,41 @@
* *
* CoreSessionMarshal.cs -- * CoreSessionMarshal.cs --
* *
*/ */
using System; using System;
using System.Text; using System.Text;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential, Pack=1)] [StructLayout(LayoutKind.Sequential, Pack=1)]
internal class CoreSessionMarshal internal class CoreSessionMarshal
{ {
internal UInt32 id; internal UInt32 id;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=80)] [MarshalAs(UnmanagedType.ByValArray, SizeConst=80)]
internal byte[] name; internal byte[] name;
internal int thread_running; internal int thread_running;
internal IntPtr pool; internal IntPtr pool;
internal IntPtr channel; internal IntPtr channel;
internal IntPtr thread; internal IntPtr thread;
internal IntPtr endpoint_interface; internal IntPtr endpoint_interface;
internal IOEventHooksMarshal event_hooks; internal IOEventHooksMarshal event_hooks;
internal IntPtr read_codec; internal IntPtr read_codec;
internal IntPtr write_codec; internal IntPtr write_codec;
internal IntPtr raw_write_buffer; internal IntPtr raw_write_buffer;
internal FrameMarshal raw_write_frame; internal FrameMarshal raw_write_frame;
internal FrameMarshal enc_write_frame; internal FrameMarshal enc_write_frame;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)]
internal byte[] raw_write_buf; internal byte[] raw_write_buf;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)]
internal byte[] enc_write_buf; internal byte[] enc_write_buf;
internal IntPtr raw_read_buffer; internal IntPtr raw_read_buffer;
internal FrameMarshal raw_read_frame; internal FrameMarshal raw_read_frame;
internal FrameMarshal enc_read_frame; internal FrameMarshal enc_read_frame;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)]
internal byte[] raw_read_buf; internal byte[] raw_read_buf;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)] [MarshalAs(UnmanagedType.ByValArray, SizeConst=2048)]
internal byte[] enc_read_buf; internal byte[] enc_read_buf;
internal IntPtr read_resampler; internal IntPtr read_resampler;
internal IntPtr write_resampler; internal IntPtr write_resampler;
internal IntPtr mutex; internal IntPtr mutex;
@ -73,8 +73,8 @@ namespace FreeSwitch.NET.Marshaling.Types
internal int stream_count; internal int stream_count;
/* 36 + 1 char string, but need to grab 40 bytes */ /* 36 + 1 char string, but need to grab 40 bytes */
[MarshalAs(UnmanagedType.ByValArray, SizeConst=40)] [MarshalAs(UnmanagedType.ByValArray, SizeConst=40)]
internal byte[] uuid_str; internal byte[] uuid_str;
internal IntPtr private_info; internal IntPtr private_info;
internal IntPtr event_queue; internal IntPtr event_queue;
} }
} }

View File

@ -28,32 +28,32 @@
* *
* EventMarshal.cs -- * EventMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class EventMarshal internal class EventMarshal
{ {
internal EventType event_id; internal EventType event_id;
internal Priority priority; internal Priority priority;
internal IntPtr owner; internal IntPtr owner;
internal IntPtr subclass; internal IntPtr subclass;
internal IntPtr headers; internal IntPtr headers;
internal IntPtr body; internal IntPtr body;
internal IntPtr bind_user_data; internal IntPtr bind_user_data;
internal IntPtr event_user_data; internal IntPtr event_user_data;
internal IntPtr next; internal IntPtr next;
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class EventHeaderMarshal internal class EventHeaderMarshal
{ {
internal string name; internal string name;
internal string value; internal string value;
internal IntPtr next; internal IntPtr next;
} }
} }

View File

@ -28,30 +28,30 @@
* *
* FileHandleMarshal.cs -- * FileHandleMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class FileHandleMarshal internal class FileHandleMarshal
{ {
internal IntPtr file_interface; internal IntPtr file_interface;
internal UInt32 flags; internal UInt32 flags;
internal IntPtr fd; internal IntPtr fd;
internal uint samples; internal uint samples;
internal UInt32 samplerate; internal UInt32 samplerate;
internal Byte channels; internal Byte channels;
internal uint format; internal uint format;
internal uint sections; internal uint sections;
internal int seekable; internal int seekable;
internal uint sample_count; internal uint sample_count;
internal int speed; internal int speed;
internal IntPtr memory_pool; internal IntPtr memory_pool;
internal IntPtr private_info; internal IntPtr private_info;
internal Int64 pos; internal Int64 pos;
internal IntPtr audio_buffer; internal IntPtr audio_buffer;
} }
} }

View File

@ -28,27 +28,27 @@
* *
* FrameMarshal.cs -- * FrameMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class FrameMarshal internal class FrameMarshal
{ {
internal IntPtr codec; internal IntPtr codec;
internal IntPtr source; internal IntPtr source;
internal IntPtr packet; internal IntPtr packet;
internal UInt32 packetlen; internal UInt32 packetlen;
internal IntPtr data; internal IntPtr data;
internal UInt32 datalen; internal UInt32 datalen;
internal UInt32 buflen; internal UInt32 buflen;
internal UInt32 samples; internal UInt32 samples;
internal UInt32 rate; internal UInt32 rate;
internal byte payload; internal byte payload;
internal UInt32 timestamp; internal UInt32 timestamp;
internal byte flags; internal byte flags;
} }
} }

View File

@ -28,24 +28,24 @@
* *
* IOEventHooksMarshal.cs -- * IOEventHooksMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class IOEventHooksMarshal internal class IOEventHooksMarshal
{ {
internal IntPtr outgoing_channel; internal IntPtr outgoing_channel;
internal IntPtr answer_channel; internal IntPtr answer_channel;
internal IntPtr receive_message; internal IntPtr receive_message;
internal IntPtr receive_event; internal IntPtr receive_event;
internal IntPtr read_frame; internal IntPtr read_frame;
internal IntPtr write_frame; internal IntPtr write_frame;
internal IntPtr kill_channel; internal IntPtr kill_channel;
internal IntPtr waitfor_read; internal IntPtr waitfor_read;
internal IntPtr waitfor_write; internal IntPtr waitfor_write;
internal IntPtr send_dtmf; internal IntPtr send_dtmf;
} }
} }

View File

@ -28,25 +28,25 @@
* *
* LoadableModuleInterfaceMarshal.cs -- * LoadableModuleInterfaceMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class LoadableModuleInterfaceMarshal internal class LoadableModuleInterfaceMarshal
{ {
internal IntPtr module_name; internal IntPtr module_name;
internal IntPtr endpoint_interface; internal IntPtr endpoint_interface;
internal IntPtr timer_interface; internal IntPtr timer_interface;
internal IntPtr dialplan_interface; internal IntPtr dialplan_interface;
internal IntPtr codec_interface; internal IntPtr codec_interface;
internal IntPtr application_interface; internal IntPtr application_interface;
internal IntPtr api_interface; internal IntPtr api_interface;
internal IntPtr file_interface; internal IntPtr file_interface;
internal IntPtr speech_interface; internal IntPtr speech_interface;
internal IntPtr directory_interface; internal IntPtr directory_interface;
} }
} }

View File

@ -28,27 +28,27 @@
* *
* LoadableModuleMarshal.cs -- * LoadableModuleMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public class LoadableModuleMarshal public class LoadableModuleMarshal
{ {
public IntPtr filename; public IntPtr filename;
public IntPtr module_interface; public IntPtr module_interface;
public IntPtr lib; public IntPtr lib;
public ModuleLoad module_load; public ModuleLoad module_load;
public ModuleReload module_reload; public ModuleReload module_reload;
public ModulePause module_pause; public ModulePause module_pause;
public ModuleResume module_resume; public ModuleResume module_resume;
public ModuleStatus module_status; public ModuleStatus module_status;
public ModuleRuntime module_runtime; public ModuleRuntime module_runtime;
public ModuleShutdown module_shutdown; public ModuleShutdown module_shutdown;
} }
} }

View File

@ -28,21 +28,21 @@
* *
* StreamHandleMarshal.cs -- * StreamHandleMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class StreamHandleMarshal internal class StreamHandleMarshal
{ {
internal IntPtr write_function; internal IntPtr write_function;
internal IntPtr data; internal IntPtr data;
internal IntPtr end; internal IntPtr end;
internal int data_size; internal int data_size;
internal int data_len; internal int data_len;
internal IntPtr _event; internal IntPtr _event;
} }
} }

View File

@ -28,18 +28,18 @@
* *
* TypesMarshal.cs -- * TypesMarshal.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Marshaling.Types namespace FreeSwitch.Marshaling.Types
{ {
public delegate public delegate
Status DtmfCallbackFunctionMarshal( Status DtmfCallbackFunctionMarshal(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))]
CoreSession session, CoreSession session,
string dtmf, string dtmf,
IntPtr buf, IntPtr buf,
uint buflen); uint buflen);
} }

View File

@ -1,50 +1,50 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Module.cs -- * Module.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using FreeSwitch.NET; using FreeSwitch.NET;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Modules; using FreeSwitch.Modules;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET namespace FreeSwitch.NET
{ {
/// <summary> /// <summary>
/// Base class for all Freeswitch.NET modules /// Base class for all Freeswitch.NET modules
/// </summary> /// </summary>
/// <example> /// <example>
/// public class Example : Module /// public class Example : Module
/// { /// {
/// public Example() /// public Example()
@ -54,9 +54,9 @@ namespace FreeSwitch.NET
/// ///
/// Register(); /// Register();
/// } /// }
/// } /// }
/// </example> /// </example>
public class Module public class Module
{ {
private LoadableModuleInterfaceMarshal module_interface = new LoadableModuleInterfaceMarshal(); private LoadableModuleInterfaceMarshal module_interface = new LoadableModuleInterfaceMarshal();
private LoadableModuleMarshal module = new LoadableModuleMarshal(); private LoadableModuleMarshal module = new LoadableModuleMarshal();
@ -71,19 +71,19 @@ namespace FreeSwitch.NET
/// <summary> /// <summary>
/// Module constructor /// Module constructor
/// </summary> /// </summary>
public Module() public Module()
{ {
Console.WriteLine("*** Creating new module object"); Console.WriteLine("*** Creating new module object");
load = new ModuleLoad(Load); load = new ModuleLoad(Load);
} }
/// <summary> /// <summary>
/// Implementation of ModuleLoad Delegate /// Implementation of ModuleLoad Delegate
/// </summary> /// </summary>
/// <param name="module"></param> /// <param name="module"></param>
/// <param name="name"></param> /// <param name="name"></param>
/// <returns></returns> /// <returns></returns>
public Status Load(ref IntPtr module, string name) public Status Load(ref IntPtr module, string name)
{ {
/* Allocate some unmanaged mem for the ModuleInterface */ /* Allocate some unmanaged mem for the ModuleInterface */
@ -110,13 +110,13 @@ namespace FreeSwitch.NET
Marshal.StructureToPtr(module_interface, module, true); Marshal.StructureToPtr(module_interface, module, true);
return Status.Success; return Status.Success;
} }
/// <summary> /// <summary>
/// AddApiInterface /// AddApiInterface
/// </summary> /// </summary>
/// <param name="apiInterface"></param> /// <param name="apiInterface"></param>
public void AddApiInterface(Api apiInterface) public void AddApiInterface(Api apiInterface)
{ {
/* Create a new ApiInterface type and allocate unmanaged mem */ /* Create a new ApiInterface type and allocate unmanaged mem */
ApiInterfaceMarshal apiInterfaceMarshal = new ApiInterfaceMarshal(); ApiInterfaceMarshal apiInterfaceMarshal = new ApiInterfaceMarshal();
@ -185,21 +185,21 @@ namespace FreeSwitch.NET
/* Finally, add our new interface to the array */ /* Finally, add our new interface to the array */
applicationInterfaces.Add(applicationInterface); applicationInterfaces.Add(applicationInterface);
} }
/// <summary> /// <summary>
/// Register /// Register
/// </summary> /// </summary>
public void Register() public void Register()
{ {
module.module_load = new ModuleLoad(Load); module.module_load = new ModuleLoad(Load);
Switch.switch_loadable_module_build_dynamic(filename, Switch.switch_loadable_module_build_dynamic(filename,
module.module_load, module.module_load,
module.module_runtime, module.module_runtime,
module.module_shutdown); module.module_shutdown);
} }
} }
} }

View File

@ -1,41 +1,41 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Api.cs -- * Api.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Text; using System.Text;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
namespace FreeSwitch.NET.Modules namespace FreeSwitch.Modules
{ {
public class Api public class Api
{ {

View File

@ -1,43 +1,43 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Application.cs -- * Application.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Text; using System.Text;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Modules namespace FreeSwitch.Modules
{ {
public class Application public class Application
{ {

View File

@ -1,42 +1,42 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallerProfile.cs -- * CallerProfile.cs --
* *
*/ */
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
public partial class Switch public partial class Switch
{ {

View File

@ -1,41 +1,41 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Channel.cs -- * Channel.cs --
* *
*/ */
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
public partial class Switch public partial class Switch
{ {
@ -60,14 +60,14 @@ namespace FreeSwitch.NET
[DllImport("freeswitch")] [DllImport("freeswitch")]
public extern static public extern static
ChannelState switch_channel_perform_hangup( ChannelState switch_channel_perform_hangup(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(ChannelMarshaler))]
Channel channel, Channel channel,
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string file, string file,
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string func, string func,
int line, int line,
CallCause hangup_cause); CallCause hangup_cause);
[DllImport("freeswitch")] [DllImport("freeswitch")]

View File

@ -34,7 +34,7 @@ using System.Runtime.CompilerServices;
using System.Diagnostics; using System.Diagnostics;
using System.Text; using System.Text;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
public partial class Switch public partial class Switch
{ {

View File

@ -1,41 +1,41 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CoreSession.cs -- * CoreSession.cs --
* *
*/ */
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
public partial class Switch public partial class Switch
{ {

View File

@ -1,42 +1,42 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Ivr.cs -- * Ivr.cs --
* *
*/ */
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
public partial class Switch public partial class Switch
{ {

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* LoadableModule.cs -- * LoadableModule.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
/* /*
* SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname) * SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname)

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* LoadableModule.cs -- * LoadableModule.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Types; using FreeSwitch.Types;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET namespace FreeSwitch
{ {
/* /*
* SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname) * SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname)

View File

@ -28,10 +28,10 @@
* *
* ApplicationFunction.cs -- * ApplicationFunction.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
} }

View File

@ -34,7 +34,7 @@ using System.Collections;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
/* /*
public class ApplicationInterface public class ApplicationInterface

View File

@ -28,29 +28,29 @@
* *
* Buffer.cs -- * Buffer.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class Buffer public class Buffer
{ {
internal HandleRef marshaledObject; internal HandleRef marshaledObject;
public string Data public string Data
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
public int Used public int Used
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
public int Length public int Length
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
} }
} }

View File

@ -1,37 +1,37 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallCause.cs -- * CallCause.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum CallCause public enum CallCause
{ {

View File

@ -1,39 +1,39 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallerExtension.cs -- * CallerExtension.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class CallerExtension public class CallerExtension
{ {

View File

@ -1,39 +1,39 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CallerProfile.cs -- * CallerProfile.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class CallerProfile public class CallerProfile
{ {

View File

@ -1,63 +1,63 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Channel.cs -- * Channel.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
/* /*
* char *name; * char *name;
switch_buffer_t *dtmf_buffer; switch_buffer_t *dtmf_buffer;
switch_mutex_t *dtmf_mutex; switch_mutex_t *dtmf_mutex;
switch_mutex_t *flag_mutex; switch_mutex_t *flag_mutex;
switch_mutex_t *profile_mutex; switch_mutex_t *profile_mutex;
switch_core_session_t *session; switch_core_session_t *session;
switch_channel_state_t state; switch_channel_state_t state;
uint32_t flags; uint32_t flags;
switch_caller_profile_t *caller_profile; switch_caller_profile_t *caller_profile;
switch_caller_profile_t *originator_caller_profile; switch_caller_profile_t *originator_caller_profile;
switch_caller_profile_t *originatee_caller_profile; switch_caller_profile_t *originatee_caller_profile;
switch_caller_extension_t *caller_extension; switch_caller_extension_t *caller_extension;
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS]; const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index; int state_handler_index;
switch_hash_t *variables; switch_hash_t *variables;
switch_channel_timetable_t *times; switch_channel_timetable_t *times;
void *private_info; void *private_info;
switch_call_cause_t hangup_cause; switch_call_cause_t hangup_cause;
int freq; int freq;
int bits; int bits;
int channels; int channels;
int ms; int ms;
int kbps; int kbps;
*/ */
public class Channel public class Channel

View File

@ -28,19 +28,19 @@
* *
* ChannelFlag.cs -- * ChannelFlag.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum ChannelFlag public enum ChannelFlag
{ {
CF_SEND_AUDIO, CF_SEND_AUDIO,
CF_RECV_AUDIO, CF_RECV_AUDIO,
CF_ANSWERED, CF_ANSWERED,
CF_OUTBOUND, CF_OUTBOUND,
CF_EARLY_MEDIA, CF_EARLY_MEDIA,
CF_ORIGINATOR, CF_ORIGINATOR,
CF_TRANSFER CF_TRANSFER
} }
} }

View File

@ -28,20 +28,20 @@
* *
* ChannelState.cs -- * ChannelState.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum ChannelState public enum ChannelState
{ {
CS_NEW, CS_NEW,
CS_INIT, CS_INIT,
CS_RING, CS_RING,
CS_TRANSMIT, CS_TRANSMIT,
CS_EXECUTE, CS_EXECUTE,
CS_LOOPBACK, CS_LOOPBACK,
CS_HANGUP, CS_HANGUP,
CS_DONE CS_DONE
} }
} }

View File

@ -28,29 +28,29 @@
* *
* ChannelTimetable.cs -- * ChannelTimetable.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class ChannelTimetable public class ChannelTimetable
{ {
internal HandleRef marshaledObject; internal HandleRef marshaledObject;
public Int64 Created public Int64 Created
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
public Int64 Answered public Int64 Answered
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
public Int64 Hungup public Int64 Hungup
{ {
get { throw new NotImplementedException(); } get { throw new NotImplementedException(); }
} }
} }
} }

View File

@ -1,80 +1,80 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* CoreSession.cs -- * CoreSession.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
/* /*
* uint32_t id; * uint32_t id;
char name[80]; char name[80];
int thread_running; int thread_running;
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
switch_channel_t *channel; switch_channel_t *channel;
switch_thread_t *thread; switch_thread_t *thread;
const switch_endpoint_interface_t *endpoint_interface; const switch_endpoint_interface_t *endpoint_interface;
switch_io_event_hooks_t event_hooks; switch_io_event_hooks_t event_hooks;
switch_codec_t *read_codec; switch_codec_t *read_codec;
switch_codec_t *write_codec; switch_codec_t *write_codec;
switch_buffer_t *raw_write_buffer; switch_buffer_t *raw_write_buffer;
switch_frame_t raw_write_frame; switch_frame_t raw_write_frame;
switch_frame_t enc_write_frame; switch_frame_t enc_write_frame;
uint8_t raw_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; uint8_t raw_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
uint8_t enc_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; uint8_t enc_write_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
switch_buffer_t *raw_read_buffer; switch_buffer_t *raw_read_buffer;
switch_frame_t raw_read_frame; switch_frame_t raw_read_frame;
switch_frame_t enc_read_frame; switch_frame_t enc_read_frame;
uint8_t raw_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE]; uint8_t raw_read_buf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
uint8_t enc_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 *read_resampler;
switch_audio_resampler_t *write_resampler; switch_audio_resampler_t *write_resampler;
switch_mutex_t *mutex; switch_mutex_t *mutex;
switch_thread_cond_t *cond; switch_thread_cond_t *cond;
switch_thread_rwlock_t *rwlock; switch_thread_rwlock_t *rwlock;
void *streams[SWITCH_MAX_STREAMS]; void *streams[SWITCH_MAX_STREAMS];
int stream_count; int stream_count;
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1]; char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
void *private_info; void *private_info;
switch_queue_t *event_queue; switch_queue_t *event_queue;
*/ */
public class CoreSession public class CoreSession

View File

@ -28,10 +28,10 @@
* *
* DtmfCallbackFunction.cs -- * DtmfCallbackFunction.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public delegate Status DtmfCallbackFunction(CoreSession session, string dtmf); public delegate Status DtmfCallbackFunction(CoreSession session, string dtmf);
} }

View File

@ -1,40 +1,40 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Event.cs -- * Event.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Text; using System.Text;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum Priority public enum Priority
{ {

View File

@ -28,15 +28,15 @@
* *
* FileHandle.cs -- * FileHandle.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class FileHandle public class FileHandle
{ {
internal HandleRef marshaledObject; internal HandleRef marshaledObject;
} }
} }

View File

@ -28,20 +28,20 @@
* *
* DtmfCallbackFunction.cs -- * DtmfCallbackFunction.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public delegate Status InputCallbackFunction( public delegate Status InputCallbackFunction(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))]
CoreSession session, CoreSession session,
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string input, string input,
InputType inputType, InputType inputType,
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string buffer, string buffer,
int bufferLength); int bufferLength);
} }

View File

@ -28,14 +28,14 @@
* *
* ChannelState.cs -- * ChannelState.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum InputType public enum InputType
{ {
INPUT_TYPE_DTMF, INPUT_TYPE_DTMF,
INPUT_TYPE_EVENT INPUT_TYPE_EVENT
} }
} }

View File

@ -1,38 +1,38 @@
/* /*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2006, James Martelletti <james@nerdc0re.com> * Copyright (C) 2006, James Martelletti <james@nerdc0re.com>
* *
* Version: MPL 1.1 * Version: MPL 1.1
* *
* The contents of this file are subject to the Mozilla Public License Version * 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 * 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 * the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/ * http://www.mozilla.org/MPL/
* *
* Software distributed under the License is distributed on an "AS IS" basis, * Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* Portions created by the Initial Developer are Copyright (C) * Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): * Contributor(s):
* *
* James Martelletti <james@nerdc0re.com> * James Martelletti <james@nerdc0re.com>
* *
* *
* Channel.cs -- * Channel.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class LoadableModule public class LoadableModule
{ {

View File

@ -28,34 +28,34 @@
* *
* LoadableModuleInterfaces.cs -- * LoadableModuleInterfaces.cs --
* *
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public delegate Status WriteFunction( public delegate Status WriteFunction(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(StreamHandleMarshaler))]
StreamHandle streamHandle, StreamHandle streamHandle,
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string fmt); string fmt);
//public delegate void ModuleLoad(); //public delegate void ModuleLoad();
public class LoadableModuleInterface public class LoadableModuleInterface
{ {
private string module_name; private string module_name;
//private EndpointInterface endpoint_interface; //private EndpointInterface endpoint_interface;
//private TimerInterface timer_interface; //private TimerInterface timer_interface;
//private DialplanInterface dialplan_interface; //private DialplanInterface dialplan_interface;
//private CodecInterface codec_interface; //private CodecInterface codec_interface;
//private ApplicationInterface application_interface; //private ApplicationInterface application_interface;
//private ApiInterface api_interface; //private ApiInterface api_interface;
//private FileInterface file_interface; //private FileInterface file_interface;
//private SpeechInterface speech_interface; //private SpeechInterface speech_interface;
//private DirectoryInterface directory_interface; //private DirectoryInterface directory_interface;
} }
} }

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class MemoryPool public class MemoryPool
{ {

View File

@ -28,32 +28,32 @@
* *
* Module.cs -- * Module.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling; using FreeSwitch.Marshaling;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public delegate Status ModuleReload(); public delegate Status ModuleReload();
public delegate bool ModulePause(); public delegate bool ModulePause();
public delegate bool ModuleResume(); public delegate bool ModuleResume();
public delegate bool ModuleStatus(); public delegate bool ModuleStatus();
public delegate Status ModuleRuntime(); public delegate Status ModuleRuntime();
public delegate bool ModuleShutdown(); public delegate bool ModuleShutdown();
public delegate Status ModuleLoad(ref IntPtr module, string name); public delegate Status ModuleLoad(ref IntPtr module, string name);
public delegate void public delegate void
ApplicationFunction( ApplicationFunction(
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CoreSessionMarshaler))]
CoreSession session, CoreSession session,
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string data); string data);
public delegate Status public delegate Status
ApiFunction( ApiFunction(
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
string command, string command,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StreamHandleMarshaler))] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(StreamHandleMarshaler))]
StreamHandle streamHandle); StreamHandle streamHandle);
} }

View File

@ -34,7 +34,7 @@ using System.Collections;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
/* /*
public class ApplicationInterface public class ApplicationInterface
@ -44,26 +44,26 @@ namespace FreeSwitch.NET.Types
private string long_desc; private string long_desc;
private string short_desc; private string short_desc;
private string syntax; private string syntax;
//const struct switch_application_interface *next; //const struct switch_application_interface *next;
public string InterfaceName public string InterfaceName
{ {
get { return interface_name; } get { return interface_name; }
} }
public ApplicationFunction ApplicationFunction public ApplicationFunction ApplicationFunction
{ {
get { return application_function; } get { return application_function; }
} }
public string LongDesc public string LongDesc
{ {
get { return long_desc; } get { return long_desc; }
} }
public string ShortDesc public string ShortDesc
{ {
get { return short_desc; } get { return short_desc; }
} }
}*/ }*/
} }

View File

@ -28,24 +28,24 @@
* *
* Status.cs -- * Status.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum Status public enum Status
{ {
Success, Success,
False, False,
Timeout, Timeout,
Restart, Restart,
Terminate, Terminate,
NotImplemented, NotImplemented,
MemoryError, MemoryError,
NoOp, NoOp,
Resample, Resample,
GeneralError, GeneralError,
InUse, InUse,
Break Break
} }
} }

View File

@ -28,24 +28,24 @@
* *
* StreamHandle.cs -- * StreamHandle.cs --
* *
*/ */
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using FreeSwitch.NET.Marshaling.Types; using FreeSwitch.Marshaling.Types;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public class StreamHandle public class StreamHandle
{ {
internal HandleRef marshaledObject; internal HandleRef marshaledObject;
internal WriteFunction writeFunction; internal WriteFunction writeFunction;
public void Write(string data) public void Write(string data)
{ {
StreamHandleMarshal streamHandleMarshal = (StreamHandleMarshal)marshaledObject.Wrapper; StreamHandleMarshal streamHandleMarshal = (StreamHandleMarshal)marshaledObject.Wrapper;
WriteFunction writeFunction = (WriteFunction)Marshal.GetDelegateForFunctionPointer(streamHandleMarshal.write_function, typeof(WriteFunction)); WriteFunction writeFunction = (WriteFunction)Marshal.GetDelegateForFunctionPointer(streamHandleMarshal.write_function, typeof(WriteFunction));
writeFunction(this, data); writeFunction(this, data);
} }
} }
} }

View File

@ -28,15 +28,15 @@
* *
* TextChannel.cs -- * TextChannel.cs --
* *
*/ */
using System; using System;
namespace FreeSwitch.NET.Types namespace FreeSwitch.Types
{ {
public enum TextChannel public enum TextChannel
{ {
ChannelIdConsole, ChannelIdConsole,
ChannelIdConsoleClean, ChannelIdConsoleClean,
ChannelIdEvent ChannelIdEvent
} }
} }