libpurple/protocols/jabber/pep.h

Wed, 06 Jun 2007 02:07:53 +0000

author
Andreas Monitzer <am@adiumx.com>
date
Wed, 06 Jun 2007 02:07:53 +0000
branch
soc.2007.xmpp
changeset 17773
6956b763b3d1
parent 17772
918f65155a08
child 17775
1df27cab581c
permissions
-rw-r--r--

Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).

17768
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
1 /*
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
2 * purple - Jabber Protocol Plugin
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
3 *
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
4 * Copyright (C) 2007, Andreas Monitzer <andy@monitzer.com>
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
5 *
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
9 * (at your option) any later version.
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
10 *
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
14 * GNU General Public License for more details.
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
15 *
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
19 *
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
20 */
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
21
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
22 #ifndef _PURPLE_JABBER_PEP_H_
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
23 #define _PURPLE_JABBER_PEP_H_
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
24
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
25 #include "jabber.h"
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
26 #include "message.h"
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
27
17773
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
28 void jabber_pep_init(void);
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
29
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
30 /*
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
31 * Callback for receiving PEP events.
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
32 *
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
33 * @parameter js The JabberStream this item was received on
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
34 * @parameter items The &lt;items/>-tag with the &lt;item/>-children
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
35 */
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
36 typedef void (JabberPEPHandler)(JabberStream *js, xmlnode *items);
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
37
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
38 /*
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
39 * Registers a callback for PEP events. Also automatically announces this receiving capability via disco#info.
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
40 * Don't forget to use jabber_add_feature when supporting the sending of PEP events of this type.
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
41 *
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
42 * @parameter shortname A short name for this feature for XEP-0115. It has no semantic meaning, it just has to be unique.
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
43 * @parameter xmlns The namespace for this event
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
44 * @parameter handlerfunc The callback to be used when receiving an event with this namespace
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
45 */
6956b763b3d1 Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <am@adiumx.com>
parents: 17772
diff changeset
46 void jabber_pep_register_handler(const char *shortname, const char *xmlns, JabberPEPHandler handlerfunc);
17768
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
47
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
48 void jabber_handle_event(JabberMessage *jm);
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
49
17772
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
50 /*
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
51 * Publishes PEP item(s)
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
52 *
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
53 * @parameter js The JabberStream associated with the connection this event should be published
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
54 * @parameter publish The publish node. This could be for example &lt;publish node='http://jabber.org/protocol/tune'/> with an &lt;item/> as subnode
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
55 */
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
56 void jabber_pep_publish(JabberStream *js, xmlnode *publish);
918f65155a08 Implemented publishing events
Andreas Monitzer <am@adiumx.com>
parents: 17768
diff changeset
57
17768
7be011945a1b added preliminary frame for pep-support
Andreas Monitzer <am@adiumx.com>
parents:
diff changeset
58 #endif /* _PURPLE_JABBER_PEP_H_ */

mercurial