# This file is part of Cantera. See License.txt in the top-level directory or
# at https://cantera.org/license.txt for license and copyright information.

docstring: |-
  The main library of the generated CLib API contains Cantera service functions.
prefix: ct
base: ""
recipes:
- name: version  # Renamed in Cantera 3.2 (previously getCanteraVersion)
- name: gitCommit  # Renamed in Cantera 3.2 (previously getGitCommit)
- name: addDataDirectory
  wraps: addDirectory  # TODO: Make API consistent (deprecate C++ version)
- name: getDataDirectories
- name: findInputFile
- name: suppress_deprecation_warnings  # inconsistent API (snake_case; preexisting)
- name: make_deprecation_warnings_fatal  # inconsistent API (snake_case; preexisting)
- name: suppress_warnings  # inconsistent API (snake_case; preexisting)
- name: warnings_suppressed  # inconsistent API (snake_case; preexisting)
- name: make_warnings_fatal  # inconsistent API (snake_case; preexisting)
- name: suppress_thermo_warnings  # inconsistent API (snake_case; preexisting)
- name: use_legacy_rate_constants  # inconsistent API (snake_case; preexisting)
- name: appdelete
- name: Avogadro
- name: Boltzmann
- name: Planck
- name: ElectronCharge
- name: lightSpeed
- name: OneAtm
- name: OneBar
- name: fineStructureConstant
- name: ElectronMass
- name: GasConstant
- name: StefanBoltz
- name: Faraday
- name: permeability_0  # Renamed in Cantera 3.2 (previously permeability0)
- name: epsilon_0  # Renamed in Cantera 3.2 (previously epsilon0)
- name: getCanteraError
  brief: Get Cantera error.
  what: function
  declaration: int32_t ct_getCanteraError(int32_t bufLen, char* buf)
  parameters:
    bufLen: Length of reserved array.
    buf: String containing Cantera error.
  returns: Actual length of string or -1 for exception handling.
  code: |-
    string err = Application::Instance()->lastErrorMessage();
    copyString(err, buf, bufLen);
    return static_cast<int32_t>(err.size());
- name: setLogCallback
  brief: Set Logger callback.
  what: function
  declaration: int32_t ct_setLogCallback(LogCallback writer)
  parameters:
    writer: Callback that is invoked to produce log output.
  code: |-
    auto logwriter = make_unique<ExternalLogger>(writer);
    setLogger(std::move(logwriter));
    return 0;
- name: writeLog
  wraps: writelog_direct  # inconsistent API (preexisting)
- name: clearStorage
- name: resetStorage
