annotate libpurple/protocols/jabber/xdata.h @ 32162:accce7b79737

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 26 Jun 2011 02:27:01 +0900
parents 7fb775b4465b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file xdata.h utility functions
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
4 * purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
28398
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26563
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26563
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26563
diff changeset
8 * source distribution.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 15823
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 */
26563
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 19696
diff changeset
24 #ifndef PURPLE_JABBER_XDATA_H_
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 19696
diff changeset
25 #define PURPLE_JABBER_XDATA_H_
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 #include "jabber.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 #include "xmlnode.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
17598
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
30 typedef struct _JabberXDataAction {
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
31 char *name;
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
32 char *handle;
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
33 } JabberXDataAction;
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
34
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 typedef void (*jabber_x_data_cb)(JabberStream *js, xmlnode *result, gpointer user_data);
17598
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
36 typedef void (*jabber_x_data_action_cb)(JabberStream *js, xmlnode *result, const char *actionhandle, gpointer user_data);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 void *jabber_x_data_request(JabberStream *js, xmlnode *packet, jabber_x_data_cb cb, gpointer user_data);
17598
43df07968000 Implemented XEP-0050: Ad-Hoc Commands. Note that this XEP requires sending an initial command to the peer, which is not implemented in libpurple itself (since this requires a discovery browser or equivalent).
Andreas Monitzer <pidgin@monitzer.com>
parents: 15823
diff changeset
38 void *jabber_x_data_request_with_actions(JabberStream *js, xmlnode *packet, GList *actions, int defaultaction, jabber_x_data_action_cb cb, gpointer user_data);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39
30687
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
40 /*
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
41 * Return the form type (the CDATA of the value child of the FORM_TYPE
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
42 * field entry.
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
43 * E.g., for the following, "http://jabber.org/protocol/muc#roominfo".
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
44 * <x xmlns='jabber:x:data' type='result'>
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
45 * <field var='FORM_TYPE' type='hidden'>
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
46 * <value>http://jabber.org/protocol/muc#roominfo</value>
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
47 * </field>
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
48 * </x>
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
49 *
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
50 * @param form The xmlnode for the form (the 'x' element)
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
51 * @returns The FORM_TYPE. Must be freed by caller.
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
52 */
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
53 gchar *jabber_x_data_get_formtype(const xmlnode *form);
7fb775b4465b jabber: Move (and harden) a function to xdata.c
Paul Aurich <paul@darkrain42.org>
parents: 28398
diff changeset
54
26563
5767b7698c73 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <paul@darkrain42.org>
parents: 19696
diff changeset
55 #endif /* PURPLE_JABBER_XDATA_H_ */