Mercurial > pidgin.yaz
comparison libpurple/network.h @ 27711:7fbf964c6c6c
Move the IDN support into the DNS routines.
This turned out to be cleaner than I first thought, so here we go.
All libpurple DNS routines support IDN when built against GNU libidn.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sun, 19 Jul 2009 23:45:13 +0000 |
parents | 6e4afab5576d |
children | c55bba399426 |
comparison
equal
deleted
inserted
replaced
27710:91333c6c16ef | 27711:7fbf964c6c6c |
---|---|
266 * @since 2.6.0 | 266 * @since 2.6.0 |
267 */ | 267 */ |
268 void purple_network_remove_port_mapping(gint fd); | 268 void purple_network_remove_port_mapping(gint fd); |
269 | 269 |
270 /** | 270 /** |
271 * Convert a UTF-8 domain name to ASCII in accordance with the IDNA | |
272 * specification. If libpurple is compiled without IDN support, this function | |
273 * copies the input into the output buffer. | |
274 * | |
275 * Because this function is used by DNS resolver child/threads, it uses no | |
276 * other libpurple API and is threadsafe. | |
277 * | |
278 * In general, a buffer of about 512 bytes is the appropriate size to use. | |
279 * | |
280 * @param in The hostname to be converted. | |
281 * @param out The output buffer where an allocated string will be returned. | |
282 * The caller is responsible for freeing this. | |
283 * @returns 0 on success, -1 if the out is NULL, or an error code | |
284 * that currently corresponds to the Idna_rc enum in libidn. | |
285 * @since 2.6.0 | |
286 */ | |
287 int purple_network_convert_idn_to_ascii(const gchar *in, gchar **out); | |
288 | |
289 /** | |
271 * Initializes the network subsystem. | 290 * Initializes the network subsystem. |
272 */ | 291 */ |
273 void purple_network_init(void); | 292 void purple_network_init(void); |
274 | 293 |
275 /** | 294 /** |