libpurple/dnsquery.h

Sat, 03 Aug 2013 20:35:56 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 03 Aug 2013 20:35:56 +0530
branch
soc.2013.gobjectification.plugins
changeset 36433
ff659a466f19
parent 32787
7072f190d6ad
child 35024
eb3afb7643ce
permissions
-rw-r--r--

OCD

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
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19974
diff changeset
4 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19974
diff changeset
5
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19974
diff changeset
6 /* purple
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
7 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
8 * 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
9 * to list here. Please refer to the COPYRIGHT file distributed with this
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
10 * source distribution.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
11 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
13 * 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
14 * the Free Software Foundation; either version 2 of the License, or
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
16 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
21 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 16743
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
25 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
26 #ifndef _PURPLE_DNSQUERY_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
27 #define _PURPLE_DNSQUERY_H_
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
28
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
29 #include <glib.h>
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
30 #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
31 #include "account.h"
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
32
28619
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
33 /**
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
34 * An opaque structure representing a DNS query. The hostname and port
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
35 * associated with the query can be retrieved using
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
36 * purple_dnsquery_get_host() and purple_dnsquery_get_port().
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
37 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
38 typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
39
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
40 /**
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
41 * The "hosts" parameter is a linked list containing pairs of
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
42 * one size_t addrlen and one struct sockaddr *addr. It should
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
43 * be free'd by the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
44 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
45 typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *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 * 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
49 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
50 typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts);
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
51 typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
52
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
53 /**
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
54 * DNS Request UI operations; UIs should implement this if they want to do DNS
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
55 * lookups themselves, rather than relying on the core.
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
56 *
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
57 * @see @ref ui-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
58 */
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
59 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
60 {
31625
1097ed538036 Added PurpleSrvTxtQueryUiOps which allow UIs to specify their own mechanisms
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 28619
diff changeset
61 /** If implemented, return TRUE if the UI takes responsibility for DNS
1097ed538036 Added PurpleSrvTxtQueryUiOps which allow UIs to specify their own mechanisms
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 28619
diff changeset
62 * queries. When returning FALSE, the standard implementation is used. */
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
63 gboolean (*resolve_host)(PurpleDnsQueryData *query_data,
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
64 PurpleDnsQueryResolvedCallback resolved_cb,
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
65 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
66
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
67 /** Called just before @a query_data is freed; this should cancel any
21001
cd56c63e2b2c Fix a typo in a Doxygen comment.
Richard Laager <rlaager@pidgin.im>
parents: 20147
diff changeset
68 * further use of @a query_data the UI would make. Unneeded if
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
69 * #resolve_host is not implemented.
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
70 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
71 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
72
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
73 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
74 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
75 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
76 void (*_purple_reserved4)(void);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
77 } PurpleDnsQueryUiOps;
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
78
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32297
diff changeset
79 G_BEGIN_DECLS
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
80
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
81 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
82 /** @name DNS query API */
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
83 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
84 /*@{*/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
85
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
86 /**
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
87 * Perform an asynchronous DNS query.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
88 *
32297
100ef65e9664 Replace purple_dnsquery_a_account with purple_dnsquery_a.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31738
diff changeset
89 * @param account The account that the query is being done for (or NULL)
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
90 * @param hostname The hostname to resolve.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
91 * @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
92 * @param callback The callback function to call after resolving.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
93 * @param data Extra data to pass to the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
94 *
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
95 * @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
96 * a data structure that can be used to cancel the pending
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
97 * DNS query, if needed.
31678
ad8a9a266b05 Add new DNS-related API to perform lookups in the context of an account.
Daniel Atallah <datallah@pidgin.im>
parents: 31625
diff changeset
98 *
ad8a9a266b05 Add new DNS-related API to perform lookups in the context of an account.
Daniel Atallah <datallah@pidgin.im>
parents: 31625
diff changeset
99 */
32297
100ef65e9664 Replace purple_dnsquery_a_account with purple_dnsquery_a.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31738
diff changeset
100 PurpleDnsQueryData *purple_dnsquery_a(PurpleAccount *account, const char *hostname, int port, PurpleDnsQueryConnectFunction callback, gpointer data);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
101
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
102 /**
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
103 * Cancel a DNS query and destroy the associated data structure.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
104 *
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
105 * @param query_data The DNS query to cancel. This data structure
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
106 * is freed by this function.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
107 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
108 void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
109
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
110 /**
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
111 * 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
112 * 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
113 * 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
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 * @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
116 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
117 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
118
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 /**
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 * 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
121 * 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
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 * @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
124 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
125 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
126
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 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
128 * 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
129 *
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 * @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
131 * @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
132 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
133 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
134
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
135 /**
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
136 * 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
137 *
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
138 * @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
139 * @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
140 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
141 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
142
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
143 /**
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
144 * Initializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
145 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
146 void purple_dnsquery_init(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
147
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
148 /**
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
149 * Uninitializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
150 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
151 void purple_dnsquery_uninit(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
152
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
153 /*@}*/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
154
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32297
diff changeset
155 G_END_DECLS
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
156
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
157 #endif /* _PURPLE_DNSQUERY_H_ */

mercurial