SubscriptionEvent.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. package org.doubango.tinyWRAP;
  9. public class SubscriptionEvent extends SipEvent {
  10. private long swigCPtr;
  11. protected SubscriptionEvent(long cPtr, boolean cMemoryOwn) {
  12. super(tinyWRAPJNI.SubscriptionEvent_SWIGUpcast(cPtr), cMemoryOwn);
  13. swigCPtr = cPtr;
  14. }
  15. protected static long getCPtr(SubscriptionEvent obj) {
  16. return (obj == null) ? 0 : obj.swigCPtr;
  17. }
  18. protected void finalize() {
  19. delete();
  20. }
  21. public synchronized void delete() {
  22. if (swigCPtr != 0) {
  23. if (swigCMemOwn) {
  24. swigCMemOwn = false;
  25. tinyWRAPJNI.delete_SubscriptionEvent(swigCPtr);
  26. }
  27. swigCPtr = 0;
  28. }
  29. super.delete();
  30. }
  31. public tsip_subscribe_event_type_t getType() {
  32. return tsip_subscribe_event_type_t.swigToEnum(tinyWRAPJNI.SubscriptionEvent_getType(swigCPtr, this));
  33. }
  34. public SubscriptionSession getSession() {
  35. long cPtr = tinyWRAPJNI.SubscriptionEvent_getSession(swigCPtr, this);
  36. return (cPtr == 0) ? null : new SubscriptionSession(cPtr, false);
  37. }
  38. public SubscriptionSession takeSessionOwnership() {
  39. long cPtr = tinyWRAPJNI.SubscriptionEvent_takeSessionOwnership(swigCPtr, this);
  40. return (cPtr == 0) ? null : new SubscriptionSession(cPtr, false);
  41. }
  42. }