summaryrefslogtreecommitdiffstats
path: root/bindings/java/android/XcapStack.java
blob: 95d28e9d5ea1e84e9aa03d7dd373bc1e371fec8e (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
112
113
114
115
116
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.39
 *
 * 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 XcapStack {
  private long swigCPtr;
  protected boolean swigCMemOwn;

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

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

  protected void finalize() {
    delete();
  }

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

  public XcapStack(XcapCallback callback, String xui, String password, String xcap_root) {
    this(tinyWRAPJNI.new_XcapStack(XcapCallback.getCPtr(callback), callback, xui, password, xcap_root), true);
  }

  public boolean registerAUID(String id, String mime_type, String ns, String document_name, boolean is_global) {
    return tinyWRAPJNI.XcapStack_registerAUID(swigCPtr, this, id, mime_type, ns, document_name, is_global);
  }

  public boolean start() {
    return tinyWRAPJNI.XcapStack_start(swigCPtr, this);
  }

  public boolean setCredentials(String xui, String password) {
    return tinyWRAPJNI.XcapStack_setCredentials(swigCPtr, this, xui, password);
  }

  public boolean setXcapRoot(String xcap_root) {
    return tinyWRAPJNI.XcapStack_setXcapRoot(swigCPtr, this, xcap_root);
  }

  public boolean setLocalIP(String ip) {
    return tinyWRAPJNI.XcapStack_setLocalIP(swigCPtr, this, ip);
  }

  public boolean setLocalPort(long port) {
    return tinyWRAPJNI.XcapStack_setLocalPort(swigCPtr, this, port);
  }

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

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

  public boolean setTimeout(long timeout) {
    return tinyWRAPJNI.XcapStack_setTimeout(swigCPtr, this, timeout);
  }

  public boolean getDocument(String url) {
    return tinyWRAPJNI.XcapStack_getDocument(swigCPtr, this, url);
  }

  public boolean getElement(String url) {
    return tinyWRAPJNI.XcapStack_getElement(swigCPtr, this, url);
  }

  public boolean getAttribute(String url) {
    return tinyWRAPJNI.XcapStack_getAttribute(swigCPtr, this, url);
  }

  public boolean deleteDocument(String url) {
    return tinyWRAPJNI.XcapStack_deleteDocument(swigCPtr, this, url);
  }

  public boolean deleteElement(String url) {
    return tinyWRAPJNI.XcapStack_deleteElement(swigCPtr, this, url);
  }

  public boolean deleteAttribute(String url) {
    return tinyWRAPJNI.XcapStack_deleteAttribute(swigCPtr, this, url);
  }

  public boolean putDocument(String url, java.nio.ByteBuffer payload, long len, String contentType) {
    return tinyWRAPJNI.XcapStack_putDocument(swigCPtr, this, url, payload, len, contentType);
  }

  public boolean putElement(String url, java.nio.ByteBuffer payload, long len) {
    return tinyWRAPJNI.XcapStack_putElement(swigCPtr, this, url, payload, len);
  }

  public boolean putAttribute(String url, java.nio.ByteBuffer payload, long len) {
    return tinyWRAPJNI.XcapStack_putAttribute(swigCPtr, this, url, payload, len);
  }

  public boolean stop() {
    return tinyWRAPJNI.XcapStack_stop(swigCPtr, this);
  }

}
OpenPOWER on IntegriCloud