Skip to main content

This struct is also typedef'ed as ec_data_closure. The struct members are as follows:

struct _ec_datasource_closure {
  ec_async_job job;
  int status;
  /* the query: on completion, q.result holds the result; the caller
   * is responsible for delref'ing it */
  struct ec_datasource_cache_query q;
  /* if the status indicates an error, and the caller has set errmsg
   * to a valid string pointer, the error message will be printed
   * to it. */
  string *errmsg;
};

To use this struct, include the file modules/datasource/ecdatasource.h.

Values for the status field are:

  • ECDS_QUERY_LIMBO (0) – uninitialized

  • ECDS_QUERY_FAIL (1) – query failed

  • ECDS_QUERY_OK (2) – query succeeded

  • ECDS_QUERY_ASYN (3) – query queued; will notify when complete

The query status field determines what action to take after executing a query. For more information see ec_datasource_cache_query.

See Also

Was this page helpful?