diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index b2c425e162..17ecafed72 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -4626,3 +4626,20 @@ _nm_utils_team_config_equal (const char *conf1, return nm_streq0 (conf1, conf2); } #endif + +/*****************************************************************************/ + +/** + * nm_utils_version: + * + * Returns: the version ID of the libnm version. That is, the %NM_VERSION + * at runtime. + * + * Since: 1.6.0 + */ +guint +nm_utils_version (void) +{ + return NM_VERSION; +} + diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h index 69dcf55a2f..dfffb33506 100644 --- a/libnm-core/nm-utils.h +++ b/libnm-core/nm-utils.h @@ -209,6 +209,9 @@ gboolean nm_utils_enum_from_str (GType type, const char *str, int *out_value, ch NM_AVAILABLE_IN_1_2 const char **nm_utils_enum_get_values (GType type, gint from, gint to); +NM_AVAILABLE_IN_1_6 +guint nm_utils_version (void); + G_END_DECLS #endif /* __NM_UTILS_H__ */ diff --git a/libnm/libnm.ver b/libnm/libnm.ver index cd4978f88b..aaafe536e3 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -1107,4 +1107,5 @@ global: nm_setting_proxy_get_pac_url; nm_setting_proxy_get_pac_script; nm_utils_is_json_object; + nm_utils_version; } libnm_1_4_0;