XcapStack.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 XcapStack {
  10. private long swigCPtr;
  11. protected boolean swigCMemOwn;
  12. protected XcapStack(long cPtr, boolean cMemoryOwn) {
  13. swigCMemOwn = cMemoryOwn;
  14. swigCPtr = cPtr;
  15. }
  16. protected static long getCPtr(XcapStack 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_XcapStack(swigCPtr);
  27. }
  28. swigCPtr = 0;
  29. }
  30. }
  31. public XcapStack(XcapCallback callback, String xui, String password, String xcap_root) {
  32. this(tinyWRAPJNI.new_XcapStack(XcapCallback.getCPtr(callback), callback, xui, password, xcap_root), true);
  33. }
  34. public boolean registerAUID(String id, String mime_type, String ns, String document_name, boolean is_global) {
  35. return tinyWRAPJNI.XcapStack_registerAUID(swigCPtr, this, id, mime_type, ns, document_name, is_global);
  36. }
  37. public boolean start() {
  38. return tinyWRAPJNI.XcapStack_start(swigCPtr, this);
  39. }
  40. public boolean setCredentials(String xui, String password) {
  41. return tinyWRAPJNI.XcapStack_setCredentials(swigCPtr, this, xui, password);
  42. }
  43. public boolean setXcapRoot(String xcap_root) {
  44. return tinyWRAPJNI.XcapStack_setXcapRoot(swigCPtr, this, xcap_root);
  45. }
  46. public boolean setLocalIP(String ip) {
  47. return tinyWRAPJNI.XcapStack_setLocalIP(swigCPtr, this, ip);
  48. }
  49. public boolean setLocalPort(long port) {
  50. return tinyWRAPJNI.XcapStack_setLocalPort(swigCPtr, this, port);
  51. }
  52. public boolean addHeader(String name, String value) {
  53. return tinyWRAPJNI.XcapStack_addHeader(swigCPtr, this, name, value);
  54. }
  55. public boolean removeHeader(String name) {
  56. return tinyWRAPJNI.XcapStack_removeHeader(swigCPtr, this, name);
  57. }
  58. public boolean setTimeout(long timeout) {
  59. return tinyWRAPJNI.XcapStack_setTimeout(swigCPtr, this, timeout);
  60. }
  61. public boolean getDocument(String url) {
  62. return tinyWRAPJNI.XcapStack_getDocument(swigCPtr, this, url);
  63. }
  64. public boolean getElement(String url) {
  65. return tinyWRAPJNI.XcapStack_getElement(swigCPtr, this, url);
  66. }
  67. public boolean getAttribute(String url) {
  68. return tinyWRAPJNI.XcapStack_getAttribute(swigCPtr, this, url);
  69. }
  70. public boolean deleteDocument(String url) {
  71. return tinyWRAPJNI.XcapStack_deleteDocument(swigCPtr, this, url);
  72. }
  73. public boolean deleteElement(String url) {
  74. return tinyWRAPJNI.XcapStack_deleteElement(swigCPtr, this, url);
  75. }
  76. public boolean deleteAttribute(String url) {
  77. return tinyWRAPJNI.XcapStack_deleteAttribute(swigCPtr, this, url);
  78. }
  79. public boolean putDocument(String url, java.nio.ByteBuffer payload, long len, String contentType) {
  80. return tinyWRAPJNI.XcapStack_putDocument(swigCPtr, this, url, payload, len, contentType);
  81. }
  82. public boolean putElement(String url, java.nio.ByteBuffer payload, long len) {
  83. return tinyWRAPJNI.XcapStack_putElement(swigCPtr, this, url, payload, len);
  84. }
  85. public boolean putAttribute(String url, java.nio.ByteBuffer payload, long len) {
  86. return tinyWRAPJNI.XcapStack_putAttribute(swigCPtr, this, url, payload, len);
  87. }
  88. public boolean stop() {
  89. return tinyWRAPJNI.XcapStack_stop(swigCPtr, this);
  90. }
  91. }