SipSession.java 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 SipSession {
  10. private long swigCPtr;
  11. protected boolean swigCMemOwn;
  12. protected SipSession(long cPtr, boolean cMemoryOwn) {
  13. swigCMemOwn = cMemoryOwn;
  14. swigCPtr = cPtr;
  15. }
  16. protected static long getCPtr(SipSession obj) {
  17. return (obj == null) ? 0 : obj.swigCPtr;
  18. }
  19. protected void finalize() {
  20. delete();
  21. }
  22. public synchronized void delete() {
  23. if (swigCPtr != 0) {
  24. if (swigCMemOwn) {
  25. swigCMemOwn = false;
  26. tinyWRAPJNI.delete_SipSession(swigCPtr);
  27. }
  28. swigCPtr = 0;
  29. }
  30. }
  31. protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) {
  32. if(bytes != null){
  33. final java.nio.ByteBuffer byteBuffer = java.nio.ByteBuffer.allocateDirect(bytes.length);
  34. byteBuffer.put(bytes);
  35. return byteBuffer;
  36. }
  37. return null;
  38. }
  39. public SipSession(SipStack stack) {
  40. this(tinyWRAPJNI.new_SipSession(SipStack.getCPtr(stack), stack), true);
  41. }
  42. public boolean haveOwnership() {
  43. return tinyWRAPJNI.SipSession_haveOwnership(swigCPtr, this);
  44. }
  45. public boolean addHeader(String name, String value) {
  46. return tinyWRAPJNI.SipSession_addHeader(swigCPtr, this, name, value);
  47. }
  48. public boolean removeHeader(String name) {
  49. return tinyWRAPJNI.SipSession_removeHeader(swigCPtr, this, name);
  50. }
  51. public boolean addCaps(String name, String value) {
  52. return tinyWRAPJNI.SipSession_addCaps__SWIG_0(swigCPtr, this, name, value);
  53. }
  54. public boolean addCaps(String name) {
  55. return tinyWRAPJNI.SipSession_addCaps__SWIG_1(swigCPtr, this, name);
  56. }
  57. public boolean removeCaps(String name) {
  58. return tinyWRAPJNI.SipSession_removeCaps(swigCPtr, this, name);
  59. }
  60. public boolean setExpires(long expires) {
  61. return tinyWRAPJNI.SipSession_setExpires(swigCPtr, this, expires);
  62. }
  63. public boolean setFromUri(String fromUriString) {
  64. return tinyWRAPJNI.SipSession_setFromUri__SWIG_0(swigCPtr, this, fromUriString);
  65. }
  66. public boolean setFromUri(SipUri fromUri) {
  67. return tinyWRAPJNI.SipSession_setFromUri__SWIG_1(swigCPtr, this, SipUri.getCPtr(fromUri), fromUri);
  68. }
  69. public boolean setToUri(String toUriString) {
  70. return tinyWRAPJNI.SipSession_setToUri__SWIG_0(swigCPtr, this, toUriString);
  71. }
  72. public boolean setToUri(SipUri toUri) {
  73. return tinyWRAPJNI.SipSession_setToUri__SWIG_1(swigCPtr, this, SipUri.getCPtr(toUri), toUri);
  74. }
  75. public boolean setSilentHangup(boolean silent) {
  76. return tinyWRAPJNI.SipSession_setSilentHangup(swigCPtr, this, silent);
  77. }
  78. public boolean addSigCompCompartment(String compId) {
  79. return tinyWRAPJNI.SipSession_addSigCompCompartment(swigCPtr, this, compId);
  80. }
  81. public boolean removeSigCompCompartment() {
  82. return tinyWRAPJNI.SipSession_removeSigCompCompartment(swigCPtr, this);
  83. }
  84. public long getId() {
  85. return tinyWRAPJNI.SipSession_getId(swigCPtr, this);
  86. }
  87. }