1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*
* wocky-pubsub-node-internal.h - protected methods on WockyPubsubNode
* Copyright © 2010 Collabora Ltd.
* Copyright © 2010 Nokia Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef WOCKY_PUBSUB_NODE_PROTECTED_H
#define WOCKY_PUBSUB_NODE_PROTECTED_H
#include "wocky-pubsub-node.h"
/* for use by WockyPubsubService */
typedef void (*WockyPubsubNodeEventHandler) (
WockyPubsubNode *self,
WockyStanza *event_stanza,
WockyNode *event_node,
WockyNode *action_node);
typedef struct {
const gchar *action;
WockyPubsubNodeEventHandler method;
} WockyPubsubNodeEventMapping;
const WockyPubsubNodeEventMapping *_wocky_pubsub_node_get_event_mappings (
guint *n_mappings);
/* for use by subclasses */
WockyPorter *wocky_pubsub_node_get_porter (WockyPubsubNode *self);
WockyStanza *wocky_pubsub_node_make_subscribe_stanza (WockyPubsubNode *self,
const gchar *jid,
WockyNode **pubsub_node,
WockyNode **subscribe_node);
WockyStanza *wocky_pubsub_node_make_unsubscribe_stanza (
WockyPubsubNode *self,
const gchar *jid,
const gchar *subid,
WockyNode **pubsub_node,
WockyNode **unsubscribe_node);
WockyStanza *wocky_pubsub_node_make_delete_stanza (
WockyPubsubNode *self,
WockyNode **pubsub_node,
WockyNode **delete_node);
WockyStanza *wocky_pubsub_node_make_list_subscribers_stanza (
WockyPubsubNode *self,
WockyNode **pubsub_node,
WockyNode **subscriptions_node);
WockyStanza *wocky_pubsub_node_make_list_affiliates_stanza (
WockyPubsubNode *self,
WockyNode **pubsub_node,
WockyNode **affiliations_node);
GList *wocky_pubsub_node_parse_affiliations (
WockyPubsubNode *self,
WockyNode *affiliations_node);
WockyStanza *wocky_pubsub_node_make_modify_affiliates_stanza (
WockyPubsubNode *self,
const GList *affiliates,
WockyNode **pubsub_node,
WockyNode **affiliations_node);
WockyStanza *wocky_pubsub_node_make_get_configuration_stanza (
WockyPubsubNode *self,
WockyNode **pubsub_node,
WockyNode **configure_node);
#endif /* WOCKY_PUBSUB_NODE_PROTECTED_H */
|