/* ----------------------------------------------------------------------------
 * 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 CkCodeSign {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected static long swigRelease(CkCodeSign 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_CkCodeSign(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CkCodeSign() {
    this(chilkatJNI.new_CkCodeSign(), true);
  }

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

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

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

  public void put_EventCallbackObject(CkBaseProgress progress) {
    chilkatJNI.CkCodeSign_put_EventCallbackObject(swigCPtr, this, CkBaseProgress.getCPtr(progress), progress);
  }

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

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

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

  public int get_HeartbeatMs() {
    return chilkatJNI.CkCodeSign_get_HeartbeatMs(swigCPtr, this);
  }

  public void put_HeartbeatMs(int newVal) {
    chilkatJNI.CkCodeSign_put_HeartbeatMs(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  public boolean AddSignature(String path, CkCert cert, CkJsonObject options) {
    return chilkatJNI.CkCodeSign_AddSignature(swigCPtr, this, path, CkCert.getCPtr(cert), cert, CkJsonObject.getCPtr(options), options);
  }

  public CkTask AddSignatureAsync(String path, CkCert cert, CkJsonObject options) {
    long cPtr = chilkatJNI.CkCodeSign_AddSignatureAsync(swigCPtr, this, path, CkCert.getCPtr(cert), cert, CkJsonObject.getCPtr(options), options);
    return (cPtr == 0) ? null : new CkTask(cPtr, true);
  }

  public boolean GetSignerCert(CkCert cert) {
    return chilkatJNI.CkCodeSign_GetSignerCert(swigCPtr, this, CkCert.getCPtr(cert), cert);
  }

  public boolean RemoveSignature(String path) {
    return chilkatJNI.CkCodeSign_RemoveSignature(swigCPtr, this, path);
  }

  public boolean VerifySignature(String path, CkJsonObject sigInfo) {
    return chilkatJNI.CkCodeSign_VerifySignature(swigCPtr, this, path, CkJsonObject.getCPtr(sigInfo), sigInfo);
  }

}
