41#if ! defined (__GNUNET_UTIL_LIB_H_INSIDE__)
42#error "Only <gnunet_util_lib.h> can be included directly."
45#ifndef GNUNET_HELPER_LIB_H
46#define GNUNET_HELPER_LIB_H
struct GNUNET_MessageHeader * msg
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static struct GNUNET_IDENTITY_Handle * sh
Handle to IDENTITY service.
static int result
Global testing status.
Library for tokenizing a message stream.
void GNUNET_HELPER_send_cancel(struct GNUNET_HELPER_SendHandle *sh)
Cancel a GNUNET_HELPER_send operation.
struct GNUNET_HELPER_SendHandle * GNUNET_HELPER_send(struct GNUNET_HELPER_Handle *h, const struct GNUNET_MessageHeader *msg, bool can_drop, GNUNET_HELPER_Continuation cont, void *cont_cls)
Send an message to the helper.
enum GNUNET_GenericReturnValue GNUNET_HELPER_wait(struct GNUNET_HELPER_Handle *h)
Reap the helper process.
struct GNUNET_HELPER_Handle * GNUNET_HELPER_start(const struct GNUNET_OS_ProjectData *pd, int with_control_pipe, const char *binary_name, char *const binary_argv[], GNUNET_MessageTokenizerCallback cb, GNUNET_HELPER_ExceptionCallback exp_cb, void *cb_cls)
Starts a helper and begins reading from it.
void(* GNUNET_HELPER_ExceptionCallback)(void *cls)
Callback that will be called when the helper process dies.
enum GNUNET_GenericReturnValue GNUNET_HELPER_kill(struct GNUNET_HELPER_Handle *h, int soft_kill)
Sends termination signal to the helper process.
void GNUNET_HELPER_stop(struct GNUNET_HELPER_Handle *h, int soft_kill)
Kills the helper, closes the pipe, frees the handle and calls wait() on the helper process.
void(* GNUNET_HELPER_Continuation)(void *cls, enum GNUNET_GenericReturnValue result)
Continuation function.
void GNUNET_HELPER_destroy(struct GNUNET_HELPER_Handle *h)
Free's the resources occupied by the helper handle.
GNUNET_GenericReturnValue
Named constants for return values.
int(* GNUNET_MessageTokenizerCallback)(void *cls, const struct GNUNET_MessageHeader *message)
Functions with this signature are called whenever a complete message is received by the tokenizer.
The handle to a helper process.
int with_control_pipe
Does the helper support the use of a control pipe for signalling?
void * cb_cls
The closure for callbacks.
char ** binary_argv
NULL-terminated list of command-line arguments.
char * binary_name
Binary to run.
Entry in the queue of messages we need to transmit to the helper.
GNUNET_HELPER_Continuation cont
Function to call upon completion.
void * cont_cls
Closure to 'cont'.
Project-specific data used to help the OS subsystem find installation paths.
static void exp_cb(void *cls)
Callback called if there was an exception during execution of the helper.