| 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 * |
19 * |
| 20 */ |
20 */ |
| 21 |
21 |
| 22 #include "pep.h" |
22 #include "pep.h" |
| |
23 #include "iq.h" |
| 23 |
24 |
| 24 void jabber_pep_init(JabberStream *js) { |
25 void jabber_pep_init(JabberStream *js) { |
| 25 |
26 |
| 26 } |
27 } |
| 27 |
28 |
| 28 void jabber_handle_event(JabberMessage *jm) { |
29 void jabber_handle_event(JabberMessage *jm) { |
| 29 /* this may be called even when the own server doesn't support pep! */ |
30 /* this may be called even when the own server doesn't support pep! */ |
| 30 |
31 |
| 31 } |
32 } |
| |
33 |
| |
34 void jabber_pep_publish(JabberStream *js, xmlnode *publish) { |
| |
35 JabberIq *iq = jabber_iq_new(js, JABBER_IQ_SET); |
| |
36 |
| |
37 xmlnode *pubsub = xmlnode_new("pubsub"); |
| |
38 xmlnode_set_namespace(pubsub, "http://jabber.org/protocol/pubsub"); |
| |
39 |
| |
40 xmlnode_insert_child(pubsub, publish); |
| |
41 |
| |
42 xmlnode_insert_child(iq->node, pubsub); |
| |
43 |
| |
44 jabber_iq_send(iq); |
| |
45 } |