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.
I wrote a very simple UI! http://cgit.collabora.com/git/user/wjt/xmpp-console.git/ http://people.collabora.com/~wjt/tmp/my-second-xmpp-console.png
I used Psi's XMPP console a lot, it would be ace to be feature equivalent with it.
"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().
(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.
(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.
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).
Rejigged the Python thing to be marginally better-structured. I'm done tinkering for today.
(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.
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'.
(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.
"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?
(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.
ship it!
http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=357aef5d882f461a05037255f3f0dee844d18d6f
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.