comparison src/protocols/gg/utils.h @ 11414:d5599677bf32

[gaim-migrate @ 13651] Code split. committer: Tailor Script <tailor@pidgin.im>
author Bartoz Oler <bartosz@pidgin.im>
date Thu, 01 Sep 2005 20:05:01 +0000
parents
children 8724718d387f
comparison
equal deleted inserted replaced
11413:112eb407497e 11414:d5599677bf32
1 /**
2 * @file utils.h
3 *
4 * gaim
5 *
6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23 #ifndef _GAIM_GG_UTILS_H
24 #define _GAIM_GG_UTILS_H
25
26 #include "internal.h"
27
28 #include "plugin.h"
29 #include "version.h"
30 #include "notify.h"
31 #include "status.h"
32 #include "blist.h"
33 #include "accountopt.h"
34 #include "debug.h"
35 #include "util.h"
36 #include "request.h"
37
38 #include "gg.h"
39
40
41 /*
42 * Convert string to number. Check wheter a given
43 * string is a correct UIN.
44 *
45 * Return UIN or 0 if an error occurred.
46 */
47 uin_t
48 ggp_str_to_uin(const char *text);
49
50 /**
51 * Convert enconding of a given string.
52 *
53 * @param locstr Input string.
54 * @param encsrc Current encoding of the string.
55 * @param encdst Target encoding of the string.
56 *
57 * @return Converted string (it must be g_free()ed when not used. Or NULL if
58 * locstr is NULL.
59 */
60 char *
61 charset_convert(const gchar *locstr, const char *encsrc, const char *encdst);
62
63 /**
64 * Get UIN of a given account.
65 *
66 * @param account Current account.
67 *
68 * @return UIN of an account.
69 */
70 uin_t
71 ggp_get_uin(GaimAccount *account);
72
73 /**
74 * Returns the best name of a buddy from the buddylist.
75 *
76 * @param gc GaimConnection instance.
77 * @param uin UIN of the buddy.
78 *
79 * @return Name of the buddy, or UIN converted to string.
80 */
81 const char *
82 ggp_buddy_get_name(GaimConnection *gc, const uin_t uin);
83
84 #endif /* _GAIM_GG_UTILS_H */
85
86 /* vim: set ts=4 sts=0 sw=4 noet: */