Frameworks/libpurple.framework/Versions/0.6.2/Headers/pecan_util.h
author Zachary West <zacw@adium.im>
Fri Aug 21 13:25:11 2009 -0700 (2009-08-21)
changeset 2592 e8d15275025e
parent 1739 Frameworks/libpurple.framework/Versions/0.6.0/Headers/pecan_util.h@8b0daad9656c
permissions -rw-r--r--
im.pidgin.adium.1-4 at 267c6165e02e34318a1823960bd04c0639952f73
     1 /**
     2  * Copyright (C) 2007-2008 Felipe Contreras
     3  *
     4  * Purple is the legal property of its developers, whose names are too numerous
     5  * to list here.  Please refer to the COPYRIGHT file distributed with this
     6  * source distribution.
     7  *
     8  * This program is free software; you can redistribute it and/or modify
     9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 2 of the License, or
    11  * (at your option) any later version.
    12  *
    13  * This program is distributed in the hope that it will be useful,
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
    17  *
    18  * You should have received a copy of the GNU General Public License
    19  * along with this program; if not, write to the Free Software
    20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
    21  */
    22 
    23 #ifndef PECAN_UTIL_H
    24 #define PECAN_UTIL_H
    25 
    26 #include <glib.h>
    27 
    28 /**
    29  * Parses the MSN message formatting into a format compatible with Purple.
    30  *
    31  * @param mime     The mime header with the formatting.
    32  * @param pre_ret  The returned prefix string.
    33  * @param post_ret The returned postfix string.
    34  *
    35  * @return The new message.
    36  */
    37 void msn_parse_format(const char *mime, char **pre_ret, char **post_ret);
    38 
    39 /**
    40  * Parses the Purple message formatting (html) into the MSN format.
    41  *
    42  * @param html			The html message to format.
    43  * @param attributes	The returned attributes string.
    44  * @param message		The returned message string.
    45  *
    46  * @return The new message.
    47  */
    48 void msn_import_html(const char *html, char **attributes, char **message);
    49 
    50 void
    51 pecan_handle_challenge (const gchar *input,
    52                         const gchar *product_id,
    53                         gchar *output);
    54 
    55 void msn_parse_socket(const char *str, char **ret_host, int *ret_port);
    56 char *msn_rand_guid(void);
    57 gchar *pecan_normalize (const gchar *str);
    58 
    59 #if !GLIB_CHECK_VERSION(2,12,0)
    60 void g_hash_table_remove_all (GHashTable *hash_table);
    61 #endif /* !GLIB_CHECK_VERSION(2,12,0) */
    62 gpointer g_hash_table_peek_first (GHashTable *hash_table);
    63 gboolean g_ascii_strcase_equal (gconstpointer v1, gconstpointer v2);
    64 guint g_ascii_strcase_hash (gconstpointer v);
    65 
    66 #endif /* PECAN_UTIL_H */