SipEvent.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 SipEvent : IDisposable {
  12. private HandleRef swigCPtr;
  13. protected bool swigCMemOwn;
  14. internal SipEvent(IntPtr cPtr, bool cMemoryOwn) {
  15. swigCMemOwn = cMemoryOwn;
  16. swigCPtr = new HandleRef(this, cPtr);
  17. }
  18. internal static HandleRef getCPtr(SipEvent obj) {
  19. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  20. }
  21. ~SipEvent() {
  22. Dispose();
  23. }
  24. public virtual void Dispose() {
  25. lock(this) {
  26. if (swigCPtr.Handle != IntPtr.Zero) {
  27. if (swigCMemOwn) {
  28. swigCMemOwn = false;
  29. tinyWRAPPINVOKE.delete_SipEvent(swigCPtr);
  30. }
  31. swigCPtr = new HandleRef(null, IntPtr.Zero);
  32. }
  33. GC.SuppressFinalize(this);
  34. }
  35. }
  36. public short getCode() {
  37. short ret = tinyWRAPPINVOKE.SipEvent_getCode(swigCPtr);
  38. return ret;
  39. }
  40. public string getPhrase() {
  41. string ret = tinyWRAPPINVOKE.SipEvent_getPhrase(swigCPtr);
  42. return ret;
  43. }
  44. public SipSession getBaseSession() {
  45. IntPtr cPtr = tinyWRAPPINVOKE.SipEvent_getBaseSession(swigCPtr);
  46. SipSession ret = (cPtr == IntPtr.Zero) ? null : new SipSession(cPtr, false);
  47. return ret;
  48. }
  49. public SipMessage getSipMessage() {
  50. IntPtr cPtr = tinyWRAPPINVOKE.SipEvent_getSipMessage(swigCPtr);
  51. SipMessage ret = (cPtr == IntPtr.Zero) ? null : new SipMessage(cPtr, false);
  52. return ret;
  53. }
  54. }
  55. }