annotate libpurple/protocols/gg/lib/message.h @ 31410:93b08d43f684

matekm and kkszysiu collaborated on this patch to update our internal libgadu to version 1.10.1.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 24 Mar 2011 20:53:13 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31410
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
1 /*
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
2 * (C) Copyright 2009 Wojtek Kaniewski <wojtekka@irc.pl>
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
3 *
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
5 * it under the terms of the GNU Lesser General Public License Version
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
6 * 2.1 as published by the Free Software Foundation.
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
7 *
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
11 * GNU Lesser General Public License for more details.
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
12 *
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
13 * You should have received a copy of the GNU Lesser General Public
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
14 * License along with this program; if not, write to the Free Software
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
16 * USA.
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
17 */
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
18
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
19 #ifndef LIBGADU_MESSAGE_H
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
20 #define LIBGADU_MESSAGE_H
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
21
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
22 #include <sys/types.h>
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
23 #include <inttypes.h>
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
24 #include "libgadu.h"
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
25
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
26 #if 0
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
27
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
28 struct gg_message {
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
29 uin_t *recipients;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
30 size_t recipient_count;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
31 char *text;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
32 char *html;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
33 char *attributes;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
34 size_t attributes_length;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
35 uint32_t msgclass;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
36 uint32_t seq;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
37
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
38 int auto_convert;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
39 char *text_converted;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
40 char *html_converted;
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
41 };
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
42
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
43 #define GG_MESSAGE_CHECK(gm, result) \
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
44 if ((gm) == NULL) { \
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
45 errno = EINVAL; \
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
46 return (result); \
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
47 }
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
48
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
49 int gg_message_init(gg_message_t *gm, int msgclass, int seq, uin_t *recipients, size_t recipient_count, char *text, char *xhtml, char *attributes, size_t attributes_length, int auto_convert);
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
50
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
51 #endif
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
52
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
53 size_t gg_message_html_to_text(char *dst, const char *html);
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
54 size_t gg_message_text_to_html(char *dst, const char *utf_msg, const char *format, size_t format_len);
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
55
93b08d43f684 matekm and kkszysiu collaborated on this patch to update our internal libgadu
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff changeset
56 #endif /* LIBGADU_MESSAGE_H */