#ifndef WORKER_CONNECTION_H
#define WORKER_CONNECTION_H
#include "indexer.h"
struct indexer_request;
struct worker_connection *
worker_connection_create(const char *socket_path,
/* Returns TRUE if worker is connected to (not necessarily handshaked yet) */
/* After initial handshake the worker process tells how many of its kind
can be at maximum. This returns the value, of FALSE if handshake isn't
finished yet. */
unsigned int *limit_r);
/* Send a new indexing request for username+mailbox. The status callback is
called as necessary with the given context. Requests can be queued, but
only for the same username. */
const struct indexer_request *request,
void *context);
/* Returns TRUE if a request is being handled. */
/* Returns username of the currently pending requests,
or NULL if there are none. */
#endif