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