annotate libpurple/dnsquery.h @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents f22bc8b5b9dc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file dnsquery.h DNS query API
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 * @ingroup core
20074
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19966
diff changeset
4 */
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19966
diff changeset
5
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19966
diff changeset
6 /* purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * source distribution.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16672
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
26 #ifndef _PURPLE_DNSQUERY_H_
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
27 #define _PURPLE_DNSQUERY_H_
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 #include <glib.h>
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 #include "eventloop.h"
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
31 #include "account.h"
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32
28690
1ef332689ea2 Document the opaque structure. Refs #10432.
Paul Aurich <paul@darkrain42.org>
parents: 20926
diff changeset
33 /**
1ef332689ea2 Document the opaque structure. Refs #10432.
Paul Aurich <paul@darkrain42.org>
parents: 20926
diff changeset
34 * An opaque structure representing a DNS query. The hostname and port
1ef332689ea2 Document the opaque structure. Refs #10432.
Paul Aurich <paul@darkrain42.org>
parents: 20926
diff changeset
35 * associated with the query can be retrieved using
1ef332689ea2 Document the opaque structure. Refs #10432.
Paul Aurich <paul@darkrain42.org>
parents: 20926
diff changeset
36 * purple_dnsquery_get_host() and purple_dnsquery_get_port().
1ef332689ea2 Document the opaque structure. Refs #10432.
Paul Aurich <paul@darkrain42.org>
parents: 20926
diff changeset
37 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
38 typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 * The "hosts" parameter is a linked list containing pairs of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 * one size_t addrlen and one struct sockaddr *addr. It should
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 * be free'd by the callback function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
45 typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
47 /**
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
48 * Callbacks used by the UI if it handles resolving DNS
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
49 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
50 typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts);
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
51 typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
53 /**
19965
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
54 * DNS Request UI operations; UIs should implement this if they want to do DNS
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
55 * lookups themselves, rather than relying on the core.
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
56 *
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
57 * @see @ref ui-ops
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
58 */
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
59 typedef struct
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
60 {
31876
08dcd2d4f0b7 Added PurpleSrvTxtQueryUiOps which allow UIs to specify their own mechanisms
thijsalkemade@gmail.com
parents: 28690
diff changeset
61 /** If implemented, return TRUE if the UI takes responsibility for DNS
08dcd2d4f0b7 Added PurpleSrvTxtQueryUiOps which allow UIs to specify their own mechanisms
thijsalkemade@gmail.com
parents: 28690
diff changeset
62 * queries. When returning FALSE, the standard implementation is used. */
19965
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
63 gboolean (*resolve_host)(PurpleDnsQueryData *query_data,
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
64 PurpleDnsQueryResolvedCallback resolved_cb,
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
65 PurpleDnsQueryFailedCallback failed_cb);
15712
7ac07c5fb1c2 No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evan.s@dreskin.net>
parents: 15710
diff changeset
66
19965
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
67 /** Called just before @a query_data is freed; this should cancel any
20926
70403d57afe6 Fix a typo in a Doxygen comment.
Richard Laager <rlaager@wiktel.com>
parents: 20074
diff changeset
68 * further use of @a query_data the UI would make. Unneeded if
19965
47ad1aeae4aa Add doxygen fu to the DNS UiOps.
Will Thompson <will.thompson@collabora.co.uk>
parents: 16672
diff changeset
69 * #resolve_host is not implemented.
15712
7ac07c5fb1c2 No changes; fixed a bunch of whitespace problems made by a text editor with 'use tabs' disabled. Sorry for the noise.
Evan Schoenberg <evan.s@dreskin.net>
parents: 15710
diff changeset
70 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
71 void (*destroy)(PurpleDnsQueryData *query_data);
16672
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
72
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
73 void (*_purple_reserved1)(void);
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
74 void (*_purple_reserved2)(void);
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
75 void (*_purple_reserved3)(void);
516f14bef90e Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15823
diff changeset
76 void (*_purple_reserved4)(void);
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
77 } PurpleDnsQueryUiOps;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 #ifdef __cplusplus
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 extern "C" {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 #endif
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84 /** @name DNS query API */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 /*@{*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 * Perform an asynchronous DNS query.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 *
32474
f22bc8b5b9dc Replace purple_dnsquery_a_account with purple_dnsquery_a.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31980
diff changeset
91 * @param account The account that the query is being done for (or NULL)
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 * @param hostname The hostname to resolve.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 * @param port A port number which is stored in the struct sockaddr.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 * @param callback The callback function to call after resolving.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 * @param data Extra data to pass to the callback function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 * @return NULL if there was an error, otherwise return a reference to
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 * a data structure that can be used to cancel the pending
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 * DNS query, if needed.
31930
0eceb1304f53 Add new DNS-related API to perform lookups in the context of an account.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 31876
diff changeset
100 *
0eceb1304f53 Add new DNS-related API to perform lookups in the context of an account.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 31876
diff changeset
101 */
32474
f22bc8b5b9dc Replace purple_dnsquery_a_account with purple_dnsquery_a.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31980
diff changeset
102 PurpleDnsQueryData *purple_dnsquery_a(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 * Cancel a DNS query and destroy the associated data structure.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 * @param query_data The DNS query to cancel. This data structure
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 * is freed by this function.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
110 void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 /**
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
113 * Sets the UI operations structure to be used when doing a DNS
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
114 * resolve. The UI operations need only be set if the UI wants to
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
115 * handle the resolve itself; otherwise, leave it as NULL.
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
116 *
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
117 * @param ops The UI operations structure.
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
118 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
119 void purple_dnsquery_set_ui_ops(PurpleDnsQueryUiOps *ops);
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
120
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
121 /**
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
122 * Returns the UI operations structure to be used when doing a DNS
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
123 * resolve.
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
124 *
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
125 * @return The UI operations structure.
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
126 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
127 PurpleDnsQueryUiOps *purple_dnsquery_get_ui_ops(void);
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
128
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
129 /**
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
130 * Get the host associated with a PurpleDnsQueryData
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
131 *
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
132 * @param query_data The DNS query
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
133 * @return The host.
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
134 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
135 char *purple_dnsquery_get_host(PurpleDnsQueryData *query_data);
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
136
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
137 /**
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
138 * Get the port associated with a PurpleDnsQueryData
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
139 *
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
140 * @param query_data The DNS query
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
141 * @return The port.
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
142 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
143 unsigned short purple_dnsquery_get_port(PurpleDnsQueryData *query_data);
15705
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
144
6a0b9734a722 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 <evan.s@dreskin.net>
parents: 15374
diff changeset
145 /**
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 * Initializes the DNS query subsystem.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
148 void purple_dnsquery_init(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 * Uninitializes the DNS query subsystem.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
153 void purple_dnsquery_uninit(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 /*@}*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 #ifdef __cplusplus
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159 #endif
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15712
diff changeset
161 #endif /* _PURPLE_DNSQUERY_H_ */