|  |  |  | Wocky Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct WockyPubsubAffiliation; enum WockyPubsubAffiliationState; struct WockyPubsubNodeClass; WockyPubsubAffiliation * wocky_pubsub_affiliation_copy (WockyPubsubAffiliation *aff); void wocky_pubsub_affiliation_free (WockyPubsubAffiliation *aff); GList * wocky_pubsub_affiliation_list_copy (GList *affs); void wocky_pubsub_affiliation_list_free (GList *affs); WockyPubsubAffiliation * wocky_pubsub_affiliation_new (WockyPubsubNode *node,const gchar *jid,WockyPubsubAffiliationState state); void wocky_pubsub_node_delete_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean wocky_pubsub_node_delete_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error); void wocky_pubsub_node_get_configuration_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); WockyDataForm * wocky_pubsub_node_get_configuration_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error); const gchar * wocky_pubsub_node_get_name (WockyPubsubNode *self); void wocky_pubsub_node_list_affiliates_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean wocky_pubsub_node_list_affiliates_finish (WockyPubsubNode *self,GAsyncResult *result,GList **affiliates,GError **error); void wocky_pubsub_node_list_subscribers_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean wocky_pubsub_node_list_subscribers_finish (WockyPubsubNode *self,GAsyncResult *result,GList **subscribers,GError **error); WockyStanza * wocky_pubsub_node_make_publish_stanza (WockyPubsubNode *self,WockyNode **pubsub_out,WockyNode **publish_out,WockyNode **item_out); void wocky_pubsub_node_modify_affiliates_async (WockyPubsubNode *self,const GList *affiliates,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean wocky_pubsub_node_modify_affiliates_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error); void wocky_pubsub_node_subscribe_async (WockyPubsubNode *self,const gchar *jid,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); WockyPubsubSubscription * wocky_pubsub_node_subscribe_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error); void wocky_pubsub_node_unsubscribe_async (WockyPubsubNode *self,const gchar *jid,const gchar *subid,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean wocky_pubsub_node_unsubscribe_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error);
struct WockyPubsubAffiliation {
    WockyPubsubNode *node;
    gchar *jid;
    WockyPubsubAffiliationState state;
};
Represents an affiliation to a node, as returned by
wocky_pubsub_node_list_affiliates_finish().
| WockyPubsubNode * | the node to which this affiliation relates | 
| gchar * | the bare JID affiliated to node | 
| WockyPubsubAffiliationState  | the state of jid's affiliation tonode | 
typedef enum {
    WOCKY_PUBSUB_AFFILIATION_OWNER,
    WOCKY_PUBSUB_AFFILIATION_PUBLISHER,
    WOCKY_PUBSUB_AFFILIATION_PUBLISH_ONLY,
    WOCKY_PUBSUB_AFFILIATION_MEMBER,
    WOCKY_PUBSUB_AFFILIATION_NONE,
    WOCKY_PUBSUB_AFFILIATION_OUTCAST
} WockyPubsubAffiliationState;
Possible affiliations to a PubSub node, which determine privileges an entity has. See XEP-0060 §4.1 for the details.
WockyPubsubAffiliation * wocky_pubsub_affiliation_copy  (WockyPubsubAffiliation *aff);
| 
 | an existing affiliation structure | 
| Returns : | a duplicate of aff; the duplicate should ultimately be freed
withwocky_pubsub_affiliation_free() | 
void                wocky_pubsub_affiliation_free       (WockyPubsubAffiliation *aff);
Frees an affiliation, previously allocated with
wocky_pubsub_affiliation_new() or wocky_pubsub_affiliation_copy()
| 
 | an affiliation | 
GList *             wocky_pubsub_affiliation_list_copy  (GList *affs);
Shorthand for manually copying affs, duplicating each element with
wocky_pubsub_affiliation_copy().
| 
 | a list of WockyPubsubAffiliation | 
| Returns : | a deep copy of affs, which should ultimately be freed withwocky_pubsub_affiliation_list_free(). | 
void                wocky_pubsub_affiliation_list_free  (GList *affs);
Frees a list of WockyPubsubAffiliation structures, as shorthand for calling
wocky_pubsub_affiliation_free() for each element, followed by g_list_free().
| 
 | a list of WockyPubsubAffiliation | 
WockyPubsubAffiliation * wocky_pubsub_affiliation_new (WockyPubsubNode *node,const gchar *jid,WockyPubsubAffiliationState state);
| 
 | a node | 
| 
 | the JID affiliated to node | 
| 
 | the state of jid's affiliation tonode | 
| Returns : | a new structure representing an affiliation, which should
ultimately be freed with wocky_pubsub_affiliation_free() | 
void wocky_pubsub_node_delete_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
gboolean wocky_pubsub_node_delete_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error);
void wocky_pubsub_node_get_configuration_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Retrieves the current configuration for a node owned by the user.
| 
 | a node | 
| 
 | optional GCancellable object, NULLto ignore | 
| 
 | a callback to call when the request is completed | 
| 
 | data to pass to callback | 
WockyDataForm * wocky_pubsub_node_get_configuration_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error);
Complete a call to wocky_pubsub_node_get_configuration_async().
| 
 | a node | 
| 
 | the result | 
| 
 | location at which to store an error, if one occurred. | 
| Returns : | a form representing the node configuration on success; NULLand
setserrorotherwise | 
void wocky_pubsub_node_list_affiliates_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Retrieves the list of entities affilied to a node you own. callback may
complete the call using wocky_pubsub_node_list_affiliates_finish().
(A note on naming: this is §8.9.1 — Retrieve Affiliations List — in XEP-0060, not to be confused with §5.7 — Retrieve Affiliations. The slightly different terminology in Wocky is intended to help disambiguate!)
| 
 | a pubsub node | 
| 
 | optional GCancellable object | 
| 
 | function to call when the affiliates have been retrieved or an error has occured | 
| 
 | data to pass to callback. | 
gboolean wocky_pubsub_node_list_affiliates_finish (WockyPubsubNode *self,GAsyncResult *result,GList **affiliates,GError **error);
Completes a call to wocky_pubsub_node_list_affiliates_async(). The list
returned in affiliates should be freed with
wocky_pubsub_affiliation_list_free() when it is no longer needed.
| 
 | a pubsub node | 
| 
 | the result passed to a callback | 
| 
 | location at which to store a list of WockyPubsubAffiliation
pointers, or NULL | 
| 
 | location at which to store an error, or NULL | 
| Returns : | TRUEif the list of subscribers was successfully retrieved;FALSEand setserrorif an error occured. | 
void wocky_pubsub_node_list_subscribers_async (WockyPubsubNode *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Retrieves the list of subscriptions to a node you own. callback may
complete the call using wocky_pubsub_node_list_subscribers_finish().
(A note on naming: this is §8.8.1 — Retrieve Subscriptions List — in XEP-0060, not to be confused with §5.6 — Retrieve Subscriptions. The different terminology in Wocky is intended to help disambiguate!)
| 
 | a pubsub node | 
| 
 | optional GCancellable object | 
| 
 | function to call when the subscribers have been retrieved or an error has occured | 
| 
 | data to pass to callback. | 
gboolean wocky_pubsub_node_list_subscribers_finish (WockyPubsubNode *self,GAsyncResult *result,GList **subscribers,GError **error);
Completes a call to wocky_pubsub_node_list_subscribers_async(). The list
returned in subscribers should be freed with
wocky_pubsub_subscription_list_free() when it is no longer needed.
| 
 | a pubsub node | 
| 
 | the result passed to a callback | 
| 
 | location at which to store a list of WockyPubsubSubscription
pointers, or NULL | 
| 
 | location at which to store an error, or NULL | 
| Returns : | TRUEif the list of subscribers was successfully retrieved;FALSEand setserrorif an error occured. | 
WockyStanza * wocky_pubsub_node_make_publish_stanza (WockyPubsubNode *self,WockyNode **pubsub_out,WockyNode **publish_out,WockyNode **item_out);
void wocky_pubsub_node_modify_affiliates_async (WockyPubsubNode *self,const GList *affiliates,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Modifies the entities affiliated to a node that you own.
| 
 | a pubsub node | 
| 
 | a list of WockyPubsubAffiliation structures, describing only the affiliations which should be changed. | 
| 
 | optional GCancellable object, NULLto ignore | 
| 
 | a callback to call when the request is completed | 
| 
 | data to pass to callback | 
gboolean wocky_pubsub_node_modify_affiliates_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error);
Complete a call to wocky_pubsub_node_modify_affiliates_async().
void wocky_pubsub_node_subscribe_async (WockyPubsubNode *self,const gchar *jid,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Attempts to subscribe to self.
WockyPubsubSubscription * wocky_pubsub_node_subscribe_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error);
void wocky_pubsub_node_unsubscribe_async (WockyPubsubNode *self,const gchar *jid,const gchar *subid,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Attempts to unsubscribe from self.
| 
 | a pubsub node | 
| 
 | the JID subscribed to self(usually the connection's bare or
full JID); may not beNULL | 
| 
 | the identifier associated with the subscription | 
| 
 | optional GCancellable object, NULLto ignore | 
| 
 | a callback to call when the request is completed | 
| 
 | data to pass to callback | 
gboolean wocky_pubsub_node_unsubscribe_finish (WockyPubsubNode *self,GAsyncResult *result,GError **error);