On Tue, Mar 25, 2008 at 03:52:04PM -0700, Steven Dake wrote:
> typedef enum {
>       DATACONF_DISPATCH_ONE,
>       DATACONF_DISPATCH_ALL,
>       DATACONF_DISPATCH_BLOCKING
> } dataconf_dispatch_t;
> 
> #define       DATACONF_TRACK_CURRENT          0x01
> #define       DATACONF_TRACK_CHANGES          0x02
> #define DATACONF_TRACk_CHANGES_ONLY   0x04

        Never understood what these were for.

> typedef void (*dataconf_new_fn_t) (
>       dataconf_handle_t handle,
>       unsigned int seqno,
>       char *result);
> 
> typedef void (*dataconf_deleted_fn_t) (
>       dataconf_handle_t handle,
>       unsigned int seqno,
>       char *result);
> 
> typedef void (*dataconf_done_fn_t) (
>       dataconf_handle_t handle,
>       unsigned int seqno);

        What do these mean?  What events call which callback?  What
does the seqno represent?

> dataconf_error_t dataconf_initialize (void);
> 
> dataconf_error_t dataconf_finalize (void);
> 
> dataconf_error_t dataconf_fd_get (int *fd);
> 
> dataconf_error_t dataconf_dispatch (dataconf_handle_T dispatch_types);

#define CSDB_DEFAULT_HANDLE     NULL
csdb_error_t csdb_init(csdb_handle_t *handle);
csdb_error_t csdb_finalize(csdb_handle_t handle);
csdb_error_t csdb_fd_get(csdb_handle_t handle, int *fd);
csdb_error_t csdb_dispatch(csdb_handle_t handle, csdb_dispatch_t type);

        I think we should *allow* the caller to use more than one handle
(think handle-per-thread).  Think of a handle as a connection to the
database.  If the user doesn't want to manage more than one handle, they
can pass CSDB_DEFAULT_HANDLE, which is a default handle managed by the
library.  The usage is identical to your default-handle-only versions,
but allows multiple connections when an app needs it.

Joel

-- 

"To announce that there must be no criticism of them president, or
 that we are to stand by the president, right or wrong, is not only
 unpatriotic and servile, but is morally treasonable to the American
 public."
        - Theodore Roosevelt

Joel Becker
Principal Software Developer
Oracle
E-mail: [EMAIL PROTECTED]
Phone: (650) 506-8127
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to