libpurple/dnsquery.h

Sun, 29 Apr 2007 01:08:11 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Sun, 29 Apr 2007 01:08:11 +0000
changeset 16617
0e09d0e3ae30
parent 15884
4de1981757fc
child 16743
1ce5ffe12e2a
child 20478
46933dc62880
permissions
-rw-r--r--

Fix a bug with the bugfix for empty icons. The logic was backwards here.
This caused all buddy icons to be lost on migration and as an added bonus,
it failed to solve the empty icon NULL extension bug!

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);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
60 } PurpleDnsQueryUiOps;
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
61
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
62 #ifdef __cplusplus
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
63 extern "C" {
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
64 #endif
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
65
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 /** @name DNS query API */
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
68 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
69 /*@{*/
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 /**
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
72 * Perform an asynchronous DNS query.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
73 *
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
74 * @param hostname The hostname to resolve.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
75 * @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
76 * @param callback The callback function to call after resolving.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
77 * @param data Extra data to pass to the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
78 *
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
79 * @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
80 * a data structure that can be used to cancel the pending
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
81 * DNS query, if needed.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
82 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
83 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
84
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
85 /**
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
86 * Cancel a DNS query and destroy the associated data structure.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
87 *
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
88 * @param query_data The DNS query to cancel. This data structure
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
89 * is freed by this function.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
90 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
91 void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
14300
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 /**
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
94 * 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
95 * 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
96 * 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
97 *
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
98 * @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
99 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
100 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
101
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 * 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
104 * 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
105 *
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 * @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
107 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
108 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
109
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 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
111 * 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
112 *
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
113 * @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
114 * @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
115 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
116 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
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 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
119 * 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
120 *
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
121 * @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
122 * @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
123 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
124 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
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 /**
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
127 * Initializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
128 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
129 void purple_dnsquery_init(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
130
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
131 /**
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
132 * Uninitializes 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_uninit(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
135
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
136 /*@}*/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
137
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
138 #ifdef __cplusplus
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
139 }
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
140 #endif
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
141
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
142 #endif /* _PURPLE_DNSQUERY_H_ */

mercurial