[][src]Module libpulse_binding::version

Version constants and functions.

The constants here mostly relate to those provided in the sys crate and thus the PulseAudio (PA) C headers.

  • They are typically only updated following a new major release of PA.
  • Some values are dynamic, depending upon the level of PA compatibility support selected at compile time via Cargo feature flags. For instance if you enable support for PA <= v12 then they will indicate v12, whereas if you exclude v12 support, they will indicate v11.

Note that:

  • The minimum supported version of PA is v8.0.
  • Where a new major version of PA introduces API changes, such as new function symbols or new enum variants, for instance, we add a Cargo feature to allow selective control over inclusion of those changed, and thus control over the level of compatibility with newer releases that the crate is compiled with.

The get_library_version function always obtains at runtime the version of the actual PA library in use.

The get_compatibility function gives an indication of the level of compatibility support built in at compile time, per Cargo feature flags.

Enums

Compatibility

PulseAudio version compatibility.

Constants

API_VERSION

The current API version, from the PA C header. Note, this seems to be separate from the PA version number, where is was 12 for the v0.9.11 release, and has not been changed since (c95d0d7dcbca0c531b972ece1004caad95c92936).

PROTOCOL_VERSION

The current protocol version.

TARGET_VERSION

The major and minor components of the newest version of the PulseAudio client library this binding is known to be compatible with.

TARGET_VERSION_STRING

The newest version of the PulseAudio client library this binding is known to be compatible with.

Functions

check_version

Evaluates to true if the PulseAudio library version targeted by this version of the PA binding library is equal or newer than the version specified.

get_compatibility

Returns indication of the level of PulseAudio version compatibility selected at compie time via Cargo feature flags.

get_library_version

Gets the version of the library actually in use at runtime.