After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771721 - Remove TpClient helper class
Remove TpClient helper class
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks: 773438
 
 
Reported: 2016-09-20 13:10 UTC by Florian Müllner
Modified: 2017-03-10 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: Implement Tp.BaseClient directly (6.00 KB, patch)
2016-09-20 13:10 UTC, Florian Müllner
committed Details | Review
shell: Remove TpClient (13.75 KB, patch)
2016-09-20 13:10 UTC, Florian Müllner
none Details | Review
shell: Remove TpClient (12.88 KB, patch)
2017-03-09 21:47 UTC, Florian Müllner
committed Details | Review
main: Remove telepathy-specific log handling (3.59 KB, patch)
2017-03-09 21:57 UTC, Florian Müllner
committed Details | Review
main: Use GBusNameOwnerFlags to specify flags (1.56 KB, patch)
2017-03-10 15:40 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-09-20 13:10:27 UTC
See patches.
Comment 1 Florian Müllner 2016-09-20 13:10:33 UTC
Created attachment 335930 [details] [review]
telepathyClient: Implement Tp.BaseClient directly

The telepathy integration was written at a time where gjs didn't
allow to inherit from GObject classes, which is why we needed a
C helper class. This hasn't been the case for a while now, so cut
out the middle man and implement Tp.BaseClient directly.
Comment 2 Florian Müllner 2016-09-20 13:10:40 UTC
Created attachment 335931 [details] [review]
shell: Remove TpClient

With the telepathy component now being implemented purely in JS, we
can drop the C helper class and therefore the linker dependency on
telepathy-glib.
Comment 3 Rui Matos 2016-09-20 13:52:58 UTC
Review of attachment 335930 [details] [review]:

lgtm
Comment 4 Rui Matos 2016-09-20 13:53:37 UTC
Review of attachment 335931 [details] [review]:

good riddance
Comment 5 Hussam Al-Tayeb 2016-10-24 18:51:53 UTC
It fails to build with those patches:
main.c:23:34: fatal error: telepathy-glib/debug.h: No such file or directory
 #include <telepathy-glib/debug.h>
Comment 6 Florian Müllner 2016-10-24 20:33:39 UTC
Yes, there's some logging special-casing in main.c - I haven't quite made up my mind what to replace it with, which is why those patches haven't been pushed yet.
Comment 7 Florian Müllner 2017-03-09 21:47:13 UTC
Created attachment 347577 [details] [review]
shell: Remove TpClient

With the telepathy component now being implemented purely in JS, we
can drop the C helper class.
Comment 8 Florian Müllner 2017-03-09 21:50:31 UTC
Comment on attachment 347577 [details] [review]
shell: Remove TpClient

(Restoring patch status, as I just moved the configure.ac bits to the next patch)
Comment 9 Florian Müllner 2017-03-09 21:57:42 UTC
Created attachment 347578 [details] [review]
main: Remove telepathy-specific log handling

The built-in telepathy integration is far less prominent than it
used to be, and doesn't really justify a link time dependency to
send debug message over D-Bus.
Comment 10 Rui Matos 2017-03-10 14:45:27 UTC
Review of attachment 347578 [details] [review]:

sure

::: src/main.c
@@ +43,3 @@
 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
 
+#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2

seems unrelated?
Comment 11 Rui Matos 2017-03-10 14:58:54 UTC
(In reply to Rui Matos from comment #10)
> Review of attachment 347578 [details] [review] [review]:
> 
> sure
> 
> ::: src/main.c
> @@ +43,3 @@
>  #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
>  
> +#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2
> 
> seems unrelated?

actually, I guess we should use G_BUS_NAME_OWNER_FLAGS_REPLACE which we already do for other DBus names anyway
Comment 12 Florian Müllner 2017-03-10 15:40:51 UTC
Created attachment 347655 [details] [review]
main: Use GBusNameOwnerFlags to specify flags

We are still using DBUS_NAME_FLAG_REPLACE_EXISTING from dbus-glib
in some places (whose headers are drawn in via telepathy-glib).
As both GIO and dbus-glib use the values that will end up being
sent on the bus, the define and enum value are interchangeable,
but it's clearly better to consistently use the library that is
explicitly included.


(In reply to Rui Matos from comment #11)
> > +#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2
> > 
> > seems unrelated?

It isn't, as the symbol comes from dbus-glib which is only included via telepathy-glib. But ...


> actually, I guess we should use G_BUS_NAME_OWNER_FLAGS_REPLACE which we
> already do for other DBus names anyway

... obviously that's far better.
Comment 13 Rui Matos 2017-03-10 15:51:09 UTC
Review of attachment 347655 [details] [review]:

++
Comment 14 Florian Müllner 2017-03-10 16:15:39 UTC
Attachment 335930 [details] pushed as 7c96b39 - telepathyClient: Implement Tp.BaseClient directly
Attachment 347577 [details] pushed as 3c828c8 - shell: Remove TpClient
Attachment 347578 [details] pushed as 2d814bf - main: Remove telepathy-specific log handling
Attachment 347655 [details] pushed as 8f8e512 - main: Use GBusNameOwnerFlags to specify flags