Bug 27414

Summary: pubsub: subscription change and node deletion notifications, retrieving subscribers and affiliates of a node
Product: Wocky Reporter: Will Thompson <will>
Component: GeneralAssignee: Will Thompson <will>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=shortlog;h=refs/heads/pubsub-docs
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2010-04-01 07:33:36 UTC
The attached branch adds signals for subscription state changes and node deletion notifications. It also adds API for node owners to retrieve the list of subscribers to a node, and the list of affiliates of a node.
Comment 1 Simon McVittie 2010-04-06 08:26:09 UTC
> -static void
> -send_pubsub_event (WockyPorter *porter,
> +static void send_pubsub_event (WockyPorter *porter,
>      const gchar *service,
>      const gchar *node)
>  {

Please revert.

> -  priv->trampolines = g_ptr_array_sized_new (G_N_ELEMENTS (trampolines));
> +  priv->trampolines = g_ptr_array_sized_new (3);

This magic number makes me a little sad. Counting the mappings, then appending them to the array in a second loop, is probably overkill though... perhaps just use g_p_a_new()?

> + * @pubsub_ns: the namespace for the <pubsub/> node of the stanza

gtkdoc comments are XML, so, &lt;pubsub/&gt;. Sorry.

> +WockyXmppStanza *wocky_pubsub_make_stanza (
> +void wocky_pubsub_node_list_subscribers_async (
> +gboolean wocky_pubsub_node_list_subscribers_finish (
> +GList *wocky_list_deep_copy (GBoxedCopyFunc copy, const GList *items);

Please add new API to sections.txt (after merging this).

> Squash into wocky_pubsub_node_list_subscribers_async

Um. (I won't insist that you actually do so, though.)
Comment 2 Will Thompson 2010-04-06 09:48:28 UTC
(In reply to comment #1)
> > -static void
> > -send_pubsub_event (WockyPorter *porter,
> > +static void send_pubsub_event (WockyPorter *porter,
> >      const gchar *service,
> >      const gchar *node)
> >  {
> 
> Please revert.

Done and squashed into the relevant commit (which is now dd7d70d).

> > -  priv->trampolines = g_ptr_array_sized_new (G_N_ELEMENTS (trampolines));
> > +  priv->trampolines = g_ptr_array_sized_new (3);
> 
> This magic number makes me a little sad. Counting the mappings, then appending
> them to the array in a second loop, is probably overkill though... perhaps just
> use g_p_a_new()?

I made _wocky_pubsub_node_get_event_mappings also yield the array size. Excessive ricing detected? :)

> > + * @pubsub_ns: the namespace for the <pubsub/> node of the stanza
> 
> gtkdoc comments are XML, so, &lt;pubsub/&gt;. Sorry.

Fixed.

> > +WockyXmppStanza *wocky_pubsub_make_stanza (
> > +void wocky_pubsub_node_list_subscribers_async (
> > +gboolean wocky_pubsub_node_list_subscribers_finish (
> > +GList *wocky_list_deep_copy (GBoxedCopyFunc copy, const GList *items);
> 
> Please add new API to sections.txt (after merging this).

Okay.

> > Squash into wocky_pubsub_node_list_subscribers_async
> 
> Um. (I won't insist that you actually do so, though.)

I had already done this locally but not pushed the branch. My bad. There were no other changes.
Comment 3 Simon McVittie 2010-04-06 11:35:15 UTC
Looks good.
Comment 4 Will Thompson 2010-04-06 12:03:51 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Please add new API to sections.txt (after merging this).
> 
> Okay.

Merged the branch; I'll leave the bug open until I finish with gtk-doc stuff.
Comment 5 Will Thompson 2010-04-07 10:46:03 UTC
here are some doc fixes

i hope that you like them

tomorrow i would like to float away on a cloud
Comment 6 Will Thompson 2010-04-07 10:47:34 UTC
(In reply to comment #5)
> here are some doc fixes
> 
> i hope that you like them
> 
> tomorrow i would like to float away on a cloud

just as i had hoped
simon gave my branch “plus plus”
so i have merged it

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.