From 42ad1f2a9fc126a4d00981bb9f8c81332ebdfd6c Mon Sep 17 00:00:00 2001 From: Paul Aurich Date: Sat, 11 Jul 2009 07:32:27 +0000 Subject: Add purple_ipv6_address_is_valid; guess what it does? --- libpurple/util.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'libpurple/util.h') diff --git a/libpurple/util.h b/libpurple/util.h index b3928d1fd5..e1be673e24 100644 --- a/libpurple/util.h +++ b/libpurple/util.h @@ -1203,9 +1203,32 @@ gboolean purple_email_is_valid(const char *address); * @param ip The IP address to validate. * * @return True if the IP address is syntactically correct. + * @deprecated This function will be replaced with one that validates + * as either IPv4 or IPv6 in 3.0.0. If you don't want this, + * behavior, use one of the more specific functions. */ gboolean purple_ip_address_is_valid(const char *ip); +/** + * Checks if the given IP address is a syntactically valid IPv4 address. + * + * @param ip The IP address to validate. + * + * @return True if the IP address is syntactically correct. + * @since 2.6.0 + */ +gboolean purple_ipv4_address_is_valid(const char *ip); + +/** + * Checks if the given IP address is a syntactically valid IPv6 address. + * + * @param ip The IP address to validate. + * + * @return True if the IP address is syntactically correct. + * @since 2.6.0 + */ +gboolean purple_ipv6_address_is_valid(const char *ip); + /** * This function extracts a list of URIs from the a "text/uri-list" * string. It was "borrowed" from gnome_uri_list_extract_uris -- cgit v1.2.1