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

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

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

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

  public CkCertStore() {
    this(chilkatJNI.new_CkCertStore(), true);
  }

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

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

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

  public boolean get_AvoidWindowsPkAccess() {
    return chilkatJNI.CkCertStore_get_AvoidWindowsPkAccess(swigCPtr, this);
  }

  public void put_AvoidWindowsPkAccess(boolean newVal) {
    chilkatJNI.CkCertStore_put_AvoidWindowsPkAccess(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

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

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

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

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

  public int get_NumCertificates() {
    return chilkatJNI.CkCertStore_get_NumCertificates(swigCPtr, this);
  }

  public void get_SmartCardPin(CkString str) {
    chilkatJNI.CkCertStore_get_SmartCardPin(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String smartCardPin() {
    return chilkatJNI.CkCertStore_smartCardPin(swigCPtr, this);
  }

  public void put_SmartCardPin(String newVal) {
    chilkatJNI.CkCertStore_put_SmartCardPin(swigCPtr, this, newVal);
  }

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

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

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

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

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

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

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

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

  public boolean CloseCertStore() {
    return chilkatJNI.CkCertStore_CloseCertStore(swigCPtr, this);
  }

  public boolean CreateFileStore(String filename) {
    return chilkatJNI.CkCertStore_CreateFileStore(swigCPtr, this, filename);
  }

  public boolean CreateMemoryStore() {
    return chilkatJNI.CkCertStore_CreateMemoryStore(swigCPtr, this);
  }

  public boolean CreateRegistryStore(String regRoot, String regPath) {
    return chilkatJNI.CkCertStore_CreateRegistryStore(swigCPtr, this, regRoot, regPath);
  }

  public boolean FindCert(CkJsonObject json, CkCert cert) {
    return chilkatJNI.CkCertStore_FindCert(swigCPtr, this, CkJsonObject.getCPtr(json), json, CkCert.getCPtr(cert), cert);
  }

  public boolean GetCert(int index, CkCert cert) {
    return chilkatJNI.CkCertStore_GetCert(swigCPtr, this, index, CkCert.getCPtr(cert), cert);
  }

  public boolean LoadPemFile(String pemPath) {
    return chilkatJNI.CkCertStore_LoadPemFile(swigCPtr, this, pemPath);
  }

  public boolean LoadPemStr(String pemString) {
    return chilkatJNI.CkCertStore_LoadPemStr(swigCPtr, this, pemString);
  }

  public boolean LoadPfxBd(CkBinData bd, String password) {
    return chilkatJNI.CkCertStore_LoadPfxBd(swigCPtr, this, CkBinData.getCPtr(bd), bd, password);
  }

  public boolean LoadPfxFile(String pfxFilename, String password) {
    return chilkatJNI.CkCertStore_LoadPfxFile(swigCPtr, this, pfxFilename, password);
  }

  public boolean OpenCurrentUserStore(boolean readOnly) {
    return chilkatJNI.CkCertStore_OpenCurrentUserStore(swigCPtr, this, readOnly);
  }

  public boolean OpenFileStore(String filename, boolean readOnly) {
    return chilkatJNI.CkCertStore_OpenFileStore(swigCPtr, this, filename, readOnly);
  }

  public boolean OpenLocalSystemStore(boolean readOnly) {
    return chilkatJNI.CkCertStore_OpenLocalSystemStore(swigCPtr, this, readOnly);
  }

  public boolean OpenRegistryStore(String regRoot, String regPath, boolean readOnly) {
    return chilkatJNI.CkCertStore_OpenRegistryStore(swigCPtr, this, regRoot, regPath, readOnly);
  }

  public boolean OpenSmartcard(String csp) {
    return chilkatJNI.CkCertStore_OpenSmartcard(swigCPtr, this, csp);
  }

  public boolean OpenWindowsStore(String storeLocation, String storeName, boolean readOnly) {
    return chilkatJNI.CkCertStore_OpenWindowsStore(swigCPtr, this, storeLocation, storeName, readOnly);
  }

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

}
