Sat, 20 Jan 2007 02:32:10 +0000
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
| 11414 | 1 | /** |
|
13627
44233a1064f9
[gaim-migrate @ 16013]
Evan Schoenberg <evands@pidgin.im>
parents:
12373
diff
changeset
|
2 | * @file gg-utils.h |
| 11414 | 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 | ||
| 15288 | 41 | /** |
|
12224
bf547f7989a4
[gaim-migrate @ 14526]
Richard Laager <rlaager@pidgin.im>
parents:
12007
diff
changeset
|
42 | * Convert a base 10 string to a UIN. |
| 11414 | 43 | * |
|
12224
bf547f7989a4
[gaim-migrate @ 14526]
Richard Laager <rlaager@pidgin.im>
parents:
12007
diff
changeset
|
44 | * @param str The string to convert |
| 15288 | 45 | * |
| 46 | * @return UIN or 0 if an error occurred. | |
| 11414 | 47 | */ |
| 48 | uin_t | |
|
12224
bf547f7989a4
[gaim-migrate @ 14526]
Richard Laager <rlaager@pidgin.im>
parents:
12007
diff
changeset
|
49 | ggp_str_to_uin(const char *str); |
| 11414 | 50 | |
| 51 | /** | |
| 15288 | 52 | * Calculate size of a NULL-terminated array. |
| 53 | * | |
| 54 | * @param array The array. | |
| 55 | * | |
| 56 | * @return Size of the array. | |
| 57 | */ | |
| 58 | unsigned int | |
| 59 | ggp_array_size(char **array); | |
| 60 | ||
| 61 | /** | |
| 11414 | 62 | * Convert enconding of a given string. |
| 63 | * | |
| 64 | * @param locstr Input string. | |
| 65 | * @param encsrc Current encoding of the string. | |
| 66 | * @param encdst Target encoding of the string. | |
| 67 | * | |
| 68 | * @return Converted string (it must be g_free()ed when not used. Or NULL if | |
| 69 | * locstr is NULL. | |
| 70 | */ | |
| 71 | char * | |
| 72 | charset_convert(const gchar *locstr, const char *encsrc, const char *encdst); | |
| 73 | ||
| 74 | /** | |
| 75 | * Get UIN of a given account. | |
| 76 | * | |
| 77 | * @param account Current account. | |
| 78 | * | |
| 79 | * @return UIN of an account. | |
| 80 | */ | |
| 81 | uin_t | |
| 82 | ggp_get_uin(GaimAccount *account); | |
| 83 | ||
| 84 | /** | |
| 85 | * Returns the best name of a buddy from the buddylist. | |
| 86 | * | |
| 87 | * @param gc GaimConnection instance. | |
| 88 | * @param uin UIN of the buddy. | |
| 89 | * | |
| 90 | * @return Name of the buddy, or UIN converted to string. | |
| 91 | */ | |
|
12373
a8f71f73576d
[gaim-migrate @ 14677]
Richard Laager <rlaager@pidgin.im>
parents:
12224
diff
changeset
|
92 | char * |
| 11414 | 93 | ggp_buddy_get_name(GaimConnection *gc, const uin_t uin); |
| 94 | ||
| 95 | #endif /* _GAIM_GG_UTILS_H */ | |
| 96 | ||
| 12007 | 97 | /* vim: set ts=8 sts=0 sw=8 noet: */ |