libpurple/dnsquery.h

Wed, 02 Apr 2014 02:37:34 +0200

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Wed, 02 Apr 2014 02:37:34 +0200
changeset 35717
45bde03f86a6
parent 35572
5c4846317f2f
child 35682
65c1912ee2c8
child 37113
cb24b99a09ea
permissions
-rw-r--r--

Custom smileys: simplify storage implementation

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
35572
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
35 #define PURPLE_TYPE_DNSQUERY_UI_OPS (purple_dnsquery_ui_ops_get_type())
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
36
28619
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
37 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
38 * PurpleDnsQueryData:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
39 *
28619
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
40 * 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
41 * associated with the query can be retrieved using
cd1d24fe1b7d Document the opaque structure. Refs #10432.
Paul Aurich <darkrain42@pidgin.im>
parents: 21001
diff changeset
42 * 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
43 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
44 typedef struct _PurpleDnsQueryData PurpleDnsQueryData;
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
45 typedef struct _PurpleDnsQueryUiOps PurpleDnsQueryUiOps;
14245
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
46
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
47 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
48 * PurpleDnsQueryConnectFunction:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
49 *
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
50 * The "hosts" parameter is a linked list containing pairs of
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
51 * one size_t addrlen and one struct sockaddr *addr. It should
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
52 * be free'd by the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
53 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
54 typedef void (*PurpleDnsQueryConnectFunction)(GSList *hosts, gpointer data, const char *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
55
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
56 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
57 * PurpleDnsQueryResolvedCallback:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
58 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
59 * 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
60 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
61 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
62
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 * PurpleDnsQueryFailedCallback:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
65 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
66 * 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
67 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
68 typedef void (*PurpleDnsQueryFailedCallback) (PurpleDnsQueryData *query_data, const gchar *error_message);
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
69
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
70 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
71 * PurpleDnsQueryUiOps:
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
72 * @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
73 * 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
74 * implementation is used.
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
75 * @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
76 * 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
77 * @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
78 *
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
79 * 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
80 * 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
81 *
35471
a23769351b31 Remove @see
Ankit Vani <a@nevitus.org>
parents: 35460
diff changeset
82 * See <link linkend="chapter-ui-ops">List of <literal>UiOps</literal>
a23769351b31 Remove @see
Ankit Vani <a@nevitus.org>
parents: 35460
diff changeset
83 * 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
84 */
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
85 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
86 {
19481
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
87 gboolean (*resolve_host)(PurpleDnsQueryData *query_data,
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
88 PurpleDnsQueryResolvedCallback resolved_cb,
a877ea886841 Add doxygen fu to the DNS UiOps.
Will Thompson <resiak@pidgin.im>
parents: 16743
diff changeset
89 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
90
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
91 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
92
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 32787
diff changeset
93 /*< private >*/
16743
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_reserved1)(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_reserved2)(void);
1ce5ffe12e2a Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents: 15884
diff changeset
96 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
97 void (*_purple_reserved4)(void);
35460
96946e21fce5 Fix some more gtk-doc warnings till dnssrv
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
98 };
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
99
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32297
diff changeset
100 G_BEGIN_DECLS
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
101
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
102 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
103 /* DNS query API */
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
104 /**************************************************************************/
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
105
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
106 /**
35572
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
107 * purple_dnsquery_ui_ops_get_type:
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
108 *
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
109 * Returns: The #GType for the #PurpleDnsQueryUiOps boxed structure.
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
110 */
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
111 GType purple_dnsquery_ui_ops_get_type(void);
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
112
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
113 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
114 * purple_dnsquery_a:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
115 * @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
116 * @hostname: The hostname to resolve.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
117 * @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
118 * @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
119 * @data: Extra data to pass to the callback function.
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
120 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
121 * 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
122 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
123 * 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
124 * a data structure that can be used to cancel the pending
8a215625c6cb [gaim-migrate @ 16835]
Mark Doliner <markdoliner@pidgin.im>
parents: 14243
diff changeset
125 * 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
126 *
ad8a9a266b05 Add new DNS-related API to perform lookups in the context of an account.
Daniel Atallah <datallah@pidgin.im>
parents: 31625
diff changeset
127 */
32297
100ef65e9664 Replace purple_dnsquery_a_account with purple_dnsquery_a.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31738
diff changeset
128 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
129
14300
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_destroy:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
132 * @query_data: The DNS query to cancel. This data structure
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
133 * 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
134 *
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
135 * Cancel a DNS query and destroy the associated data structure.
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
136 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
137 void purple_dnsquery_destroy(PurpleDnsQueryData *query_data);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
138
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
139 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
140 * 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
141 * @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
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 * 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
144 * 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
145 * 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
146 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
147 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
148
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
150 * 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
151 *
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
152 * 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
153 * 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
154 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
155 * 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
156 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
157 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
158
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
160 * purple_dnsquery_get_host:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
161 * @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
162 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
163 * 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
164 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
165 * 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
166 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
167 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
168
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 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
170 * purple_dnsquery_get_port:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
171 * @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
172 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
173 * 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
174 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
175 * 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
176 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
177 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
178
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
179 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
180 * purple_dnsquery_init:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
181 *
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
182 * Initializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
183 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
184 void purple_dnsquery_init(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
185
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
186 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
187 * purple_dnsquery_uninit:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
188 *
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
189 * Uninitializes the DNS query subsystem.
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
190 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
191 void purple_dnsquery_uninit(void);
14300
68a0aa63f3b8 [gaim-migrate @ 16920]
Mark Doliner <markdoliner@pidgin.im>
parents: 14254
diff changeset
192
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32297
diff changeset
193 G_END_DECLS
14243
0bda01972ff2 [gaim-migrate @ 16833]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
194
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15775
diff changeset
195 #endif /* _PURPLE_DNSQUERY_H_ */

mercurial