libpurple/network.h

Thu, 07 Aug 2025 21:32:18 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 07 Aug 2025 21:32:18 -0500
changeset 43300
0604c6839974
parent 43010
9a3485b096c8
permissions
-rw-r--r--

Clean up and modernize PurpleImage

Testing Done:
Ran the tests under valgrind and called in the turtles.

Reviewed at https://reviews.imfreedom.org/r/4074/

42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
1 /*
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
2 * Purple - Internet Messaging Library
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
7 * source distribution.
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
12 * any later version.
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
17 * more details.
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
18 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42418
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
21 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
22
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
24 # error "only <purple.h> may be included directly"
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
25 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
26
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39291
diff changeset
27 #ifndef PURPLE_NETWORK_H
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39291
diff changeset
28 #define PURPLE_NETWORK_H
35440
467bb21b82a1 Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents: 35397
diff changeset
29
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
30 #include <glib.h>
40107
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
31 #include <gio/gio.h>
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
32
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42278
diff changeset
33 #include "purpleversion.h"
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42278
diff changeset
34
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
35 G_BEGIN_DECLS
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
36
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
37 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35440
diff changeset
38 /* Network API */
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
39 /**************************************************************************/
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
40
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
41 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
42 * purple_network_set_public_ip:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
43 * @ip: The local IP address.
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
44 *
8834
0a798e3d2b84 [gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents: 8250
diff changeset
45 * Sets the IP address of the local system in preferences. This
0a798e3d2b84 [gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents: 8250
diff changeset
46 * is the IP address that should be used for incoming connections
0a798e3d2b84 [gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents: 8250
diff changeset
47 * (file transfer, direct IM, etc.) and should therefore be
0a798e3d2b84 [gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents: 8250
diff changeset
48 * publicly accessible.
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
49 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
50 * Since: 2.0
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
51 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
52 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
53 void purple_network_set_public_ip(const char *ip);
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
54
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
55 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
56 * purple_network_get_public_ip:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
57 *
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
58 * Returns the IP address of the local system set in preferences.
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
59 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
60 * This returns the value set via purple_network_set_public_ip().
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
61 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 33894
diff changeset
62 * Returns: The local IP address set in preferences.
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
63 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
64 * Since: 2.0
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
65 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
66 PURPLE_AVAILABLE_IN_ALL
43010
9a3485b096c8 Port network settings to GSettings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42612
diff changeset
67 char *purple_network_get_public_ip(void);
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
68
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
69 /**
40663
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
70 * purple_network_discover_my_ip:
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
71 *
40663
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
72 * Discovers the IP address that should be used anywhere a public IP addresses
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
73 * is needed (listening for an incoming file transfer, etc).
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
74 *
40663
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
75 * If the user has manually specified an IP address via preferences, then this
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
76 * is used. Otherwise STUN, UPnP, and NAT-PMP will be attempted to discover
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
77 * the local IP address depending on what's available.
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
78 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
79 * Since: 3.0
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
80 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42278
diff changeset
81 PURPLE_AVAILABLE_IN_3_0
40663
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
82 void purple_network_discover_my_ip(void);
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
83
21549
7436059db33b Don't map the port used for bonjour file transfers externally. This adds a new function that will go away in 3.0.0 when we can modify purple_network_do_listen to take an additional parameter.
Daniel Atallah <datallah@pidgin.im>
parents: 20147
diff changeset
84 /**
40107
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
85 * purple_network_get_my_ip_from_gio:
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
86 * @sockconn: The socket connection to use to help figure out the IP, or %NULL.
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
87 *
40613
55230eededd8 Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents: 40543
diff changeset
88 * Returns the IP address that should be used anywhere a public IP address is
55230eededd8 Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents: 40543
diff changeset
89 * needed (listening for an incoming file transfer, etc).
40107
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
90 *
40613
55230eededd8 Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents: 40543
diff changeset
91 * If the user has manually specified an IP address via preferences, then this
40663
2453bef0abe7 Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40659
diff changeset
92 * IP is returned. Otherwise STUN, UPnP, NAT-PMP, and finally GIO will be
40613
55230eededd8 Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents: 40543
diff changeset
93 * attempted to discover the local IP address depending on what's available.
40107
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
94 *
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
95 * Returns: The local IP address to be used.
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
96 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
97 * Since: 3.0
40107
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
98 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
99 PURPLE_AVAILABLE_IN_3_0
40110
bc2b94f2595a Make purple_network_get_my_ip_from_gio return non-const.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40107
diff changeset
100 gchar *purple_network_get_my_ip_from_gio(GSocketConnection *sockconn);
40107
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
101
6320c272e8b2 xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39738
diff changeset
102 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
103 * purple_network_is_available:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
104 *
24567
edd8e0bb750c Update the docs for purple_network_is_available(). It doesn't block.
Richard Laager <rlaager@pidgin.im>
parents: 21549
diff changeset
105 * Detects if there is an available network connection.
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
106 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 33894
diff changeset
107 * Returns: TRUE if the network is available
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
108 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
109 * Since: 2.0
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
110 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
111 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
112 gboolean purple_network_is_available(void);
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
113
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
114 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
115 * purple_network_force_online:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
116 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 33894
diff changeset
117 * Makes purple_network_is_available() always return %TRUE.
24999
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
118 *
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
119 * This is what backs the --force-online command line argument in Pidgin,
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
120 * for example. This is useful for offline testing, especially when
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 33894
diff changeset
121 * combined with nullprotocol.
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
122 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
123 * Since: 2.6
24999
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
124 */
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
125 PURPLE_AVAILABLE_IN_2_6
24999
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
126 void purple_network_force_online(void);
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
127
84d597b7e7c6 Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents: 24568
diff changeset
128 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
129 * purple_network_set_stun_server:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
130 * @stun_server: The host name of the STUN server to set
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
131 *
26261
ffabb135a4b6 Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents: 26256
diff changeset
132 * Update the STUN server IP given the host name
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
133 * Will result in a DNS query being executed asynchronous
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
134 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
135 * Since: 2.6
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
136 */
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
137 PURPLE_AVAILABLE_IN_2_6
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
138 void purple_network_set_stun_server(const gchar *stun_server);
29987
59b582625aaf Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 29686
diff changeset
139
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
140 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
141 * purple_network_get_stun_ip:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
142 *
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
143 * Get the IP address of the STUN server as a string representation
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
144 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 33894
diff changeset
145 * Returns: the IP address
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
146 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
147 * Since: 2.6
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
148 */
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
149 PURPLE_AVAILABLE_IN_2_6
26256
d2673c935184 Run an asynchronous DNS lookup for the STUN server IP (to set as a property
Marcus Lundblad <malu@pidgin.im>
parents: 24568
diff changeset
150 const gchar *purple_network_get_stun_ip(void);
29987
59b582625aaf Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 29686
diff changeset
151
59b582625aaf Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents: 29686
diff changeset
152 /**
40543
42fd60e3fbe8 Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40489
diff changeset
153 * _purple_network_set_common_socket_flags:
42fd60e3fbe8 Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40489
diff changeset
154 * @fd: The file descriptor for the socket.
42fd60e3fbe8 Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40489
diff changeset
155 *
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
156 * Sets most commonly used socket flags: O_NONBLOCK and FD_CLOEXEC.
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
157 *
40543
42fd60e3fbe8 Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40489
diff changeset
158 * Returns: %TRUE if succeeded, %FALSE otherwise.
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
159 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
160 * Since: 3.0
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
161 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
162 PURPLE_AVAILABLE_IN_3_0
40543
42fd60e3fbe8 Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40489
diff changeset
163 gboolean _purple_network_set_common_socket_flags(int fd);
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
164
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40440
diff changeset
165 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
166 * purple_network_init:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
167 *
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
168 * Initializes the network subsystem.
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
169 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
170 * Since: 2.0
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
171 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
172 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
173 void purple_network_init(void);
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
174
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
175 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
176 * purple_network_uninit:
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
177 *
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
178 * Shuts down the network subsystem.
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
179 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
180 * Since: 2.0
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
181 */
42418
71b391dda389 Add Since and visibility tags to network API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
182 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
183 void purple_network_uninit(void);
14758
13b9adc9efd2 [gaim-migrate @ 17448]
Sean Egan <seanegan@pidgin.im>
parents: 14329
diff changeset
184
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32604
diff changeset
185 G_END_DECLS
8231
347c8992c445 [gaim-migrate @ 8954]
Tim Ringenbach <marv@pidgin.im>
parents:
diff changeset
186
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39291
diff changeset
187 #endif /* PURPLE_NETWORK_H */

mercurial