diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-17 18:13:55 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-17 18:13:55 +0100 |
commit | 17d34d5e094c2f8a90717b07e3a711d6e2c15903 (patch) | |
tree | 777b5323145a5f4d1f044da29a682799008a11d4 /src/include/gnunet_service_lib.h | |
parent | 3391977e3f92a2ebcafc14ea6374aecd580df873 (diff) | |
download | gnunet-17d34d5e094c2f8a90717b07e3a711d6e2c15903.tar.gz gnunet-17d34d5e094c2f8a90717b07e3a711d6e2c15903.zip |
more renamings relating to 'new' service now just being the 'normal' service
Diffstat (limited to 'src/include/gnunet_service_lib.h')
-rw-r--r-- | src/include/gnunet_service_lib.h | 80 |
1 files changed, 7 insertions, 73 deletions
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h index c506fc6fa..aacafe956 100644 --- a/src/include/gnunet_service_lib.h +++ b/src/include/gnunet_service_lib.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2009-2013, 2016 GNUnet e.V. | 3 | Copyright (C) 2009-2013, 2016, 2017 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -46,27 +46,6 @@ extern "C" | |||
46 | #include "gnunet_configuration_lib.h" | 46 | #include "gnunet_configuration_lib.h" |
47 | #include "gnunet_mq_lib.h" | 47 | #include "gnunet_mq_lib.h" |
48 | 48 | ||
49 | /** | ||
50 | * Largest supported message (to be precise, one byte more | ||
51 | * than the largest possible message, so tests involving | ||
52 | * this value should check for messages being smaller than | ||
53 | * this value). NOTE: legacy name. | ||
54 | */ | ||
55 | #define GNUNET_SERVER_MAX_MESSAGE_SIZE 65536 | ||
56 | |||
57 | /** | ||
58 | * Smallest supported message. NOTE: legacy name. | ||
59 | */ | ||
60 | #define GNUNET_SERVER_MIN_BUFFER_SIZE sizeof (struct GNUNET_MessageHeader) | ||
61 | |||
62 | /** | ||
63 | * Timeout we use on TCP connect before trying another | ||
64 | * result from the DNS resolver. Actual value used | ||
65 | * is this value divided by the number of address families. | ||
66 | * Default is 5s. NOTE: legacy name. | ||
67 | */ | ||
68 | #define GNUNET_CONNECTION_CONNECT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | ||
69 | |||
70 | 49 | ||
71 | /** | 50 | /** |
72 | * Options for the service (bitmask). | 51 | * Options for the service (bitmask). |
@@ -95,51 +74,6 @@ enum GNUNET_SERVICE_Options | |||
95 | 74 | ||
96 | 75 | ||
97 | 76 | ||
98 | |||
99 | /** | ||
100 | * Opaque handle for a service. | ||
101 | */ | ||
102 | struct GNUNET_SERVICE_Context; | ||
103 | |||
104 | |||
105 | /** | ||
106 | * Run a service startup sequence within an existing | ||
107 | * initialized system. | ||
108 | * | ||
109 | * @param service_name our service name | ||
110 | * @param cfg configuration to use | ||
111 | * @param options service options | ||
112 | * @return NULL on error, service handle | ||
113 | * @deprecated | ||
114 | */ | ||
115 | struct GNUNET_SERVICE_Context * | ||
116 | GNUNET_SERVICE_start (const char *service_name, | ||
117 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
118 | enum GNUNET_SERVICE_Options options); | ||
119 | |||
120 | |||
121 | /** | ||
122 | * Get the NULL-terminated array of listen sockets for this service. | ||
123 | * | ||
124 | * @param ctx service context to query | ||
125 | * @return NULL if there are no listen sockets, otherwise NULL-terminated | ||
126 | * array of listen sockets. | ||
127 | * @deprecated | ||
128 | */ | ||
129 | struct GNUNET_NETWORK_Handle *const * | ||
130 | GNUNET_SERVICE_get_listen_sockets (struct GNUNET_SERVICE_Context *ctx); | ||
131 | |||
132 | |||
133 | /** | ||
134 | * Stop a service that was started with #GNUNET_SERVICE_start. | ||
135 | * | ||
136 | * @param sctx the service context returned from the start function | ||
137 | * @deprecated | ||
138 | */ | ||
139 | void | ||
140 | GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx); | ||
141 | |||
142 | |||
143 | /* **************** NEW SERVICE API ********************** */ | 77 | /* **************** NEW SERVICE API ********************** */ |
144 | 78 | ||
145 | /** | 79 | /** |
@@ -218,7 +152,7 @@ typedef void | |||
218 | * dropped. Additionally, clients can be dropped at any time using | 152 | * dropped. Additionally, clients can be dropped at any time using |
219 | * #GNUNET_SERVICE_client_drop(). | 153 | * #GNUNET_SERVICE_client_drop(). |
220 | * | 154 | * |
221 | * The service must be stopped using #GNUNET_SERVICE_stoP(). | 155 | * The service must be stopped using #GNUNET_SERVICE_stop(). |
222 | * | 156 | * |
223 | * @param service_name name of the service to run | 157 | * @param service_name name of the service to run |
224 | * @param cfg configuration to use | 158 | * @param cfg configuration to use |
@@ -231,7 +165,7 @@ typedef void | |||
231 | * @return NULL on error | 165 | * @return NULL on error |
232 | */ | 166 | */ |
233 | struct GNUNET_SERVICE_Handle * | 167 | struct GNUNET_SERVICE_Handle * |
234 | GNUNET_SERVICE_starT (const char *service_name, | 168 | GNUNET_SERVICE_start (const char *service_name, |
235 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 169 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
236 | GNUNET_SERVICE_ConnectHandler connect_cb, | 170 | GNUNET_SERVICE_ConnectHandler connect_cb, |
237 | GNUNET_SERVICE_DisconnectHandler disconnect_cb, | 171 | GNUNET_SERVICE_DisconnectHandler disconnect_cb, |
@@ -240,12 +174,12 @@ GNUNET_SERVICE_starT (const char *service_name, | |||
240 | 174 | ||
241 | 175 | ||
242 | /** | 176 | /** |
243 | * Stops a service that was started with #GNUNET_SERVICE_starT(). | 177 | * Stops a service that was started with #GNUNET_SERVICE_start(). |
244 | * | 178 | * |
245 | * @param srv service to stop | 179 | * @param srv service to stop |
246 | */ | 180 | */ |
247 | void | 181 | void |
248 | GNUNET_SERVICE_stoP (struct GNUNET_SERVICE_Handle *srv); | 182 | GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Handle *srv); |
249 | 183 | ||
250 | 184 | ||
251 | /** | 185 | /** |
@@ -290,7 +224,7 @@ GNUNET_SERVICE_stoP (struct GNUNET_SERVICE_Handle *srv); | |||
290 | * @return 0 on success, non-zero on error | 224 | * @return 0 on success, non-zero on error |
291 | */ | 225 | */ |
292 | int | 226 | int |
293 | GNUNET_SERVICE_ruN_ (int argc, | 227 | GNUNET_SERVICE_run_ (int argc, |
294 | char *const *argv, | 228 | char *const *argv, |
295 | const char *service_name, | 229 | const char *service_name, |
296 | enum GNUNET_SERVICE_Options options, | 230 | enum GNUNET_SERVICE_Options options, |
@@ -366,7 +300,7 @@ GNUNET_SERVICE_ruN_ (int argc, | |||
366 | struct GNUNET_MQ_MessageHandler mh[] = { \ | 300 | struct GNUNET_MQ_MessageHandler mh[] = { \ |
367 | __VA_ARGS__ \ | 301 | __VA_ARGS__ \ |
368 | }; \ | 302 | }; \ |
369 | return GNUNET_SERVICE_ruN_ (argc, \ | 303 | return GNUNET_SERVICE_run_ (argc, \ |
370 | argv, \ | 304 | argv, \ |
371 | service_name, \ | 305 | service_name, \ |
372 | service_options, \ | 306 | service_options, \ |