diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-11-08 17:17:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-11-08 17:17:33 +0000 |
commit | 9308175caf833485c55854deeffd0e28137baf9a (patch) | |
tree | afdeb1a3b859e3a8027dfa361417041d167fb5db /src/include/gnunet_service_lib.h | |
parent | a7a976060536ea4f95b8036194e5e5a68567d0ce (diff) | |
download | gnunet-9308175caf833485c55854deeffd0e28137baf9a.tar.gz gnunet-9308175caf833485c55854deeffd0e28137baf9a.zip |
misc. bugfixes and API improvements
Diffstat (limited to 'src/include/gnunet_service_lib.h')
-rw-r--r-- | src/include/gnunet_service_lib.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h index 82089954e..66e4f0cd9 100644 --- a/src/include/gnunet_service_lib.h +++ b/src/include/gnunet_service_lib.h | |||
@@ -55,12 +55,31 @@ typedef void (*GNUNET_SERVICE_Main) (void *cls, | |||
55 | 55 | ||
56 | 56 | ||
57 | /** | 57 | /** |
58 | * Options for the service (bitmask). | ||
59 | */ | ||
60 | enum GNUNET_SERVICE_Options | ||
61 | { | ||
62 | /** | ||
63 | * Use defaults. | ||
64 | */ | ||
65 | GNUNET_SERVICE_OPTION_NONE = 0, | ||
66 | |||
67 | /** | ||
68 | * Do not trigger server shutdown on signals, allow for the user | ||
69 | * to terminate the server explicitly when needed. | ||
70 | */ | ||
71 | GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN = 1 | ||
72 | }; | ||
73 | |||
74 | |||
75 | /** | ||
58 | * Run a standard GNUnet service startup sequence (initialize loggers | 76 | * Run a standard GNUnet service startup sequence (initialize loggers |
59 | * and configuration, parse options). | 77 | * and configuration, parse options). |
60 | * | 78 | * |
61 | * @param argc number of command line arguments | 79 | * @param argc number of command line arguments |
62 | * @param argv command line arguments | 80 | * @param argv command line arguments |
63 | * @param serviceName our service name | 81 | * @param serviceName our service name |
82 | * @param opt service options | ||
64 | * @param task main task of the service | 83 | * @param task main task of the service |
65 | * @param task_cls closure for task | 84 | * @param task_cls closure for task |
66 | * @return GNUNET_SYSERR on error, GNUNET_OK | 85 | * @return GNUNET_SYSERR on error, GNUNET_OK |
@@ -69,6 +88,7 @@ typedef void (*GNUNET_SERVICE_Main) (void *cls, | |||
69 | int GNUNET_SERVICE_run (int argc, | 88 | int GNUNET_SERVICE_run (int argc, |
70 | char *const *argv, | 89 | char *const *argv, |
71 | const char *serviceName, | 90 | const char *serviceName, |
91 | enum GNUNET_SERVICE_Options opt, | ||
72 | GNUNET_SERVICE_Main task, | 92 | GNUNET_SERVICE_Main task, |
73 | void *task_cls); | 93 | void *task_cls); |
74 | 94 | ||