1 #ifndef NTDB_TEST_EXTERNAL_AGENT_H
2 #define NTDB_TEST_EXTERNAL_AGENT_H
4 /* For locking tests, we need a different process to try things at
19 /* Do this before doing any ntdb stuff. Return handle, or -1. */
20 struct agent
*prepare_external_agent(void);
26 FAILED
, /* For fetch, or NEEDS_RECOVERY */
30 /* Ask the external agent to try to do an operation.
31 * name == ntdb name for OPEN/OPEN_WITH_CLEAR_IF_FIRST,
32 * <key>=<data> for FETCH/STORE.
34 enum agent_return
external_agent_operation(struct agent
*handle
,
38 /* Hook into free() on ntdb_data in external agent. */
39 extern void (*external_agent_free
)(void *);
41 /* Mapping enum -> string. */
42 const char *agent_return_name(enum agent_return ret
);
43 const char *operation_name(enum operation op
);
45 void free_external_agent(struct agent
*agent
);
49 enum agent_return
external_agent_needs_rec(struct ntdb_context
*ntdb
);
51 #endif /* NTDB_TEST_EXTERNAL_AGENT_H */