comparison src/util.h @ 7095:c8bf2da398e3

[gaim-migrate @ 7660] html.[ch] is gone. Everything inside was namespaced and put in util.[ch]. One less ugly part of gaim in the tree. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 01 Oct 2003 03:43:18 +0000
parents 2343c3aa1dec
children 9d0e74b6ca68
comparison
equal deleted inserted replaced
7094:2343c3aa1dec 7095:c8bf2da398e3
346 * @return TRUE if the tag was found 346 * @return TRUE if the tag was found
347 */ 347 */
348 gboolean gaim_markup_find_tag(const char *needle, const char *haystack, 348 gboolean gaim_markup_find_tag(const char *needle, const char *haystack,
349 const char **start, const char **end, 349 const char **start, const char **end,
350 GData **attributes); 350 GData **attributes);
351
352 /**
353 * Extracts a field of data from HTML.
354 *
355 * This is a scary function. See protocols/msn/msn.c and
356 * protocols/yahoo/yahoo.c for example usage.
357 *
358 * @param str The string to parse.
359 * @param dest_buffer The destination buffer to append the new
360 * field info to.
361 * @param start_token The beginning token.
362 * @param skip The number of characters to skip after the
363 * start token.
364 * @param end_token The ending token.
365 * @param check_value The value that the last character must meet.
366 * @param no_value_token The token indicating no value is given.
367 * @param display_name The short descriptive name to display for this token.
368 * @param is_link TRUE if this should be a link, or FALSE otherwise.
369 * @param link_prefix The prefix for the link.
370 *
371 * @return TRUE if successful, or FALSE otherwise.
372 */
373 gboolean gaim_markup_extract_info_field(const char *str, char *dest_buffer,
374 const char *start_token, int skip,
375 const char *end_token,
376 char check_value,
377 const char *no_value_token,
378 const char *display_name,
379 gboolean is_link,
380 const char *link_prefix);
381
382 /**
383 * Converts HTML markup to XHTML.
384 *
385 * @param html The HTML markup.
386 * @param dest_xhtml The destination XHTML output.
387 * @param dest_plain The destination plain-text output.
388 */
389 void gaim_markup_html_to_xhtml(const char *html, char **dest_xhtml,
390 char **dest_plain);
391
392 /**
393 * Strips HTML tags from a string.
394 *
395 * @param str The string to strip HTML from.
396 *
397 * @return The new string without HTML. This must be freed.
398 */
399 char *gaim_markup_strip_html(const char *str);
351 400
352 /** 401 /**
353 * Parses a URL, returning its host, port, and file path. 402 * Parses a URL, returning its host, port, and file path.
354 * 403 *
355 * The returned data must be freed. 404 * The returned data must be freed.