libpurple/dnsquery.h

Sat, 19 May 2007 21:38:47 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Sat, 19 May 2007 21:38:47 +0000
changeset 18068
b6554e3c8224
parent 14300
libgaim/dnsquery.h@68a0aa63f3b8
parent 16743
libgaim/dnsquery.h@1ce5ffe12e2a
permissions
-rw-r--r--

merge of '1442df274a24edc9a31194327bd00dfbcf478720'
and 'ce02548a6b6a545d97fb3f371506bcf1b5cc5131'

14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
1 /**
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
2 * @file dnsquery.h DNS query API
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
3 * @ingroup core
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
5 * purple
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
6 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
7 * Purple is the legal property of its developers, whose names are too numerous
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
9 * source distribution.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
10 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
15 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
20 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
24 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
25 #ifndef _PURPLE_DNSQUERY_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
26 #define _PURPLE_DNSQUERY_H_
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
27
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
28 #include <glib.h>
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
29 #include "eventloop.h"
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
30 #include "account.h"
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
31
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
32 typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
33
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
34 /**
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
35 * The "hosts" parameter is a linked list containing pairs of
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
36 * one size_t addrlen and one struct sockaddr *addr. It should
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
37 * be free'd by the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
38 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
39 typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
40
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
41 /**
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
42 * Callbacks used by the UI if it handles resolving DNS
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
43 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
44 typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
45 typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
46
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
47 /**
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
48 * DNS Request UI operations
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
49 */
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
50 typedef struct
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
51 {
15775
a1aed6d0c33b No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evands@pidgin.im>
parents: 15771
diff changeset
52 /* If implemented, the UI is responsible for DNS queries */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
53 gboolean (*resolve_host)(PurpleDnsQueryData *query_data, PurpleDnsQueryResolvedCallback resolved_cb, PurpleDnsQueryFailedCallback failed_cb);
15775
a1aed6d0c33b No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evands@pidgin.im>
parents: 15771
diff changeset
54
a1aed6d0c33b No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evands@pidgin.im>
parents: 15771
diff changeset
55 /* After destroy is called, query_data will be feed, so this must
a1aed6d0c33b No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evands@pidgin.im>
parents: 15771
diff changeset
56 * cancel any further use of it the UI would do. Unneeded if
a1aed6d0c33b No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evands@pidgin.im>
parents: 15771
diff changeset
57 * resolve_host is not implemented.
a1aed6d0c33b No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evands@pidgin.im>
parents: 15771
diff changeset
58 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
59 void (*destroy)(PurpleDnsQueryData *query_data);
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
60
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
61 void (*_purple_reserved1)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
62 void (*_purple_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
63 void (*_purple_reserved3)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
64 void (*_purple_reserved4)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
65 } PurpleDnsQueryUiOps;
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
66
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
67 #ifdef __cplusplus
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
68 extern "C" {
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
69 #endif
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
70
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
71 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
72 /** @name DNS query API */
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
73 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
74 /*@{*/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
75
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
76 /**
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
77 * Perform an asynchronous DNS query.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
78 *
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
79 * @param hostname The hostname to resolve.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
80 * @param port A port number which is stored in the struct sockaddr.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
81 * @param callback The callback function to call after resolving.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
82 * @param data Extra data to pass to the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
83 *
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
84 * @return NULL if there was an error, otherwise return a reference to
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
85 * a data structure that can be used to cancel the pending
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
86 * DNS query, if needed.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
87 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
88 PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
89
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
90 /**
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
91 * Cancel a DNS query and destroy the associated data structure.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
92 *
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
93 * @param query_data The DNS query to cancel. This data structure
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
94 * is freed by this function.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
95 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
96 void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
97
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
98 /**
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
99 * Sets the UI operations structure to be used when doing a DNS
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
100 * resolve. The UI operations need only be set if the UI wants to
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
101 * handle the resolve itself; otherwise, leave it as NULL.
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
102 *
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
103 * @param ops The UI operations structure.
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
104 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
105 void purple_dnsquery_set_ui_ops(PurpleDnsQueryUiOps *ops);
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
106
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
107 /**
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
108 * Returns the UI operations structure to be used when doing a DNS
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
109 * resolve.
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
110 *
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
111 * @return The UI operations structure.
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
112 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
113 PurpleDnsQueryUiOps *purple_dnsquery_get_ui_ops(void);
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
114
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
115 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
116 * Get the host associated with a PurpleDnsQueryData
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
117 *
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
118 * @param query_data The DNS query
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
119 * @return The host.
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
120 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
121 char *purple_dnsquery_get_host(PurpleDnsQueryData *query_data);
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
122
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
123 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
124 * Get the port associated with a PurpleDnsQueryData
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
125 *
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
126 * @param query_data The DNS query
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
127 * @return The port.
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
128 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
129 unsigned short purple_dnsquery_get_port(PurpleDnsQueryData *query_data);
15763
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
130
2b529e4350bc The UI can now use the GaimDnsQueryUiOps to handle DNS resolving itself; if this is done, the platform-specific DNS query code won't be used. This will be used in Adium to use an efficient threads-based DNS resolve (since Adium is already multithreaded, this is significantly cheaper than fork()).
Evan Schoenberg <evands@pidgin.im>
parents: 15435
diff changeset
131 /**
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
132 * Initializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
133 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
134 void purple_dnsquery_init(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
135
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
136 /**
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
137 * Uninitializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
138 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
139 void purple_dnsquery_uninit(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
140
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
141 /*@}*/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
142
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
143 #ifdef __cplusplus
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
144 }
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
145 #endif
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
146
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
147 #endif /* _PURPLE_DNSQUERY_H_ */

mercurial