Sat, 19 May 2007 21:38:47 +0000
merge of '1442df274a24edc9a31194327bd00dfbcf478720'
and 'ce02548a6b6a545d97fb3f371506bcf1b5cc5131'
| 14243 | 1 | /** |
| 2 | * @file dnsquery.h DNS query API | |
| 3 | * @ingroup core | |
| 4 | * | |
| 15884 | 5 | * purple |
| 14243 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 14243 | 8 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 9 | * source distribution. | |
| 10 | * | |
| 11 | * This program is free software; you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation; either version 2 of the License, or | |
| 14 | * (at your option) any later version. | |
| 15 | * | |
| 16 | * This program is distributed in the hope that it will be useful, | |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 | * GNU General Public License for more details. | |
| 20 | * | |
| 21 | * You should have received a copy of the GNU General Public License | |
| 22 | * along with this program; if not, write to the Free Software | |
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 | */ | |
| 15884 | 25 | #ifndef _PURPLE_DNSQUERY_H_ |
| 26 | #define _PURPLE_DNSQUERY_H_ | |
| 14243 | 27 | |
| 28 | #include <glib.h> | |
| 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 | 31 | |
| 15884 | 32 | typedef struct _PurpleDnsQueryData PurpleDnsQueryData; |
|
14245
8a215625c6cb
[gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents:
14243
diff
changeset
|
33 | |
| 14243 | 34 | /** |
| 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 | 38 | */ |
| 15884 | 39 | typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message); |
| 14243 | 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 | 44 | typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts); |
| 45 | typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message); | |
| 14243 | 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 | 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 | 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 | 65 | } PurpleDnsQueryUiOps; |
| 14243 | 66 | |
| 67 | #ifdef __cplusplus | |
| 68 | extern "C" { | |
| 69 | #endif | |
| 70 | ||
| 71 | /**************************************************************************/ | |
| 72 | /** @name DNS query API */ | |
| 73 | /**************************************************************************/ | |
| 74 | /*@{*/ | |
| 75 | ||
| 76 | /** | |
|
14300
68a0aa63f3b8
[gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
77 | * Perform an asynchronous DNS query. |
| 14243 | 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 | 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 | 87 | */ |
| 15884 | 88 | PurpleDnsQueryData *purple_dnsquery_a(const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data); |
| 14243 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 139 | void purple_dnsquery_uninit(void); |
|
14300
68a0aa63f3b8
[gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
140 | |
| 14243 | 141 | /*@}*/ |
| 142 | ||
| 143 | #ifdef __cplusplus | |
| 144 | } | |
| 145 | #endif | |
| 146 | ||
| 15884 | 147 | #endif /* _PURPLE_DNSQUERY_H_ */ |