libpurple/protocols/jabber/ping.h

Tue, 03 Feb 2009 17:10:05 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Tue, 03 Feb 2009 17:10:05 +0000
branch
cpw.darkrain42.xmpp.iq-handlers
changeset 25554
53e161fc0658
parent 17769
69d98a4da006
child 25555
dd0cb987435f
child 25565
56a46adbfa53
permissions
-rw-r--r--

Jabber IQ handlers should handle non-query child nodes

Historically, all IQ stanzas had a query child; this is no longer the case
(XMPP Ping, Entity Time, etc). Instead, have the handlers use the first
child of the IQ stanza.

Also reduce some of the duplication in XMPP ping code (just use the one in
ping.c)

17769
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
1 /**
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
2 * @file ping.h utility functions
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
3 *
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
4 * purple
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
5 *
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
6 * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com>
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
7 *
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
11 * (at your option) any later version.
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
12 *
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
16 * GNU General Public License for more details.
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
17 *
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
21 */
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
22 #ifndef _PURPLE_JABBER_PING_H_
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
23 #define _PURPLE_JABBER_PING_H_
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
24
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
25 #include "jabber.h"
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
26 #include "conversation.h"
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
27
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
28 void jabber_ping_parse(JabberStream *js,
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
29 xmlnode *packet);
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
30
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
31
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
32 gboolean jabber_ping_jid(PurpleConversation *conv, const char *jid);
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
33
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
34
69d98a4da006 applied patch for supporting XEP-0199: XMPP Ping
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
35 #endif /* _PURPLE_JABBER_PING_H_ */

mercurial