sofar/buxton — pull request #32 by ikeydoherty (2013-11-21 14:21:07+00:00)
Title: Start of client library

Ok so there are a few cleanups in here, as well as the requested rename of `delete_value` to `set_value`
I split client's build from libbuxton to ensure only client uses its own sources (Not yet possible with bt-daemon..)
On top of that, I've started the skeleton of the **buxton client library**.

To be fair, I've got a lot of that library done. However, big changes like this need review before I go running off with it and it turns into the other changes I have :) So, I propose the following post merge:

* Split all serialization, protocol, util, etc, into a **convenience library**. This may then be used internally by **cli**, **main** and **library**, but the headers, functions and symbols should not be exported. So, static link :)
* Rename the convenience library to "*-internal", or something. This allows my new **libbuxton-client** to be renamed to **libbuxton**
* Split daemon build from the library (task specific builds) - this forces 3 builds in make check though.. might need a bit of reorganisation
* Remove bt-daemon.h as a public header, leaving it internal **only** for our parts of Buxton. Clients must use `buxton.h`
* Break it all up as much as possible, to ensure the minimum linking is taking place. Right now everything is linked to everything because of libbuxton-shared, gdbm, librt, pthread, etc. (Might also need `-Wl,--as-needed` on top of the changes)
* Add some more tests and asserts to new client library, and perhaps make use of some error functionality.
Kinda it for now. I left a comment in buxton.c (the new library) about being able to expose the fd in the `__client` if we need to, but we'll hit that when we get to it :)