duvc-ctl 2.0.0
USB Video Class Camera Control Library
Loading...
Searching...
No Matches
version.h File Reference

ABI versioning and build information for duvc-ctl C API. More...

#include <cstdint>
Include dependency graph for version.h:

Go to the source code of this file.

Macros

#define DUVC_ABI_VERSION_MAJOR   2
 Major version number.
 
#define DUVC_ABI_VERSION_MINOR   0
 Minor version number.
 
#define DUVC_ABI_VERSION_PATCH   0
 Patch version number.
 
#define DUVC_ABI_VERSION
 Combined version number as integer.
 
#define DUVC_ABI_VERSION_STRING   "2.0.0"
 Version string in semantic versioning format.
 

Functions

uint32_t duvc_get_version (void)
 Get runtime library version.
 
const char * duvc_get_version_string (void)
 Get runtime library version string.
 
int duvc_check_abi_compatibility (uint32_t compiled_version)
 Check ABI compatibility.
 

Detailed Description

ABI versioning and build information for duvc-ctl C API.

Definition in file version.h.

Macro Definition Documentation

◆ DUVC_ABI_VERSION

#define DUVC_ABI_VERSION
Value:
#define DUVC_ABI_VERSION_MINOR
Minor version number.
Definition version.h:27
#define DUVC_ABI_VERSION_PATCH
Patch version number.
Definition version.h:35
#define DUVC_ABI_VERSION_MAJOR
Major version number.
Definition version.h:19

Combined version number as integer.

Format: (major << 16) | (minor << 8) | patch Useful for numeric version comparisons.

Definition at line 43 of file version.h.

◆ DUVC_ABI_VERSION_MAJOR

#define DUVC_ABI_VERSION_MAJOR   2

Major version number.

Incremented for breaking ABI changes. Applications compiled against a different major version are not guaranteed to be compatible.

Definition at line 19 of file version.h.

◆ DUVC_ABI_VERSION_MINOR

#define DUVC_ABI_VERSION_MINOR   0

Minor version number.

Incremented for new features that maintain backward compatibility. Applications compiled against older minor versions should work.

Definition at line 27 of file version.h.

◆ DUVC_ABI_VERSION_PATCH

#define DUVC_ABI_VERSION_PATCH   0

Patch version number.

Incremented for bug fixes and internal improvements that maintain full ABI compatibility.

Definition at line 35 of file version.h.

◆ DUVC_ABI_VERSION_STRING

#define DUVC_ABI_VERSION_STRING   "2.0.0"

Version string in semantic versioning format.

Definition at line 50 of file version.h.

Function Documentation

◆ duvc_check_abi_compatibility()

int duvc_check_abi_compatibility ( uint32_t compiled_version)

Check ABI compatibility.

Verifies that the runtime library is compatible with the version this application was compiled against.

Parameters
compiled_versionVersion the application was compiled with (use DUVC_ABI_VERSION)
Returns
1 if compatible, 0 if incompatible
Parameters
compiled_versionVersion the application was compiled with (use DUVC_ABI_VERSION)
Returns
1 if compatible, 0 if incompatible

Definition at line 238 of file api.cpp.

◆ duvc_get_version()

uint32_t duvc_get_version ( void )

Get runtime library version.

Returns
Combined version number as returned by DUVC_ABI_VERSION macro

Get runtime library version.

Returns
Combined version number as returned by DUVC_ABI_VERSION macro

Definition at line 234 of file api.cpp.

Referenced by duvc_check_abi_compatibility().

Here is the caller graph for this function:

◆ duvc_get_version_string()

const char * duvc_get_version_string ( void )

Get runtime library version string.

Returns
Null-terminated version string (e.g., "2.0.0")
Note
Returned string is statically allocated and should not be freed

Get runtime library version string.

Returns
Null-terminated version string (e.g., "1.0.0")
Note
Returned string is statically allocated and should not be freed

Definition at line 236 of file api.cpp.