/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.3.0
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.chilkatsoft;

public class CkXmp {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected static long swigRelease(CkXmp obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

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

  public CkXmp() {
    this(chilkatJNI.new_CkXmp(), true);
  }

  public void LastErrorXml(CkString str) {
    chilkatJNI.CkXmp_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorHtml(CkString str) {
    chilkatJNI.CkXmp_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorText(CkString str) {
    chilkatJNI.CkXmp_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void get_DebugLogFilePath(CkString str) {
    chilkatJNI.CkXmp_get_DebugLogFilePath(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String debugLogFilePath() {
    return chilkatJNI.CkXmp_debugLogFilePath(swigCPtr, this);
  }

  public void put_DebugLogFilePath(String newVal) {
    chilkatJNI.CkXmp_put_DebugLogFilePath(swigCPtr, this, newVal);
  }

  public void get_LastErrorHtml(CkString str) {
    chilkatJNI.CkXmp_get_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorHtml() {
    return chilkatJNI.CkXmp_lastErrorHtml(swigCPtr, this);
  }

  public void get_LastErrorText(CkString str) {
    chilkatJNI.CkXmp_get_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorText() {
    return chilkatJNI.CkXmp_lastErrorText(swigCPtr, this);
  }

  public void get_LastErrorXml(CkString str) {
    chilkatJNI.CkXmp_get_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorXml() {
    return chilkatJNI.CkXmp_lastErrorXml(swigCPtr, this);
  }

  public boolean get_LastMethodSuccess() {
    return chilkatJNI.CkXmp_get_LastMethodSuccess(swigCPtr, this);
  }

  public void put_LastMethodSuccess(boolean newVal) {
    chilkatJNI.CkXmp_put_LastMethodSuccess(swigCPtr, this, newVal);
  }

  public int get_NumEmbedded() {
    return chilkatJNI.CkXmp_get_NumEmbedded(swigCPtr, this);
  }

  public boolean get_StructInnerDescrip() {
    return chilkatJNI.CkXmp_get_StructInnerDescrip(swigCPtr, this);
  }

  public void put_StructInnerDescrip(boolean newVal) {
    chilkatJNI.CkXmp_put_StructInnerDescrip(swigCPtr, this, newVal);
  }

  public void get_UncommonOptions(CkString str) {
    chilkatJNI.CkXmp_get_UncommonOptions(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String uncommonOptions() {
    return chilkatJNI.CkXmp_uncommonOptions(swigCPtr, this);
  }

  public void put_UncommonOptions(String newVal) {
    chilkatJNI.CkXmp_put_UncommonOptions(swigCPtr, this, newVal);
  }

  public boolean get_VerboseLogging() {
    return chilkatJNI.CkXmp_get_VerboseLogging(swigCPtr, this);
  }

  public void put_VerboseLogging(boolean newVal) {
    chilkatJNI.CkXmp_put_VerboseLogging(swigCPtr, this, newVal);
  }

  public void get_Version(CkString str) {
    chilkatJNI.CkXmp_get_Version(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String version() {
    return chilkatJNI.CkXmp_version(swigCPtr, this);
  }

  public boolean AddArray(CkXml xml, String arrType, String propName, CkStringArray values) {
    return chilkatJNI.CkXmp_AddArray(swigCPtr, this, CkXml.getCPtr(xml), xml, arrType, propName, CkStringArray.getCPtr(values), values);
  }

  public void AddNsMapping(String ns, String uri) {
    chilkatJNI.CkXmp_AddNsMapping(swigCPtr, this, ns, uri);
  }

  public boolean AddSimpleInt(CkXml iXml, String propName, int propVal) {
    return chilkatJNI.CkXmp_AddSimpleInt(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName, propVal);
  }

  public boolean AddSimpleStr(CkXml iXml, String propName, String propVal) {
    return chilkatJNI.CkXmp_AddSimpleStr(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName, propVal);
  }

  public boolean AddStructProp(CkXml iChilkatXml, String structName, String propName, String propValue) {
    return chilkatJNI.CkXmp_AddStructProp(swigCPtr, this, CkXml.getCPtr(iChilkatXml), iChilkatXml, structName, propName, propValue);
  }

  public boolean Append(CkXml iXml) {
    return chilkatJNI.CkXmp_Append(swigCPtr, this, CkXml.getCPtr(iXml), iXml);
  }

  public CkStringArray GetArray(CkXml iXml, String propName) {
    long cPtr = chilkatJNI.CkXmp_GetArray(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
    return (cPtr == 0) ? null : new CkStringArray(cPtr, true);
  }

  public CkXml GetEmbedded(int index) {
    long cPtr = chilkatJNI.CkXmp_GetEmbedded(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CkXml(cPtr, true);
  }

  public CkXml GetProperty(CkXml iXml, String propName) {
    long cPtr = chilkatJNI.CkXmp_GetProperty(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
    return (cPtr == 0) ? null : new CkXml(cPtr, true);
  }

  public int GetSimpleInt(CkXml iXml, String propName) {
    return chilkatJNI.CkXmp_GetSimpleInt(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
  }

  public boolean GetSimpleStr(CkXml iXml, String propName, CkString outStr) {
    return chilkatJNI.CkXmp_GetSimpleStr(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName, CkString.getCPtr(outStr), outStr);
  }

  public String getSimpleStr(CkXml iXml, String propName) {
    return chilkatJNI.CkXmp_getSimpleStr(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
  }

  public String simpleStr(CkXml iXml, String propName) {
    return chilkatJNI.CkXmp_simpleStr(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
  }

  public CkStringArray GetStructPropNames(CkXml iXml, String structName) {
    long cPtr = chilkatJNI.CkXmp_GetStructPropNames(swigCPtr, this, CkXml.getCPtr(iXml), iXml, structName);
    return (cPtr == 0) ? null : new CkStringArray(cPtr, true);
  }

  public boolean GetStructValue(CkXml iXml, String structName, String propName, CkString outStr) {
    return chilkatJNI.CkXmp_GetStructValue(swigCPtr, this, CkXml.getCPtr(iXml), iXml, structName, propName, CkString.getCPtr(outStr), outStr);
  }

  public String getStructValue(CkXml iXml, String structName, String propName) {
    return chilkatJNI.CkXmp_getStructValue(swigCPtr, this, CkXml.getCPtr(iXml), iXml, structName, propName);
  }

  public String structValue(CkXml iXml, String structName, String propName) {
    return chilkatJNI.CkXmp_structValue(swigCPtr, this, CkXml.getCPtr(iXml), iXml, structName, propName);
  }

  public boolean LoadAppFile(String filename) {
    return chilkatJNI.CkXmp_LoadAppFile(swigCPtr, this, filename);
  }

  public boolean LoadFromBuffer(CkByteData fileData, String ext) {
    return chilkatJNI.CkXmp_LoadFromBuffer(swigCPtr, this, CkByteData.getCPtr(fileData), fileData, ext);
  }

  public CkXml NewXmp() {
    long cPtr = chilkatJNI.CkXmp_NewXmp(swigCPtr, this);
    return (cPtr == 0) ? null : new CkXml(cPtr, true);
  }

  public boolean RemoveAllEmbedded() {
    return chilkatJNI.CkXmp_RemoveAllEmbedded(swigCPtr, this);
  }

  public boolean RemoveArray(CkXml iXml, String propName) {
    return chilkatJNI.CkXmp_RemoveArray(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
  }

  public boolean RemoveEmbedded(int index) {
    return chilkatJNI.CkXmp_RemoveEmbedded(swigCPtr, this, index);
  }

  public void RemoveNsMapping(String ns) {
    chilkatJNI.CkXmp_RemoveNsMapping(swigCPtr, this, ns);
  }

  public boolean RemoveSimple(CkXml iXml, String propName) {
    return chilkatJNI.CkXmp_RemoveSimple(swigCPtr, this, CkXml.getCPtr(iXml), iXml, propName);
  }

  public boolean RemoveStruct(CkXml iXml, String structName) {
    return chilkatJNI.CkXmp_RemoveStruct(swigCPtr, this, CkXml.getCPtr(iXml), iXml, structName);
  }

  public boolean RemoveStructProp(CkXml iXml, String structName, String propName) {
    return chilkatJNI.CkXmp_RemoveStructProp(swigCPtr, this, CkXml.getCPtr(iXml), iXml, structName, propName);
  }

  public boolean SaveAppFile(String filename) {
    return chilkatJNI.CkXmp_SaveAppFile(swigCPtr, this, filename);
  }

  public boolean SaveToBuffer(CkByteData outBytes) {
    return chilkatJNI.CkXmp_SaveToBuffer(swigCPtr, this, CkByteData.getCPtr(outBytes), outBytes);
  }

}
