sofar/buxton — pull request #51 by ikeydoherty (2014-01-14 14:43:20+00:00)
Title: Fixes for GTK3 client

Minor fixes right now as I'm working on package conversion, but these fix the previously raised issues:
* Compiler warning due to `g_idle_add` (strangely believe this is because the function is static)
* Only need GTK3 if you're building the GTK3 client. Because for a normal build it isn't needed.

Re: the update_buxton method. This is integrated into the glib main loop in the GTK3 program. This is where we'd actually ask buxton for our notifications, which could merely be a BuxtonArray of changed keys, or similar. The intent is to provide a working solution demonstrating integration in other technologies likely to be used.

In init we should actually be registering a notification for the key we have, but this requires changes throughout.
For instance, we'll have an issue when we go async/non-blocking. We could (even now) receive a notification when doing a read() from a method expecting, say, a GET response. This will pretty much break stuff :) What we need really is a dedicated client-side read method, which parses the appropriate message (much like we do already in bt-daemon) and dispatch to either callbacks or internal helpers.