Top | ![]() |
![]() |
![]() |
![]() |
gchar * | jid | Read / Write / Construct Only |
WockySession * | session | Read / Write / Construct Only |
GBoxed ╰── WockyPubsubSubscription GEnum ├── WockyPubsubServiceError ╰── WockyPubsubSubscriptionState GObject ╰── WockyPubsubService
WockyPubsubService * wocky_pubsub_service_new (WockySession *session
,const gchar *jid
);
WockyPubsubNode * wocky_pubsub_service_ensure_node (WockyPubsubService *self
,const gchar *name
);
Fetches or creates an object representing a node on the pubsub service. Note that this does not ensure that a node exists on the server; it merely ensures a local representation.
WockyPubsubNode * wocky_pubsub_service_lookup_node (WockyPubsubService *self
,const gchar *name
);
Fetches an object representing a node on a pubsub service, if the object
already exists; if not, returns NULL
. Note that this does not check whether
a node exists on the server; it only checks for a local representation.
void wocky_pubsub_service_get_default_node_configuration_async (WockyPubsubService *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
WockyDataForm * wocky_pubsub_service_get_default_node_configuration_finish (WockyPubsubService *self
,GAsyncResult *result
,GError **error
);
void wocky_pubsub_service_retrieve_subscriptions_async (WockyPubsubService *self
,WockyPubsubNode *node
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean wocky_pubsub_service_retrieve_subscriptions_finish (WockyPubsubService *self
,GAsyncResult *result
,GList **subscriptions
,GError **error
);
void wocky_pubsub_service_create_node_async (WockyPubsubService *self
,const gchar *name
,WockyDataForm *config
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
WockyPubsubNode * wocky_pubsub_service_create_node_finish (WockyPubsubService *self
,GAsyncResult *result
,GError **error
);
WockyPubsubSubscription * wocky_pubsub_subscription_new (WockyPubsubNode *node
,const gchar *jid
,WockyPubsubSubscriptionState state
,const gchar *subid
);
WockyPubsubSubscription *
wocky_pubsub_subscription_copy (WockyPubsubSubscription *sub
);
void
wocky_pubsub_subscription_free (WockyPubsubSubscription *sub
);
Describes the state of a subscription to a node. Definitions are taken from
XEP-0060 §4.2.
The node MUST NOT send event notifications or payloads to the Entity. |
||
An entity has requested to subscribe to a node and the request has not yet been approved by a node owner. The node MUST NOT send event notifications or payloads to the entity while it is in this state. |
||
An entity has subscribed but its subscription options have not yet been configured. The node MAY send event notifications or payloads to the entity while it is in this state. The service MAY timeout unconfigured subscriptions. |
||
An entity is subscribed to a node. The node MUST send all event notifications (and, if configured, payloads) to the entity while it is in this state (subject to subscriber configuration and content filtering). |
“jid”
property“jid” gchar *
The jid of the pubsub service.
Flags: Read / Write / Construct Only
Default value: NULL
“session”
property“session” WockySession *
the Wocky Session associated with this pubsub service.
Flags: Read / Write / Construct Only
“event-received”
signalvoid user_function (WockyPubsubService *service, WockyPubsubNode *node, WockyStanza *event_stanza, gpointer event_node, gpointer items_node, gpointer items, gpointer user_data)
Emitted when an event is received for a node.
service |
a pubsub service |
|
node |
the node on |
|
event_stanza |
the message/event stanza in its entirity |
|
event_node |
the event node from the stanza |
|
items_node |
the items node from the stanza |
|
items |
a list of WockyNode *s for each item child of |
|
user_data |
user data set when the signal handler was connected. |
“node-deleted”
signalvoid user_function (WockyPubsubService *node, WockyPubsubNode *stanza, WockyStanza *event_node, gpointer delete_node, gpointer arg4, gpointer user_data)
Emitted when a notification of a node's deletion is received from the server.
node |
a pubsub node |
|
stanza |
the message/event stanza in its entirety |
|
event_node |
the event node from |
|
delete_node |
the delete node from |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“subscription-state-changed”
signalvoid user_function (WockyPubsubService *service, WockyPubsubNode *node, WockyStanza *stanza, gpointer event_node, gpointer subscription_node, WockyPubsubSubscription *subscription, gpointer user_data)
service |
a pubsub service |
|
node |
a pubsub node for which the subscription state has changed |
|
stanza |
the message/event stanza in its entirety |
|
event_node |
the event node from |
|
subscription_node |
the subscription node from |
|
subscription |
subscription information parsed from |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last