diff libpurple/util.h @ 27666:a08e84032814

merge of '2348ff22f0ff3453774b8b25b36238465580c609' and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Jul 2009 05:43:38 +0000
parents 8c41a23e6b44
children e1cd44c7c7af c9c038529f38
line wrap: on
line diff
--- a/libpurple/util.h	Sun Jul 12 05:42:40 2009 +0000
+++ b/libpurple/util.h	Sun Jul 12 05:43:38 2009 +0000
@@ -415,6 +415,19 @@
 /*@{*/
 
 /**
+ * Escapes special characters in a plain-text string so they display
+ * correctly as HTML.  For example, & is replaced with &amp; and < is
+ * replaced with &lt;
+ *
+ * This is exactly the same as g_markup_escape_text(), except that it
+ * does not change ' to &apos; because &apos; is not a valid HTML 4 entity,
+ * and is displayed literally in IE7.
+ *
+ * @since 2.6.0
+ */
+gchar *purple_markup_escape_text(const gchar *text, gssize length);
+
+/**
  * Finds an HTML tag matching the given name.
  *
  * This locates an HTML tag's start and end, and stores its attributes
@@ -1190,10 +1203,33 @@
  * @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
  *