On Tue, 2008-03-25 at 14:48 -0700, Joel Becker wrote:
> On Mon, Mar 24, 2008 at 12:58:07PM -0700, Steven Dake wrote:
> > /*
> > * Starts the delivery of callbacks for the xml query specified.
> > * All callbacks are deliverd via the dispatch function
> > * Depending on track flags, the current values of the xml query
> could be
> > * delivered in this callback
> > */
> > dataconf_error_t dataconf_track (
> > dataconf_handle_t dataconf_handle,
> > char *xml_request,
> > int track_flags);
> >
> > dataconf_error_t dataconf_trackstop (
> > dataconf_handle_t dataconf_handle);
>
> How does one specify which xml_request to stop tracking? Is
> this a track_stopall()? Can you only track one thing at a time?
The api only allows one tracking per initialization. If an api user
wanted to track multiple queries in their application, they would create
multiple contexts with dataconf_initialize.
This allows the directing a query to a specific callback function.
>
> > /*
> > * Retrieves data syncronously
> > */
> > dataconf_error_t dataconf_query_initialize (
> > dataconf_handle_t dataconf_handle,
> > dataconf_iterator_handle_t *dataconf_query_handle);
>
> Where's the xml_request to query here?
>
> Joel
Joel,
not sure where this query went.
Here is an api with the changes we discussed on irc regarding the
ability to make a single query vs list queries.
/*
* External API exported in a library api
*/
typedef uint64_t dataconf_handle_t;
typedef uint64_t dataconf_query_handle_t;
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
typedef void (*dataconf_new_result_fn_t) (
dataconf_handle_t handle,
unsigned int seqno,
char *result);
typedef void (*dataconf_done_result_fn_t) (
dataconf_handle_t handle,
unsigned int seqno);
typedef struct {
dataconf_new_result_fn_t dataconf_new_result_fn_t,
dataconf_done_result_fn_t dataconf_done_result_fn
} dataconf_callbacks_t;
dataconf_error_t dataconf_initialize (
dataconf_handle_t *handle,
dataconf_callbacks_t *callbacks);
dataconf_error_t dataconf_finalize (
dataconf_handle_t handle);
dataconf_error_t dataconf_fd_get (
dataconf_handle_t *handle,
int *fd);
dataconf_error_t dataconf_dispatch (
dataconf_handle_t handle,
dataconf_handle_T dispatch_types);
/*
* Starts the delivery of callbacks for the xml query specified.
* All callbacks are deliverd via the dispatch function
* Depending on track flags, the current values of the xml query could be
* delivered in this callback
*/
dataconf_error_t dataconf_track (
dataconf_handle_t dataconf_handle,
char *xml_request,
int track_flags);
dataconf_error_t dataconf_trackstop (
dataconf_handle_t dataconf_handle);
/*
* Retrieves one key and value via an XML query
*/
dataconf_error_t dataconf_query_one (
dataconf_handle_t dataconf_handle,
char *xml_request,
char *result);
/*
* Retrieves lists of information via an XML query
*/
dataconf_error_t dataconf_query_list_initialize (
dataconf_handle_t dataconf_handle,
char *xml_request,
dataconf_query_list_handle_t *dataconf_query_list_handle);
dataconf_error_t dataconf_query_list_next (
dataconf_query_list_handle_t dataconf_query_list_handle,
char *result);
dataconf_error_t dataconf_query_list_finalize (
dataconf_query_list_handle_t dataconf_query_list_handle);
/*
* Internal implementation API used inside the executive
*/
typdef uint64t xml_handle_t;
xml_initialize (xml_handle_t *handle);
xml_track_set (xml_handle_t handle,
char *request,
void (*new_result_fn_t) (
unsigned int seqno,
char *result),
void (*done_result_fn_t) (
unsigned int seqno),
unsigned int track_flags);
xml_finalize (xml_handle_t handle);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais