21#if ! defined (__GNUNET_UTIL_LIB_H_INSIDE__)
22#error "Only <gnunet_util_lib.h> can be included directly."
40#ifndef GNUNET_PROGRAM_LIB_H
41#define GNUNET_PROGRAM_LIB_H
92 const char *binaryName,
93 const char *binaryHelp,
97 int run_without_scheduler);
119 const char *binaryName,
120 const char *binaryHelp,
127 const char *daemon_desc,
130#ifndef HAVE_GNUNET_MONOLITH
131#define GNUNET_DAEMON_MAIN(daemon_name, daemon_help, init_cb) \
137 struct GNUNET_GETOPT_CommandLineOption options[] = { \
138 GNUNET_GETOPT_OPTION_END \
140 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, \
143 ret = GNUNET_PROGRAM_run (argc, \
150 GNUNET_free_nz ((void*) argv); \
154#define GNUNET_DAEMON_MAIN(daemon_name, daemon_help, init_cb) \
155 static int __attribute__ ((constructor)) \
158 return GNUNET_DAEMON_register (daemon_name, \
struct GNUNET_GETOPT_CommandLineOption options[]
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Command line parsing and –help formatting.
API to schedule computations using continuation passing style.
GNUNET_GenericReturnValue
Named constants for return values.
enum GNUNET_GenericReturnValue GNUNET_DAEMON_register(const char *daemon_name, const char *daemon_desc, GNUNET_PROGRAM_Main task)
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run2(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls, int run_without_scheduler)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
void(* GNUNET_PROGRAM_Main)(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main function that will be run.
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Definition of a command line option.