PublicationSession.cs 2.0 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 PublicationSession : SipSession {
  12. private HandleRef swigCPtr;
  13. internal PublicationSession(IntPtr cPtr, bool cMemoryOwn) : base(tinyWRAPPINVOKE.PublicationSession_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(PublicationSession obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~PublicationSession() {
  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_PublicationSession(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public PublicationSession(SipStack pStack) : this(tinyWRAPPINVOKE.new_PublicationSession(SipStack.getCPtr(pStack)), true) {
  36. }
  37. public bool publish(IntPtr payload, uint len, ActionConfig config) {
  38. bool ret = tinyWRAPPINVOKE.PublicationSession_publish__SWIG_0(swigCPtr, payload, len, ActionConfig.getCPtr(config));
  39. return ret;
  40. }
  41. public bool publish(IntPtr payload, uint len) {
  42. bool ret = tinyWRAPPINVOKE.PublicationSession_publish__SWIG_1(swigCPtr, payload, len);
  43. return ret;
  44. }
  45. public bool unPublish(ActionConfig config) {
  46. bool ret = tinyWRAPPINVOKE.PublicationSession_unPublish__SWIG_0(swigCPtr, ActionConfig.getCPtr(config));
  47. return ret;
  48. }
  49. public bool unPublish() {
  50. bool ret = tinyWRAPPINVOKE.PublicationSession_unPublish__SWIG_1(swigCPtr);
  51. return ret;
  52. }
  53. }
  54. }