annotate libpurple/protocols/jabber/ping.h @ 27108:38c4973b5222

Add a function to remove a port mapping (UPnP or NAT-PMP) given a file descriptor. Adapt the XMPP PRPL to use this to remove port mappings when a file transfer is done. There is still no support for removing left-over mappings at exit, since I've found no good way of calling purple_upnp_remove_port_mapping (which relies on callbacks) from purple_network_uninit (since the main thread terminates after the _uninit functions have finished)...
author Marcus Lundblad <ml@update.uu.se>
date Mon, 15 Jun 2009 21:43:25 +0000
parents 6b0e150f2276
children 8c991e09efcb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17835
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
1 /**
26855
40de88e41162 Fixed some erronious @file headers
Marcus Lundblad <ml@update.uu.se>
parents: 26481
diff changeset
2 * @file ping.h ping functions
17835
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
3 *
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
4 * purple
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
5 *
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
6 * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com>
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
7 *
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
11 * (at your option) any later version.
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
12 *
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
16 * GNU General Public License for more details.
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
17 *
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
21 */
26481
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 25648
diff changeset
22 #ifndef PURPLE_JABBER_PING_H_
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 25648
diff changeset
23 #define PURPLE_JABBER_PING_H_
17835
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
24
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
25 #include "jabber.h"
25648
050052891c55 Pass IQ handlers type, from, id, and the child node
Paul Aurich <paul@darkrain42.org>
parents: 25645
diff changeset
26 #include "iq.h"
25640
42dd7e591031 Make the XMPP keepalive use jabber_ping_jid instead of building it itself.
Paul Aurich <paul@darkrain42.org>
parents: 17835
diff changeset
27 #include "xmlnode.h"
17835
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
28
25648
050052891c55 Pass IQ handlers type, from, id, and the child node
Paul Aurich <paul@darkrain42.org>
parents: 25645
diff changeset
29 void jabber_ping_parse(JabberStream *js, const char *from,
050052891c55 Pass IQ handlers type, from, id, and the child node
Paul Aurich <paul@darkrain42.org>
parents: 25645
diff changeset
30 JabberIqType, const char *id, xmlnode *child);
25640
42dd7e591031 Make the XMPP keepalive use jabber_ping_jid instead of building it itself.
Paul Aurich <paul@darkrain42.org>
parents: 17835
diff changeset
31 gboolean jabber_ping_jid(JabberStream *js, const char *jid);
26917
6b0e150f2276 Stop trying to be clever with XMPP keepalive pings.
Paul Aurich <paul@darkrain42.org>
parents: 26855
diff changeset
32 void jabber_keepalive_ping(JabberStream *js);
17835
6ab1089e2101 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <pidgin@monitzer.com>
parents:
diff changeset
33
26481
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 25648
diff changeset
34 #endif /* PURPLE_JABBER_PING_H_ */