summaryrefslogtreecommitdiffstats
path: root/bindings/java/SipSession.java
blob: fcb83642f8efcb75945b6f69fc8dd3fc6b42796f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.9
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.doubango.tinyWRAP;

public class SipSession {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected SipSession(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(SipSession obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        tinyWRAPJNI.delete_SipSession(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  protected java.nio.ByteBuffer getByteBuffer(byte[] bytes) {
    if(bytes != null){
		final java.nio.ByteBuffer byteBuffer = java.nio.ByteBuffer.allocateDirect(bytes.length);
        byteBuffer.put(bytes);
        return byteBuffer;
    }
    return null;
  }

  public SipSession(SipStack stack) {
    this(tinyWRAPJNI.new_SipSession(SipStack.getCPtr(stack), stack), true);
  }

  public boolean haveOwnership() {
    return tinyWRAPJNI.SipSession_haveOwnership(swigCPtr, this);
  }

  public boolean addHeader(String name, String value) {
    return tinyWRAPJNI.SipSession_addHeader(swigCPtr, this, name, value);
  }

  public boolean removeHeader(String name) {
    return tinyWRAPJNI.SipSession_removeHeader(swigCPtr, this, name);
  }

  public boolean addCaps(String name, String value) {
    return tinyWRAPJNI.SipSession_addCaps__SWIG_0(swigCPtr, this, name, value);
  }

  public boolean addCaps(String name) {
    return tinyWRAPJNI.SipSession_addCaps__SWIG_1(swigCPtr, this, name);
  }

  public boolean removeCaps(String name) {
    return tinyWRAPJNI.SipSession_removeCaps(swigCPtr, this, name);
  }

  public boolean setExpires(long expires) {
    return tinyWRAPJNI.SipSession_setExpires(swigCPtr, this, expires);
  }

  public boolean setFromUri(String fromUriString) {
    return tinyWRAPJNI.SipSession_setFromUri__SWIG_0(swigCPtr, this, fromUriString);
  }

  public boolean setFromUri(SipUri fromUri) {
    return tinyWRAPJNI.SipSession_setFromUri__SWIG_1(swigCPtr, this, SipUri.getCPtr(fromUri), fromUri);
  }

  public boolean setToUri(String toUriString) {
    return tinyWRAPJNI.SipSession_setToUri__SWIG_0(swigCPtr, this, toUriString);
  }

  public boolean setToUri(SipUri toUri) {
    return tinyWRAPJNI.SipSession_setToUri__SWIG_1(swigCPtr, this, SipUri.getCPtr(toUri), toUri);
  }

  public boolean setSilentHangup(boolean silent) {
    return tinyWRAPJNI.SipSession_setSilentHangup(swigCPtr, this, silent);
  }

  public boolean addSigCompCompartment(String compId) {
    return tinyWRAPJNI.SipSession_addSigCompCompartment(swigCPtr, this, compId);
  }

  public boolean removeSigCompCompartment() {
    return tinyWRAPJNI.SipSession_removeSigCompCompartment(swigCPtr, this);
  }

  public long getId() {
    return tinyWRAPJNI.SipSession_getId(swigCPtr, this);
  }

}
OpenPOWER on IntegriCloud