InfoSession.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.9
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace org.doubango.tinyWRAP {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class InfoSession : SipSession {
  12. private HandleRef swigCPtr;
  13. internal InfoSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.InfoSession_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(InfoSession obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~InfoSession() {
  20. Dispose();
  21. }
  22. public override void Dispose() {
  23. lock(this) {
  24. if (swigCPtr.Handle != IntPtr.Zero) {
  25. if (swigCMemOwn) {
  26. swigCMemOwn = false;
  27. tinyWRAPPINVOKE.delete_InfoSession(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public bool send(byte[] buffer, ActionConfig config) {
  36. IntPtr ptr = Marshal.AllocHGlobal(buffer.Length);
  37. Marshal.Copy(buffer, 0, ptr, buffer.Length);
  38. bool ret = this.send(ptr, (uint)buffer.Length, config);
  39. Marshal.FreeHGlobal(ptr);
  40. return ret;
  41. }
  42. public InfoSession(SipStack pStack) : this(tinyWRAPPINVOKE.new_InfoSession(SipStack.getCPtr(pStack)), true) {
  43. }
  44. public bool send(IntPtr payload, uint len, ActionConfig config) {
  45. bool ret = tinyWRAPPINVOKE.InfoSession_send__SWIG_0(swigCPtr, payload, len, ActionConfig.getCPtr(config));
  46. return ret;
  47. }
  48. public bool send(IntPtr payload, uint len) {
  49. bool ret = tinyWRAPPINVOKE.InfoSession_send__SWIG_1(swigCPtr, payload, len);
  50. return ret;
  51. }
  52. public bool accept(ActionConfig config) {
  53. bool ret = tinyWRAPPINVOKE.InfoSession_accept__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  54. return ret;
  55. }
  56. public bool accept() {
  57. bool ret = tinyWRAPPINVOKE.InfoSession_accept__SWIG_1(swigCPtr);
  58. return ret;
  59. }
  60. public bool reject(ActionConfig config) {
  61. bool ret = tinyWRAPPINVOKE.InfoSession_reject__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  62. return ret;
  63. }
  64. public bool reject() {
  65. bool ret = tinyWRAPPINVOKE.InfoSession_reject__SWIG_1(swigCPtr);
  66. return ret;
  67. }
  68. }
  69. }