From 92aa3d5dcbe67ef1d7e0abe06cc400f9442dbc45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 26 May 2022 14:23:31 -0400 Subject: [PATCH] version: Add NICE_CHECK_VERSION to the documentation --- docs/reference/libnice/libnice-sections.txt | 1 + docs/reference/libnice/meson.build | 2 +- nice/nice.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/reference/libnice/libnice-sections.txt b/docs/reference/libnice/libnice-sections.txt index 30044ba..ad94a34 100644 --- a/docs/reference/libnice/libnice-sections.txt +++ b/docs/reference/libnice/libnice-sections.txt @@ -59,6 +59,7 @@ nice_agent_get_component_state nice_agent_close_async nice_agent_consent_lost nice_component_state_to_string +NICE_CHECK_VERSION NICE_AGENT NICE_IS_AGENT diff --git a/docs/reference/libnice/meson.build b/docs/reference/libnice/meson.build index 34bee96..04d24eb 100644 --- a/docs/reference/libnice/meson.build +++ b/docs/reference/libnice/meson.build @@ -41,7 +41,7 @@ gnome.gtkdoc('libnice', main_xml: 'libnice-docs.xml', namespace: 'nice', mode: 'none', - src_dir: [agent_include, stun_include], + src_dir: [agent_include, stun_include, nice_include], content_files: fake_makefile, dependencies: libnice_dep, scan_args: [ diff --git a/nice/nice.h b/nice/nice.h index 74a7e74..edad400 100644 --- a/nice/nice.h +++ b/nice/nice.h @@ -41,6 +41,18 @@ #include "nice-version.h" +/** + * NICE_CHECK_VERSION: + * @major: The major numbe of the version + * @minor: The major numbe of the version + * @micro: The major numbe of the version + * + * Macro that returns TRUE if the version if libnice that you are compiling + * against is greater or equal to the argument + * + * Since: 0.1.20 + */ + #define NICE_CHECK_VERSION(major, minor, micro) \ (NICE_VERSION_MAJOR > (major) || \ (NICE_VERSION_MAJOR == (major) && NICE_VERSION_MINOR > (minor)) || \ -- 2.7.4