annotate libpurple/protocols/msn/msnutils.h @ 24142:fb722b8b4c74

attempts to resend message on switchboard error once, tested by maually disabling switchboard connection on the receiving side I have a feeling that there is a real bug somewhere, but this would at least allow the message to make through (after some delay) References #3330
author Ka-Hing Cheung <khc@hxbc.us>
date Tue, 30 Sep 2008 05:52:57 +0000
parents 723b5a2f91ce
children 462cb893521b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20400
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
1 /**
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
2 * @file msnutils.h Utility functions
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
3 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
4 * purple
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
5 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
8 * source distribution.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
9 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
13 * (at your option) any later version.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
14 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
18 * GNU General Public License for more details.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
19 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
20514
723b5a2f91ce explicit merge of 'd565bd9a8e62d3302ac14bb7c3a68a52c0c6a65e'
Richard Laager <rlaager@wiktel.com>
parents: 20424
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
20400
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
23 */
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
24 #ifndef _MSN_UTILS_H_
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
25 #define _MSN_UTILS_H_
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
26
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
27 /*encode the str to RFC2047 style*/
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
28 char * msn_encode_mime(const char *str);
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
29
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
30 /**
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
31 * Generate the Random GUID
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
32 */
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
33 char * rand_guid(void);
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
34
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
35 /**
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
36 * Parses the MSN message formatting into a format compatible with Purple.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
37 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
38 * @param mime The mime header with the formatting.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
39 * @param pre_ret The returned prefix string.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
40 * @param post_ret The returned postfix string.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
41 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
42 * @return The new message.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
43 */
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
44 void msn_parse_format(const char *mime, char **pre_ret, char **post_ret);
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
45
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
46 /**
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
47 * Parses the Purple message formatting (html) into the MSN format.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
48 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
49 * @param html The html message to format.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
50 * @param attributes The returned attributes string.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
51 * @param message The returned message string.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
52 *
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
53 * @return The new message.
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
54 */
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
55 void msn_import_html(const char *html, char **attributes, char **message);
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
56
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
57 void msn_parse_socket(const char *str, char **ret_host, int *ret_port);
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
58 void msn_handle_chl(char *input, char *output);
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
59
ea9a5566a156 propagate from branch 'im.pidgin.rlaager.merging.msnp13-and-sf-1621854-4' (head 36b8a3e05397b5918f311a046fa580c5bb8846e0)
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
60 #endif /* _MSN_UTILS_H_ */