annotate libpurple/protocols/msn/msnutils.h @ 30998:53dcfcc71953

jabber: Comment the problematic behavior of jabber_add_(feature|identity)
author Paul Aurich <paul@darkrain42.org>
date Mon, 20 Sep 2010 03:25:12 +0000
parents 462cb893521b
children 27e45413d030
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 */
29373
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 20514
diff changeset
24 #ifndef MSN_UTILS_H
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 20514
diff changeset
25 #define MSN_UTILS_H
20400
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*/
29373
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 20514
diff changeset
28 char *msn_encode_mime(const char *str);
20400
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 */
29373
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 20514
diff changeset
33 char *rand_guid(void);
20400
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
29373
462cb893521b Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <mark@kingant.net>
parents: 20514
diff changeset
60 #endif /* MSN_UTILS_H */