libctdb: API changes from Ronnie's version
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 20 May 2010 06:37:30 +0000 (16:07 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 20 May 2010 06:37:30 +0000 (16:07 +0930)
commit86e1f93df856f9627182ed0e18bfcff6866c0954
tree3430e12cefb5f12caf50cc5a138cc30b51c89333
parent09f05cbfc883e5aac33d3781b163cde178ece4cf
libctdb: API changes from Ronnie's version

These simplifications mostly came up due to the implementation.

o Rename ctdb_context to ctdb_connection.
   We already have a ctdb_context internally in ctdbd; don't confuse them!
o Rename ctdb_handle to struct ctdb_request.
   From the user POV it's a request, and it's also useful internally to
   avoid implicit cast to/from void *.
o Rename ctdb_db_context to ctdb_db.
o Introduce ctdb_lock.
   This provides an explicit "lock object" you get from readrecordlock
   and have to hand to those functions which need you to hold a lock.
o status args are "int" not int32_t.
   Should this be a bool?
o Remove last traces on generic callback.
   Without semi-sync API, this doesn't help anything and loses type safety.
o Remove the semi-async API.
   We can add this later, but I think a sync and async API is enough for
   our poor users for the moment :)
o Registering a message handler also takes a callback.
   This way you can tell if it failed.  Not sure if this is overkill, but it's
   consistent.
o ctdb_service() takes an revents arg
   Strictly not necessary for a nonblocking fd, but nice to know if a
   read or write is possible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
include/ctdb.h
libctdb/tst.c