Bug 70077 - Gabble: port to tp-glib 0.99.2
Summary: Gabble: port to tp-glib 0.99.2
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/ca...
Whiteboard:
Keywords:
Depends on: 70078
Blocks: 69431
  Show dependency treegraph
 
Reported: 2013-10-03 14:12 UTC by Guillaume Desmottes
Modified: 2013-10-16 17:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
construct_contact_statuses_cb: assert that handles are valid (1020 bytes, patch)
2013-10-16 16:09 UTC, Guillaume Desmottes
Details | Splinter Review

Description Guillaume Desmottes 2013-10-03 14:12:17 UTC
.
Comment 1 Guillaume Desmottes 2013-10-04 15:52:46 UTC
I started in http://cgit.collabora.com/git/user/cassidy/telepathy-gabble/log/?h=next but it's very far from being finished. I'll continue on Monday.
Comment 2 Guillaume Desmottes 2013-10-11 21:59:52 UTC
http://cgit.collabora.com/git/user/cassidy/telepathy-gabble/log/?h=next is now ready for review
Comment 3 Simon McVittie 2013-10-16 11:07:54 UTC
Ship it, and please tag it as 0.99.2 (then one or other of us can get on with the giant sed invocation to have connection_interface_aliasing1, etc., in generated C, for 0.99.3).

A couple of bits of cleanup which do not block merge:

> - if (!tp_handles_are_valid (handle_repo, contact_handles, FALSE, error))
> + if (!tp_handles_are_valid (handle_repo, contact_handles, FALSE, NULL))
>     return NULL;

This is fine, but you could just g_return_val_if_fail, I think (please check in telepathy-glib first but I'm pretty sure it guarantees not to call this with bad handles).

> # pointless backwards compat section
> print >> f, '[ConnectionManager]'
>- print >> f, 'BusName=org.freedesktop.Telepathy.ConnectionManager.' + manager
>- print >> f, 'ObjectPath=/org/freedesktop/Telepathy/ConnectionManager/' + manager
>+ print >> f, 'BusName=im.telepathy1.ConnectionManager.' + manager
>+ print >> f, 'ObjectPath=/im/telepathy1/ConnectionManager/' + manager

We can delete this :-)
Comment 4 Guillaume Desmottes 2013-10-16 16:04:00 UTC
(In reply to comment #3)
> Ship it, and please tag it as 0.99.2 (then one or other of us can get on
> with the giant sed invocation to have connection_interface_aliasing1, etc.,
> in generated C, for 0.99.3).

Done.

> > - if (!tp_handles_are_valid (handle_repo, contact_handles, FALSE, error))
> > + if (!tp_handles_are_valid (handle_repo, contact_handles, FALSE, NULL))
> >     return NULL;
> 
> This is fine, but you could just g_return_val_if_fail, I think (please check
> in telepathy-glib first but I'm pretty sure it guarantees not to call this
> with bad handles).

Indeed, it does check it.

> > # pointless backwards compat section
> > print >> f, '[ConnectionManager]'
> >- print >> f, 'BusName=org.freedesktop.Telepathy.ConnectionManager.' + manager
> >- print >> f, 'ObjectPath=/org/freedesktop/Telepathy/ConnectionManager/' + manager
> >+ print >> f, 'BusName=im.telepathy1.ConnectionManager.' + manager
> >+ print >> f, 'ObjectPath=/im/telepathy1/ConnectionManager/' + manager
> 
> We can delete this :-)

You mean we can remove the whole manager-file.py? Gabble doesn't seem to use it.
According to the comment, the master copy is in tp-glib. Should we drop it there as well?
Comment 5 Guillaume Desmottes 2013-10-16 16:09:20 UTC
Created attachment 87740 [details] [review]
construct_contact_statuses_cb: assert that handles are valid
Comment 6 Simon McVittie 2013-10-16 17:08:46 UTC
(In reply to comment #4)
> > > # pointless backwards compat section
> > > print >> f, '[ConnectionManager]'
> > >- print >> f, 'BusName=org.freedesktop.Telepathy.ConnectionManager.' + manager
> > >- print >> f, 'ObjectPath=/org/freedesktop/Telepathy/ConnectionManager/' + manager
> > >+ print >> f, 'BusName=im.telepathy1.ConnectionManager.' + manager
> > >+ print >> f, 'ObjectPath=/im/telepathy1/ConnectionManager/' + manager
> > 
> > We can delete this :-)
> 
> You mean we can remove the whole manager-file.py? Gabble doesn't seem to use
> it.

I meant the BusName and ObjectPath keys in the [ConnectionManager] group, which are labelled "pointless backwards compat section" in the code I quoted :-)

> According to the comment, the master copy is in tp-glib. Should we drop it
> there as well?

Delete it from anywhere that doesn't use it? I think telepathy-glib uses it to generate .manager files for the examples, so it will probably need to keep it.

The idea of using manager-file.py instead of write-mgr-file is that it's more cross-compilation-friendly; but tbh we should probably just have a static .manager file in the source tree, compile it in with GResource, and have a TpBaseProtocol subclass that uses a GResource as its source data. Or something...
Comment 7 Simon McVittie 2013-10-16 17:09:52 UTC
Comment on attachment 87740 [details] [review]
construct_contact_statuses_cb: assert that handles are valid

Review of attachment 87740 [details] [review]:
-----------------------------------------------------------------

++
Comment 8 Guillaume Desmottes 2013-10-16 17:38:52 UTC
(In reply to comment #7)
> Comment on attachment 87740 [details] [review] [review]
> construct_contact_statuses_cb: assert that handles are valid
> 
> Review of attachment 87740 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ++

merged.
Comment 9 Guillaume Desmottes 2013-10-16 17:40:55 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > > > # pointless backwards compat section
> > > > print >> f, '[ConnectionManager]'
> > > >- print >> f, 'BusName=org.freedesktop.Telepathy.ConnectionManager.' + manager
> > > >- print >> f, 'ObjectPath=/org/freedesktop/Telepathy/ConnectionManager/' + manager
> > > >+ print >> f, 'BusName=im.telepathy1.ConnectionManager.' + manager
> > > >+ print >> f, 'ObjectPath=/im/telepathy1/ConnectionManager/' + manager
> > > 
> > > We can delete this :-)
> > 
> > You mean we can remove the whole manager-file.py? Gabble doesn't seem to use
> > it.
> 
> I meant the BusName and ObjectPath keys in the [ConnectionManager] group,
> which are labelled "pointless backwards compat section" in the code I quoted
> :-)
> 
> > According to the comment, the master copy is in tp-glib. Should we drop it
> > there as well?
> 
> Delete it from anywhere that doesn't use it? I think telepathy-glib uses it
> to generate .manager files for the examples, so it will probably need to
> keep it.

Ok I just removed it from Gabble next then.


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.