libpurple/dnsquery.h

Thu, 13 Feb 2014 20:11:13 +0100

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Thu, 13 Feb 2014 20:11:13 +0100
changeset 35559
061c2ae3679c
parent 35487
494f09f7f331
child 35572
5c4846317f2f
child 37094
84873ce721dc
permissions
-rw-r--r--

Fix the build again

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19974
diff changeset
1 /* purple
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
2 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
3 * 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
4 * to list here. Please refer to the COPYRIGHT file distributed with this
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
5 * source distribution.
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
6 *
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
8 * 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
9 * the Free Software Foundation; either version 2 of the License, or
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
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 distributed in the hope that it will be useful,
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
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 * You should have received a copy of the GNU General Public License
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
18 * 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
19 * 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
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
21
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
22 #ifndef _PURPLE_DNSQUERY_H_
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
23 #define _PURPLE_DNSQUERY_H_
35440
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
24 /**
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
25 * SECTION:dnsquery
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
26 * @section_id: libpurple-dnsquery
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
27 * @short_description: <filename>dnsquery.h</filename>
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
28 * @title: DNS Query API
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
29 */
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
30
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
31 #include <glib.h>
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
32 #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
33 #include "account.h"
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
34
28619
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
35 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
36 * PurpleDnsQueryData:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
37 *
28619
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
38 * 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
39 * associated with the query can be retrieved using
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
40 * 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
41 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
42 typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
43 typedef struct _PurpleDnsQueryUiOps PurpleDnsQueryUiOps;
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
44
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
45 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
46 * PurpleDnsQueryConnectFunction:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
47 *
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
48 * The "hosts" parameter is a linked list containing pairs of
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
49 * one size_t addrlen and one struct sockaddr *addr. It should
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
50 * be free'd by the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
51 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
52 typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
53
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
54 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
55 * PurpleDnsQueryResolvedCallback:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
56 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
57 * DNS query resolved callback used by the UI if it handles resolving DNS
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 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
59 typedef void (*PurpleDnsQueryResolvedCallback) (PurpleDnsQueryData *query_data, GSList *hosts);
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
60
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
61 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
62 * PurpleDnsQueryFailedCallback:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
63 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
64 * DNS query failed callback used by the UI if it handles resolving DNS
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
65 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
66 typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
67
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
68 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
69 * PurpleDnsQueryUiOps:
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
70 * @resolve_host: If implemented, return %TRUE if the UI takes responsibility
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
71 * for DNS queries. When returning %FALSE, the standard
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
72 * implementation is used.
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
73 * @destroy: Called just before @query_data is freed; this should cancel
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
74 * any further use of @query_data the UI would make. Unneeded if
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
75 * @resolve_host is not implemented.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
76 *
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
77 * 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
78 * 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
79 *
35471
a23769351b31 Remove @see
Ankit Vani <a@nevitus.org>
parents: 35460
diff changeset
80 * See <link linkend="chapter-ui-ops">List of <literal>UiOps</literal>
a23769351b31 Remove @see
Ankit Vani <a@nevitus.org>
parents: 35460
diff changeset
81 * Structures</link>
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
82 */
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
83 struct _PurpleDnsQueryUiOps
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
84 {
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
85 gboolean (*resolve_host)(PurpleDnsQueryData *query_data,
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
86 PurpleDnsQueryResolvedCallback resolved_cb,
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
87 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
88
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
89 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
90
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
91 /*< private >*/
16743
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
92 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
93 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
94 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
95 void (*_purple_reserved4)(void);
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
96 };
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
97
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32297
diff changeset
98 G_BEGIN_DECLS
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
99
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
100 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
101 /* DNS query API */
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
102 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
103
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
104 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
105 * purple_dnsquery_a:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
106 * @account: The account that the query is being done for (or NULL)
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
107 * @hostname: The hostname to resolve.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
108 * @port: A port number which is stored in the struct sockaddr.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
109 * @callback: The callback function to call after resolving.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
110 * @data: Extra data to pass to the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
111 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
112 * Perform an asynchronous DNS query.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
113 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
114 * Returns: NULL if there was an error, otherwise return a reference to
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
115 * a data structure that can be used to cancel the pending
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
116 * 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
117 *
ad8a9a266b05 Add new DNS-related API to perform lookups in the context of an account.
Daniel Atallah <datallah@pidgin.im>
parents: 31625
diff changeset
118 */
32297
100ef65e9664 Replace purple_dnsquery_a_account with purple_dnsquery_a.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31738
diff changeset
119 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
120
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
121 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
122 * purple_dnsquery_destroy:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
123 * @query_data: The DNS query to cancel. This data structure
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
124 * is freed by this function.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
125 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
126 * Cancel a DNS query and destroy the associated data structure.
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
127 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
128 void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
129
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
130 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
131 * purple_dnsquery_set_ui_ops:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
132 * @ops: The UI operations structure.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
133 *
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 * 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
135 * 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
136 * 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
137 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
138 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
139
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
141 * purple_dnsquery_get_ui_ops:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
142 *
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
143 * 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
144 * 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
145 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
146 * Returns: The UI operations structure.
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
147 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
148 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
149
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
150 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
151 * purple_dnsquery_get_host:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
152 * @query_data: The DNS query
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
153 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
154 * 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
155 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
156 * Returns: The host.
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
157 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
158 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
159
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
160 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
161 * purple_dnsquery_get_port:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
162 * @query_data: The DNS query
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
163 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
164 * 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
165 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
166 * Returns: The port.
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
167 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
168 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
169
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
170 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
171 * purple_dnsquery_init:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
172 *
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
173 * Initializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
174 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
175 void purple_dnsquery_init(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
176
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
177 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
178 * purple_dnsquery_uninit:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
179 *
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
180 * Uninitializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
181 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
182 void purple_dnsquery_uninit(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
183
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32297
diff changeset
184 G_END_DECLS
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
185
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
186 #endif /* _PURPLE_DNSQUERY_H_ */

mercurial