Bug 34610 - Add API for DelegateChannels() and PresentChannel()
Summary: Add API for DelegateChannels() and PresentChannel()
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.co.uk/git/user/...
Whiteboard: review le plus
Keywords: patch
Depends on: 25293 37109
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-23 05:56 UTC by Guillaume Desmottes
Modified: 2011-05-16 02:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2011-02-23 05:56:24 UTC
Once the API is stable (bug #25293) tp-glib should provide high level API for those.
Comment 2 Jonny Lamb 2011-05-11 03:21:22 UTC
+ chans = g_ptr_array_sized_new (g_list_length (channels));
+ g_ptr_array_set_free_func (chans, g_free);
+
+ for (l = channels; l != NULL; l = g_list_next (l))
...

makes me a little unhappy but I'm not sure what to do.

Why don't you make _delegate_channels_async take a GPtrArray instead of a GList?

I'm not sure what your PresentChannel test actually tests, but whatever.

Looks good otherwise.
Comment 3 Guillaume Desmottes 2011-05-11 04:13:33 UTC
(In reply to comment #2)
> + chans = g_ptr_array_sized_new (g_list_length (channels));
> + g_ptr_array_set_free_func (chans, g_free);
> +
> + for (l = channels; l != NULL; l = g_list_next (l))
> ...
> 
> makes me a little unhappy but I'm not sure what to do.
> 
> Why don't you make _delegate_channels_async take a GPtrArray instead of a
> GList?

Because we usually use GList in high level API (see for example
TpBaseClientClassObserveChannelsImpl and friends).

But I'm ready to be convinced otherwise.

> I'm not sure what your PresentChannel test actually tests, but whatever.

Not much, but at least his code is run in a test (and it did help me to find a
bug: I was passing the wrong source_tag when checking in _finish).
Comment 4 Jonny Lamb 2011-05-11 04:54:52 UTC
Okay fine, gogogogogo once your MC branch is merged.
Comment 5 Guillaume Desmottes 2011-05-13 03:25:32 UTC
http://cgit.collabora.co.uk/git/user/cassidy/telepathy-glib/log/?h=re-dispatch-34610
now implements the new spec (bug #37109)
Comment 6 Jonny Lamb 2011-05-13 09:07:39 UTC
(In reply to comment #5)
> http://cgit.collabora.co.uk/git/user/cassidy/telepathy-glib/log/?h=re-dispatch-34610
> now implements the new spec (bug #37109)

+ * @not_delegated: (out) (element-type TelepathyGLib.Channel GLib.Error) (transfer container):

hero!

+ * can be used to known the channels that @self is not handling any more,

*know

+ * if not %NULL, used to return a #GPtrArray containing the #TpChannel which

#TpChannel<!-- -->s (lol)

+ * fnot not %NULL, used to return a #GHashTable mapping #TpChannel which have

*if not %NULL

OTHERWISE FINE GOGOGOGOGOGOGO OGMASOEFMAOEFIJAWEUOHAUEIFNHCAOIENAWOIEJWEOFJAOIEJFOIAWEJFOIAEJOIAEJFIOA

OMG IT'S THE WEEKEND SO EXCITED WAHIOEHAOIEHNOAIENOAWE
Comment 7 Guillaume Desmottes 2011-05-16 00:22:17 UTC
(In reply to comment #6)
> + * @not_delegated: (out) (element-type TelepathyGLib.Channel GLib.Error)
> (transfer container):
> 
> hero!

Fear my GIR sK1llz!

> + * can be used to known the channels that @self is not handling any more,
> 
> *know

fixed.

> + * if not %NULL, used to return a #GPtrArray containing the #TpChannel which
> 
> #TpChannel<!-- -->s (lol)

fixed.

> + * fnot not %NULL, used to return a #GHashTable mapping #TpChannel which have
> 
> *if not %NULL

fixed.

> OTHERWISE FINE GOGOGOGOGOGOGO
> OGMASOEFMAOEFIJAWEUOHAUEIFNHCAOIENAWOIEJWEOFJAOIEJFOIAWEJFOIAEJOIAEJFIOA
> 
> OMG IT'S THE WEEKEND SO EXCITED WAHIOEHAOIEHNOAIENOAWE

Bouh, Monday already. :(
Comment 8 Jonny Lamb 2011-05-16 00:29:17 UTC
Gogogo
Comment 9 Guillaume Desmottes 2011-05-16 02:10:01 UTC
Merged to master, will be in 0.15.1.


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.