Bug 38568 (xmpp-console) - Add an XMPP console
Summary: Add an XMPP console
Status: RESOLVED FIXED
Alias: xmpp-console
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/wj...
Whiteboard: r+
Keywords: patch
Depends on: 38577
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-22 06:40 UTC by Will Thompson
Modified: 2011-11-21 05:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2011-06-22 06:40:58 UTC
Today I snapped and wrote a sidecar that lets you send arbitrary IQs and see the result. I think it will also want to have a “hey here's an incoming stanza signal”—to have that, it'll want to have an off switch, too.

No UI yet.
Comment 2 Guillaume Desmottes 2011-06-23 01:20:52 UTC
I used Psi's XMPP console a lot, it would be ace to be feature equivalent with it.
Comment 3 Guillaume Desmottes 2011-08-03 05:55:43 UTC
"Le mieux est l'ennemi du bien", let's start with that (I guess we are not commiting any kind of API stability for such sidecar right ?).

+static void
+gabble_console_plugin_init (GabbleConsolePlugin *self)
+{
+  DEBUG ("hi");

We can just remove that.

+  iface->name = "Console registration plugin";
XMPP console?

+      g_simple_async_result_set_from_error (simple, error);
+      g_error_free (error);

If your GLib is cool enough you could use g_simple_async_result_take_error().
Comment 4 Will Thompson 2011-09-21 02:23:59 UTC
(In reply to comment #3)
> "Le mieux est l'ennemi du bien", let's start with that (I guess we are not
> commiting any kind of API stability for such sidecar right ?).
> 
> +static void
> +gabble_console_plugin_init (GabbleConsolePlugin *self)
> +{
> +  DEBUG ("hi");
> 
> We can just remove that.

Done.
> 
> +  iface->name = "Console registration plugin";
> XMPP console?

Changed.

> +      g_simple_async_result_set_from_error (simple, error);
> +      g_error_free (error);
> 
> If your GLib is cool enough you could use g_simple_async_result_take_error().

We officially don't depend on a cool enough GLib.

I'll merge the UI into this branch shortly.
Comment 5 Will Thompson 2011-09-21 02:54:58 UTC
(In reply to comment #3)
> "Le mieux est l'ennemi du bien", let's start with that (I guess we are not
> commiting any kind of API stability for such sidecar right ?).

Oh, absolutely not. This is a pretty good reason to bundle the UI alongside the plugin.
Comment 6 Will Thompson 2011-09-21 03:48:32 UTC
I pushed a patch to the Gabble branch which adds the console UI.

It looks like this: http://willthompson.co.uk/misc/console.png (except that I added a little bit of padding to the right-hand side of the entries as well).
Comment 7 Will Thompson 2011-09-21 04:05:30 UTC
Rejigged the Python thing to be marginally better-structured. I'm done tinkering for today.
Comment 8 Will Thompson 2011-09-21 08:52:01 UTC
(In reply to comment #7)
> Rejigged the Python thing to be marginally better-structured. I'm done
> tinkering for today.

So I claimed… but instead I added radio buttons for get vs. set, and added a spinner while the SendIQ() method is in flight. It looks pretty nifty.

I think I'm probably really done now.
Comment 9 Guillaume Desmottes 2011-09-22 00:05:22 UTC
Looks good. One suggestion though: wouldn't it be better/easier to pass an account suffix rather than the bus name of the connection? Would be much convenient to use as we could just paste the output of 'mc-tool list'.
Comment 10 Will Thompson 2011-11-18 03:03:54 UTC
(In reply to comment #9)
> Looks good. One suggestion though: wouldn't it be better/easier to pass an
> account suffix rather than the bus name of the connection? Would be much
> convenient to use as we could just paste the output of 'mc-tool list'.

Yup, fixed.

I also added the two big missing features: you can now send any kind of stanza (not just IQs), and you can monitor stanzas as they fly past. We depend on the wocky branch from bug 38577.
Comment 11 Guillaume Desmottes 2011-11-21 00:49:07 UTC
"Ideally the SpewStanzas property would become False when the client
which asked for it falls off the bus. Later..."

Add a FIXME? Note that would break 2 clients trying to use the plugin at the same time but I'm ready to believe we don't really care.


+AM_BUS_NAME = 'org.freedesktop.Telepathy.AccountManager'
+ACCOUNT_PREFIX = '/org/freedesktop/Telepathy/Account'
+ACCOUNT_IFACE = 'org.freedesktop.Telepathy.Account'

Shouldn't we put those in constants.py?
Comment 12 Will Thompson 2011-11-21 02:38:58 UTC
(In reply to comment #11)
> "Ideally the SpewStanzas property would become False when the client
> which asked for it falls off the bus. Later..."
> 
> Add a FIXME? Note that would break 2 clients trying to use the plugin at the
> same time but I'm ready to believe we don't really care.

Yeah… really, in retrospect, I think the console API should have been on a channel, but I couldn't be bothered to change it.

> +AM_BUS_NAME = 'org.freedesktop.Telepathy.AccountManager'
> +ACCOUNT_PREFIX = '/org/freedesktop/Telepathy/Account'
> +ACCOUNT_IFACE = 'org.freedesktop.Telepathy.Account'
> 
> Shouldn't we put those in constants.py?

No, because plugins/telepathy-gabble-xmpp-console is a stand-alone Python program which is installed, whereas tests/twisted/constants.py is part of the test suite which is not (typically) installed.
Comment 13 Guillaume Desmottes 2011-11-21 04:53:17 UTC
ship 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.