Thu, 25 Aug 2022 22:45:58 -0500
Handle delete event in more dialogs (probably all, but can't be too sure.)
Testing Done:
Compile only.
Reviewed at https://reviews.imfreedom.org/r/1652/
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* purple |
| 8231 | 2 | * |
| 15884 | 3 | * Purple is the legal property of its developers, whose names are too numerous |
| 8231 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
| 6 | * | |
| 7 | * This program is free software; you can redistribute it and/or modify | |
| 8 | * it under the terms of the GNU General Public License as published by | |
| 9 | * the Free Software Foundation; either version 2 of the License, or | |
| 10 | * (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 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:
16035
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 8231 | 20 | */ |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
21 | |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40440
diff
changeset
|
22 | #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
|
23 | # 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
|
24 | #endif |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40440
diff
changeset
|
25 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39291
diff
changeset
|
26 | #ifndef PURPLE_NETWORK_H |
|
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39291
diff
changeset
|
27 | #define PURPLE_NETWORK_H |
|
35440
467bb21b82a1
Add section blocks for debug.h to prpl.h
Ankit Vani <a@nevitus.org>
parents:
35397
diff
changeset
|
28 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
29 | #include <glib.h> |
|
40107
6320c272e8b2
xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39738
diff
changeset
|
30 | #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
|
31 | |
|
40439
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40189
diff
changeset
|
32 | #ifndef _WIN32 |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40189
diff
changeset
|
33 | # include <netinet/in.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40189
diff
changeset
|
34 | # include <sys/socket.h> |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40189
diff
changeset
|
35 | #endif |
|
e9838d634d5e
Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents:
40189
diff
changeset
|
36 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
37 | G_BEGIN_DECLS |
| 8231 | 38 | |
| 39 | /**************************************************************************/ | |
| 35472 | 40 | /* Network API */ |
| 8231 | 41 | /**************************************************************************/ |
| 42 | ||
| 43 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
44 | * 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
|
45 | * @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
|
46 | * |
|
8834
0a798e3d2b84
[gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents:
8250
diff
changeset
|
47 | * Sets the IP address of the local system in preferences. This |
|
0a798e3d2b84
[gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents:
8250
diff
changeset
|
48 | * is the IP address that should be used for incoming connections |
|
0a798e3d2b84
[gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents:
8250
diff
changeset
|
49 | * (file transfer, direct IM, etc.) and should therefore be |
|
0a798e3d2b84
[gaim-migrate @ 9598]
Mark Doliner <markdoliner@pidgin.im>
parents:
8250
diff
changeset
|
50 | * publicly accessible. |
| 8231 | 51 | */ |
| 15884 | 52 | void purple_network_set_public_ip(const char *ip); |
| 8231 | 53 | |
| 54 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
55 | * 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
|
56 | * |
| 8231 | 57 | * Returns the IP address of the local system set in preferences. |
| 58 | * | |
| 15884 | 59 | * This returns the value set via purple_network_set_public_ip(). |
| 8231 | 60 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33894
diff
changeset
|
61 | * Returns: The local IP address set in preferences. |
| 8231 | 62 | */ |
| 15884 | 63 | const char *purple_network_get_public_ip(void); |
| 8231 | 64 | |
| 65 | /** | |
|
40663
2453bef0abe7
Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40659
diff
changeset
|
66 | * purple_network_discover_my_ip: |
| 8231 | 67 | * |
|
40663
2453bef0abe7
Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40659
diff
changeset
|
68 | * 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
|
69 | * 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
|
70 | * |
|
40663
2453bef0abe7
Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40659
diff
changeset
|
71 | * 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
|
72 | * 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
|
73 | * the local IP address depending on what's available. |
| 8231 | 74 | * |
|
40663
2453bef0abe7
Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40659
diff
changeset
|
75 | * Since: 3.0.0 |
| 8231 | 76 | */ |
|
40663
2453bef0abe7
Cleanup local IP getters
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40659
diff
changeset
|
77 | void purple_network_discover_my_ip(void); |
| 8231 | 78 | |
|
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
|
79 | /** |
|
40107
6320c272e8b2
xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39738
diff
changeset
|
80 | * 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
|
81 | * @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
|
82 | * |
|
40613
55230eededd8
Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40543
diff
changeset
|
83 | * 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
|
84 | * 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
|
85 | * |
|
40613
55230eededd8
Clean up a bunch doc issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40543
diff
changeset
|
86 | * 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
|
87 | * 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
|
88 | * 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
|
89 | * |
|
6320c272e8b2
xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39738
diff
changeset
|
90 | * Returns: The local IP address to be used. |
|
6320c272e8b2
xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39738
diff
changeset
|
91 | */ |
|
40110
bc2b94f2595a
Make purple_network_get_my_ip_from_gio return non-const.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40107
diff
changeset
|
92 | 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
|
93 | |
|
6320c272e8b2
xmpp: Convert unencrypted connections to pure GIO.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39738
diff
changeset
|
94 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
95 | * purple_network_is_available: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
96 | * |
|
24567
edd8e0bb750c
Update the docs for purple_network_is_available(). It doesn't block.
Richard Laager <rlaager@pidgin.im>
parents:
21549
diff
changeset
|
97 | * Detects if there is an available network connection. |
| 14758 | 98 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33894
diff
changeset
|
99 | * Returns: TRUE if the network is available |
| 14758 | 100 | */ |
| 15884 | 101 | gboolean purple_network_is_available(void); |
| 14758 | 102 | |
| 103 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
104 | * purple_network_force_online: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
105 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33894
diff
changeset
|
106 | * 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
|
107 | * |
|
84d597b7e7c6
Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents:
24568
diff
changeset
|
108 | * 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
|
109 | * 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
|
110 | * combined with nullprotocol. |
|
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
|
111 | */ |
|
84d597b7e7c6
Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents:
24568
diff
changeset
|
112 | 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
|
113 | |
|
84d597b7e7c6
Add a -f/--force-online option to Pidgin which tells libpurple to claim the
Richard Laager <rlaager@pidgin.im>
parents:
24568
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_set_stun_server: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
116 | * @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
|
117 | * |
|
26261
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
118 | * 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
|
119 | * Will result in a DNS query being executed asynchronous |
|
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
|
120 | */ |
|
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
|
121 | void purple_network_set_stun_server(const gchar *stun_server); |
|
29987
59b582625aaf
Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
29686
diff
changeset
|
122 | |
|
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
|
123 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
124 | * 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
|
125 | * |
|
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
|
126 | * 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
|
127 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33894
diff
changeset
|
128 | * Returns: the IP address |
|
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
|
129 | */ |
|
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
|
130 | const gchar *purple_network_get_stun_ip(void); |
|
29987
59b582625aaf
Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
29686
diff
changeset
|
131 | |
|
59b582625aaf
Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
29686
diff
changeset
|
132 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
133 | * purple_network_set_turn_server: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
134 | * @turn_server: The host name of the TURN server to set |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
135 | * |
|
26261
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
136 | * Update the TURN server IP given the host name |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
137 | * Will result in a DNS query being executed asynchronous |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
138 | */ |
|
27403
7e44bc3accd5
Fix the name of an argument.
Marcus Lundblad <malu@pidgin.im>
parents:
27332
diff
changeset
|
139 | void purple_network_set_turn_server(const gchar *turn_server); |
|
29987
59b582625aaf
Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
29686
diff
changeset
|
140 | |
|
26261
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
141 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
142 | * purple_network_get_turn_ip: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
143 | * |
|
29230
76bab3cd1668
Fix an incorrect API comment
Marcus Lundblad <malu@pidgin.im>
parents:
27980
diff
changeset
|
144 | * Get the IP address of the TURN server as a string representation |
|
26261
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
145 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
33894
diff
changeset
|
146 | * Returns: the IP address |
|
26261
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
147 | */ |
|
ffabb135a4b6
Added support to generate relayed candidates (TURN).
Marcus Lundblad <malu@pidgin.im>
parents:
26256
diff
changeset
|
148 | const gchar *purple_network_get_turn_ip(void); |
|
29987
59b582625aaf
Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
29686
diff
changeset
|
149 | |
|
27332
8240ab259385
Add a function to remove a port mapping (UPnP or NAT-PMP) given a file
Marcus Lundblad <malu@pidgin.im>
parents:
26644
diff
changeset
|
150 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
151 | * purple_network_remove_port_mapping: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
152 | * @fd: Socket to remove the port mapping for |
|
27332
8240ab259385
Add a function to remove a port mapping (UPnP or NAT-PMP) given a file
Marcus Lundblad <malu@pidgin.im>
parents:
26644
diff
changeset
|
153 | * |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
154 | * Remove a port mapping (UPnP or NAT-PMP) associated with listening socket |
|
27332
8240ab259385
Add a function to remove a port mapping (UPnP or NAT-PMP) given a file
Marcus Lundblad <malu@pidgin.im>
parents:
26644
diff
changeset
|
155 | */ |
|
29987
59b582625aaf
Strip trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
29686
diff
changeset
|
156 | void purple_network_remove_port_mapping(gint fd); |
|
27332
8240ab259385
Add a function to remove a port mapping (UPnP or NAT-PMP) given a file
Marcus Lundblad <malu@pidgin.im>
parents:
26644
diff
changeset
|
157 | |
|
16035
eb4eda79a147
The network module now registers the signal 'network-configuration-changed' and emits it when a network change is detected via libnm or the win32 network monitor. The UI could also emit this signal if it knows something network.c doesn't. UPnP and NAT-PMP respond to the signal by clearing their IP address caches; changing networks without quitting/relaunching will now lead to the new IP address being (lazily) determined. This commit also enables nat-pmp and adds nat-pmp.[h|c] to the build process; please let me know if there are any problems building, as I only have OS X test machines.
Evan Schoenberg <evands@pidgin.im>
parents:
15884
diff
changeset
|
158 | /** |
|
40543
42fd60e3fbe8
Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40489
diff
changeset
|
159 | * _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
|
160 | * @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
|
161 | * |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40440
diff
changeset
|
162 | * 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
|
163 | * |
|
40543
42fd60e3fbe8
Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40489
diff
changeset
|
164 | * Returns: %TRUE if succeeded, %FALSE otherwise. |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40440
diff
changeset
|
165 | */ |
|
40543
42fd60e3fbe8
Fix a couple GI/doc warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40489
diff
changeset
|
166 | 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
|
167 | |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40440
diff
changeset
|
168 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
169 | * purple_network_init: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35395
diff
changeset
|
170 | * |
| 8231 | 171 | * Initializes the network subsystem. |
| 172 | */ | |
| 15884 | 173 | void purple_network_init(void); |
| 8231 | 174 | |
| 14758 | 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 | 178 | * Shuts down the network subsystem. |
| 179 | */ | |
| 15884 | 180 | void purple_network_uninit(void); |
| 14758 | 181 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32604
diff
changeset
|
182 | G_END_DECLS |
| 8231 | 183 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39291
diff
changeset
|
184 | #endif /* PURPLE_NETWORK_H */ |