Thu, 22 Aug 2013 01:36:58 +0530
Merged soc.2013.gobjectification branch
| 30659 | 1 | /* |
| 2 | * Purple's oscar protocol plugin | |
| 3 | * This file is the legal property of its developers. | |
| 4 | * Please see the AUTHORS file distributed alongside this file. | |
| 5 | * | |
| 6 | * This library is free software; you can redistribute it and/or | |
| 7 | * modify it under the terms of the GNU Lesser General Public | |
| 8 | * License as published by the Free Software Foundation; either | |
| 9 | * version 2 of the License, or (at your option) any later version. | |
| 10 | * | |
| 11 | * This library is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | * Lesser General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU Lesser General Public | |
| 17 | * License along with this library; if not, write to the Free Software | |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | |
| 19 | */ | |
| 20 | ||
| 21 | #ifndef _ENCODING_H_ | |
| 22 | #define _ENCODING_H_ | |
| 23 | ||
| 24 | #include "oscar.h" | |
| 25 | #include "oscarcommon.h" | |
| 26 | ||
|
30661
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30660
diff
changeset
|
27 | gchar * oscar_encoding_to_utf8(const char *encoding, const char *text, int textlen); |
| 30659 | 28 | gchar * oscar_utf8_try_convert(PurpleAccount *account, OscarData *od, const gchar *msg); |
| 29 | ||
| 30 | /** | |
| 31 | * This attemps to decode an incoming IM into a UTF8 string. | |
| 32 | * | |
| 33 | * We try decoding using two different character sets. The charset | |
| 34 | * specified in the IM determines the order in which we attempt to | |
| 35 | * decode. We do this because there are lots of broken ICQ clients | |
| 36 | * that don't correctly send non-ASCII messages. And if Purple isn't | |
| 37 | * able to deal with that crap, then people complain like banshees. | |
| 38 | */ | |
|
30666
ff138d6c7bc4
Got rid of receiving multipart messages over channel 1, which simplified the code
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
39 | gchar * oscar_decode_im(PurpleAccount *account, const char *sourcebn, guint16 charset, const gchar *data, gsize datalen); |
| 30659 | 40 | |
| 41 | /** | |
| 42 | * Figure out what encoding to use when sending a given outgoing message. | |
| 43 | */ | |
|
30669
e669bab0688e
Renames and cleanups.
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30666
diff
changeset
|
44 | gchar * oscar_encode_im(const gchar *msg, gsize *result_len, guint16 *charset, gchar **charsetstr); |
| 30659 | 45 | |
| 46 | #endif |