Bug 23344 - Provide API for Debug
Summary: Provide API for Debug
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Jonny Lamb
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/ca...
Whiteboard: r+
Keywords: patch
Depends on:
Blocks: 48769
  Show dependency treegraph
 
Reported: 2009-08-16 11:05 UTC by Simon McVittie
Modified: 2012-04-18 00:09 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2009-08-16 11:05:15 UTC
I haven't incorporated Debug codegen into telepathy-glib yet. Please do so.

On the service side, we need something similar to Gabble's GabbleDebugger; it might as well go straight in at the same time as the codegen. Perhaps call it TpDebugSender.

On the client side, we need a TpProxy subclass onto which to hook codegen; perhaps call it TpDebugReceiver.

My wip-debug branch is totally untested but is probably a good starting point.
Comment 1 Jonny Lamb 2009-08-28 05:17:20 UTC
TpDebugSender was just merged into master.
Comment 2 Simon McVittie 2009-09-09 10:41:38 UTC
Fixed in 0.7.36
Comment 3 Jonny Lamb 2009-09-10 02:46:55 UTC
Is this really reolved? I've not implemented TpDebugReceiver.
Comment 4 Simon McVittie 2009-09-10 03:29:33 UTC
A fair point :-)
Comment 5 Will Thompson 2011-01-10 06:35:44 UTC
I started working on http://git.collabora.co.uk/?p=user/wjt/telepathy-glib.git;a=shortlog;h=refs/heads/debug and then stopped.
Comment 6 Guillaume Desmottes 2012-04-13 06:30:56 UTC
The new URL is http://cgit.collabora.com/git/user/wjt/telepathy-glib/log/?h=debug

I dropped the last commit because I don't need it right now and I think it's worth having API for the 'simple' case as well. 
http://cgit.collabora.com/git/user/cassidy/telepathy-glib/log/?h=debug-23344

I still have to port Empathy to validate the branch but I can already be reviewed.
Comment 7 Jonny Lamb 2012-04-13 09:18:12 UTC
This all looks good except:

1. the header comment of tests/dbus/debug-client.c is wrong.

2. I don't like how TpDebugMessage is a GObject. It feels far far too big for something which can be just a simple struct?
Comment 8 Guillaume Desmottes 2012-04-16 00:31:01 UTC
(In reply to comment #7)
> This all looks good except:
> 
> 1. the header comment of tests/dbus/debug-client.c is wrong.

Good catch; fixed.

> 2. I don't like how TpDebugMessage is a GObject. It feels far far too big for
> something which can be just a simple struct?

If for any reason user want to store the debug message (like Empathy which keep it in a model) it will have to copy everything while here he can just ref the object.

I generally don't like the "it's not worth an object approach". If it looks like an object and would be one in any sane/decent/modern language it should probably be an object.
Comment 9 Guillaume Desmottes 2012-04-16 04:37:55 UTC
I added 2 new commits on top of the branch while porting Empathy to this new API.

For the record the port is http://cgit.collabora.com/git/user/cassidy/empathy/log/?h=debug-674182
Comment 10 Guillaume Desmottes 2012-04-16 06:15:44 UTC
(In reply to comment #6)
> I dropped the last commit because I don't need it right now and I think it's
> worth having API for the 'simple' case as well. 
> http://cgit.collabora.com/git/user/cassidy/telepathy-glib/log/?h=debug-23344

I opened bug #48769 for this.
Comment 11 Jonny Lamb 2012-04-17 09:41:04 UTC
(In reply to comment #8)
> If for any reason user want to store the debug message (like Empathy which keep
> it in a model) it will have to copy everything while here he can just ref the
> object.
> 
> I generally don't like the "it's not worth an object approach". If it looks
> like an object and would be one in any sane/decent/modern language it should
> probably be an object.

Okay then, I'll let you keep it as a GObject.

Your three new patches also look fine. Nice test coverage. :-)
Comment 12 Guillaume Desmottes 2012-04-18 00:09:14 UTC
Merged to master for 0.19.0; thanks!


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.