diff options
author | Dan Winship <danw@gnome.org> | 2014-02-12 12:28:52 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-02-13 11:24:37 -0500 |
commit | 9c4d86ee8064fa36710b8d2d242d9618d4fc763a (patch) | |
tree | 810f8c7dffdfcfbd96289da821f31597bbfe8a3b /libnm-util/nm-utils.h | |
parent | 95be722e5411d26a0d631cb6dff1995b85c6940f (diff) | |
download | NetworkManager-9c4d86ee8064fa36710b8d2d242d9618d4fc763a.tar.gz |
libnm-util, libnm-glib: add versioned deprecation/availability macros
Add versioned NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros, and tag
new/deprecated functions accordingly. (All currently-deprecated
functions are assumed to have been deprecated in 0.9.10.)
Add NM_VERSION_MIN_REQUIRED and NM_VERSION_MAX_ALLOWED macros which
can be set to determine which versions will cause warnings.
With the current settings, external consumers of the
libnm-util/libnm-glib APIs will have MIN_REQUIRED and MAX_ALLOWED both
set to NM_VERSION_0_9_8 by default, meaning they will get warnings
about functions added in 0.9.10. NM internally sets
NM_VERSION_MAX_ALLOWED to NM_VERSION_NEXT_STABLE to ensure that it is
always allowed to use all APIs.
Diffstat (limited to 'libnm-util/nm-utils.h')
-rw-r--r-- | libnm-util/nm-utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnm-util/nm-utils.h b/libnm-util/nm-utils.h index f6fdf36f99..12b3e8de21 100644 --- a/libnm-util/nm-utils.h +++ b/libnm-util/nm-utils.h @@ -47,6 +47,7 @@ char * nm_utils_ssid_to_utf8 (const GByteArray *ssid); GHashTable *nm_utils_gvalue_hash_dup (GHashTable *hash); +NM_DEPRECATED_IN_0_9_10 void nm_utils_slist_free (GSList *list, GDestroyNotify elem_destroy_fn); /** @@ -136,18 +137,25 @@ gboolean nm_utils_wifi_is_channel_valid (guint32 channel, const char *band); #define NM_UTILS_HWADDR_LEN_MAX 20 /* INFINIBAND_ALEN */ int nm_utils_hwaddr_len (int type) G_GNUC_PURE; +NM_DEPRECATED_IN_0_9_10 int nm_utils_hwaddr_type (int len) G_GNUC_PURE; char *nm_utils_hwaddr_ntoa (gconstpointer addr, int type); GByteArray *nm_utils_hwaddr_atoba (const char *asc, int type); guint8 *nm_utils_hwaddr_aton (const char *asc, int type, gpointer buffer); +NM_AVAILABLE_IN_0_9_10 char *nm_utils_hwaddr_ntoa_len (gconstpointer addr, gsize length); +NM_AVAILABLE_IN_0_9_10 guint8 *nm_utils_hwaddr_aton_len (const char *asc, gpointer buffer, gsize length); +NM_AVAILABLE_IN_0_9_10 gboolean nm_utils_hwaddr_valid (const char *asc); +NM_AVAILABLE_IN_0_9_10 char *nm_utils_bin2hexstr (const char *bytes, int len, int final_len); +NM_AVAILABLE_IN_0_9_10 int nm_utils_hex2byte (const char *hex); +NM_AVAILABLE_IN_0_9_10 char *nm_utils_hexstr2bin (const char *hex, size_t len); gboolean nm_utils_iface_valid_name(const char *name); @@ -161,7 +169,9 @@ gboolean nm_utils_is_uuid (const char *str); * for both nm_utils_inet4_ntop() and nm_utils_inet6_ntop(). **/ #define NM_UTILS_INET_ADDRSTRLEN INET6_ADDRSTRLEN +NM_AVAILABLE_IN_0_9_10 const char *nm_utils_inet4_ntop (in_addr_t inaddr, char *dst); +NM_AVAILABLE_IN_0_9_10 const char *nm_utils_inet6_ntop (const struct in6_addr *in6addr, char *dst); G_END_DECLS |