libpurple/protocols/gg/utils.h

Tue, 07 Aug 2012 00:12:39 +0200

author
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
date
Tue, 07 Aug 2012 00:12:39 +0200
branch
soc.2012.gg
changeset 33333
b20aed44c357
parent 33309
bc2f2ea7b5ab
child 33334
734fc6da6179
permissions
-rw-r--r--

Gadu-Gadu: setting own buddy icon

11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
1 /**
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
2 * @file utils.h
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
3 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
4 * purple
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
5 *
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us>
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
7 *
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
11 * (at your option) any later version.
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
12 *
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
16 * GNU General Public License for more details.
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
17 *
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 15884
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
21 */
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
22
33300
c671ae84307f Updated libgadu to 1.11.2, configure.ac refactoring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33299
diff changeset
23 #ifndef _GGP_UTILS_H
c671ae84307f Updated libgadu to 1.11.2, configure.ac refactoring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33299
diff changeset
24 #define _GGP_UTILS_H
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
25
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
26 #include <internal.h>
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
27 #include <libgadu.h>
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
28
15288
ee9ffc3db216 [gaim-migrate @ 18016]
Bartosz Oler <bartosz@pidgin.im>
parents: 14254
diff changeset
29 /**
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
30 * Converts stringified UIN to uin_t.
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
31 *
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
32 * @param str The string to convert.
15288
ee9ffc3db216 [gaim-migrate @ 18016]
Bartosz Oler <bartosz@pidgin.im>
parents: 14254
diff changeset
33 *
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
34 * @return Converted UIN or 0 if an error occurred.
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
35 */
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
36 uin_t ggp_str_to_uin(const char *str);
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
37
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
38 /**
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
39 * Stringifies UIN.
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
40 *
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
41 * @param uin UIN to stringify.
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
42 *
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
43 * @return Stringified UIN.
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
44 */
33298
519acf37d16e Gadu-Gadu: fix receiving of inline images after 3.x changes; code refactoring here as well
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
45 const char * ggp_uin_to_str(uin_t uin);
519acf37d16e Gadu-Gadu: fix receiving of inline images after 3.x changes; code refactoring here as well
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
46
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
47 /**
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
48 * Converts encoding of a given string from UTF-8 to CP1250.
15288
ee9ffc3db216 [gaim-migrate @ 18016]
Bartosz Oler <bartosz@pidgin.im>
parents: 14254
diff changeset
49 *
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
50 * @param src Input string.
15288
ee9ffc3db216 [gaim-migrate @ 18016]
Bartosz Oler <bartosz@pidgin.im>
parents: 14254
diff changeset
51 *
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
52 * @return Converted string (must be freed with g_free). If src is NULL,
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
53 * then NULL is returned.
15288
ee9ffc3db216 [gaim-migrate @ 18016]
Bartosz Oler <bartosz@pidgin.im>
parents: 14254
diff changeset
54 */
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
55 gchar * ggp_convert_to_cp1250(const gchar *src);
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
56
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
57 /**
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
58 * Converts encoding of a given string from CP1250 to UTF-8.
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
59 *
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
60 * @param src Input string.
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
61 *
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
62 * @return Converted string (must be freed with g_free). If src is NULL,
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
63 * then NULL is returned.
11414
10b74079ef15 [gaim-migrate @ 13651]
Bartosz Oler <bartosz@pidgin.im>
parents:
diff changeset
64 */
33299
b3c4ab3aeb7f Gadu-Gadu: utils refactoring, (partially) fix new account registration
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33298
diff changeset
65 gchar * ggp_convert_from_cp1250(const gchar *src);
20289
5c844288fbec applied changes from 32f31e981f0618a4167aa98bcc22c2dab13d1550
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19859
diff changeset
66
33309
bc2f2ea7b5ab Gadu-Gadu: refactoring of account registration done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33305
diff changeset
67 gboolean ggp_password_validate(const gchar *password);
bc2f2ea7b5ab Gadu-Gadu: refactoring of account registration done
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33305
diff changeset
68
33300
c671ae84307f Updated libgadu to 1.11.2, configure.ac refactoring
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33299
diff changeset
69 #endif /* _GGP_UTILS_H */

mercurial