| Top |
WockyStanza * wocky_pubsub_make_event_stanza (const gchar *node,const gchar *from,WockyNode **item_out);
Generates a new message stanza to send to other contacts about an updated PEP node.
Note that this should only be used in link-local
connections. Regular pubsub consists of making a publish stanza
with wocky_pubsub_make_publish_stanza() and sending it to your own
server. The server will then send the event stanza on to your
contacts who have the appropriate capability.
WockyStanza * wocky_pubsub_make_stanza (const gchar *service,WockyStanzaSubType sub_type,const gchar *pubsub_ns,const gchar *action_name,WockyNode **pubsub_node,WockyNode **action_node);
service |
the JID of a PubSub service, or |
|
sub_type |
WOCKY_STANZA_SUB_TYPE_SET or WOCKY_STANZA_SUB_TYPE_GET, as you wish |
|
pubsub_ns |
the namespace for the <pubsub/> node of the stanza |
|
action_name |
the action node to add to <pubsub/> |
|
pubsub_node |
address at which to store a pointer to the <pubsub/> node |
|
action_node |
address at wihch to store a pointer to the < |
WockyStanza * wocky_pubsub_make_publish_stanza (const gchar *service,const gchar *node,WockyNode **pubsub_out,WockyNode **publish_out,WockyNode **item_out);
service |
the JID of a PubSub service, or |
|
node |
the name of a node on |
|
pubsub_out |
address at which to store a pointer to the <pubsub/> node |
|
publish_out |
address at which to store a pointer to the <publish/> node |
|
item_out |
address at which to store a pointer to the <item/> node |
void wocky_send_ll_pep_event (WockySession *session,WockyStanza *stanza);
Send a PEP event to all link-local contacts interested in receiving it.
gboolean wocky_pubsub_distill_iq_reply (GObject *source,GAsyncResult *res,const gchar *pubsub_ns,const gchar *child_name,WockyNodeTree **child_out,GError **error);
Helper function to finish a wocky_porter_send_iq_async() operation
and extract a particular pubsub child from the resulting reply, if needed.
source |
a WockyPorter instance |
|
res |
a result passed to the callback for |
|
pubsub_ns |
the namespace of the <pubsub/> node expected in this reply
(such as WOCKY_XMPP_NS_PUBSUB), or |
|
child_name |
the name of the child of <pubsub/> expected in this reply
(such as "subscriptions"); ignored if |
|
child_out |
location at which to store a reference to the node tree at
|
|
error |
location at which to store an error if the call to
|
gboolean wocky_pubsub_distill_ambivalent_iq_reply (GObject *source,GAsyncResult *res,const gchar *pubsub_ns,const gchar *child_name,WockyNodeTree **child_out,GError **error);
Helper function to finish a wocky_porter_send_iq_async() operation
and extract a particular pubsub child from the resulting reply, if it is
present. This is like wocky_pubsub_distill_iq_reply(), but is ambivalent as
to whether the <pubsub/> structure has to be included.
source |
a WockyPorter instance |
|
res |
a result passed to the callback for |
|
pubsub_ns |
the namespace of the <pubsub/> node accepted in this reply (such as WOCKY_XMPP_NS_PUBSUB) |
|
child_name |
the name of the child of <pubsub/> accepted in this reply (such as "subscriptions") |
|
child_out |
location at which to store a reference to the node tree at
|
|
error |
location at which to store an error if the call to
|
gboolean wocky_pubsub_distill_void_iq_reply (GObject *source,GAsyncResult *res,GError **error);
Helper function to finish a wocky_porter_send_iq_async() operation where no
pubsub child is expected in the resulting reply.
source |
a WockyPorter instance |
|
res |
a result passed to the callback for |
|
error |
location at which to store an error if the call to
|
gboolean wocky_pubsub_distill_stanza (WockyStanza *result,const gchar *pubsub_ns,const gchar *child_name,gboolean body_optional,WockyNodeTree **child_out,GError **error);
Helper function to extract a particular pubsub child node from a reply, if
it is present. If body_optional
is FALSE, the
<pubsub><child_name
/></pubsub> tree being absent is not
considered an error: child_out
is set to NULL and the function returns
TRUE.
If you are happy to delegate calling wocky_porter_send_iq_finish() and
extracting stanza errors, you would probably be better served by one of
wocky_pubsub_distill_iq_reply() or
wocky_pubsub_distill_ambivalent_iq_reply().
result |
an iq type='result' |
|
pubsub_ns |
the namespace of the <pubsub/> node expected in this reply (such as WOCKY_XMPP_NS_PUBSUB) |
|
child_name |
the name of the child of <pubsub/> expected in this reply (such as "subscriptions") |
|
body_optional |
If |
|
child_out |
location at which to store a reference to the node tree at
|
|
error |
location at which to store an error if the child node is not found
and |