updates
[sahlberg/ctdb.git] / include / libctdb.h
index 9a14a7eab7c16a4fd25adac8eb0f902ae59feef2..928da5653cdc10ded71393103457e8a98c0be69e 100644 (file)
 #ifndef _LIBCTDB_H
 #define _LIBCTDB_H
 
-/*
- * initialize the l;ibctdb layer and connect to the daemon 
+/* all functions except libctdb_connect() and libctdb_service()
+ * are non-blocking
  */
+
 struct ctdb_context *libctdb_connect(const char *addr);
 
-/*
- * get the filedescriptor for the event system.
- */
 int libctdb_get_fd(struct ctdb_context *ctdb);
 
-/*
- * what events do we need to trigger on right now
- * we always trigger on POLLIN in case ctdb has a packet for us,
- * but we also trigger on POLLOUT in case the message queue
- * is in use and we need to wait for the socket to become writeable
- */
 int libctdb_which_events(struct ctdb_context *ctdb);
 
-/*
- * called when there are events that libctdb needs to service
- */
 int libctdb_service(struct ctdb_context *ctdb);
 
 
 
+typedef void libctdb_handle;
+
+
 typedef void (*get_recmaster_cb)(int32_t status, int32_t recmaster, void *private_data);
 
-struct ctdb_client_control_state *
-libctdb_getrecmaster_send_cb(struct ctdb_context *ctdb,
+
+
+libctdb_handle *
+libctdb_getrecmaster_cb_send(struct ctdb_context *ctdb,
                        uint32_t destnode,
                        get_recmaster_cb callback,
                        void *private_data);
 
+int libctdb_cancel(libctdb_handle *);
 
 #endif