aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2015-05-07 12:15:32 +0000
committerGabor X Toth <*@tg-x.net>2015-05-07 12:15:32 +0000
commita5edf8ac9f03a368c87ea6163994d4ac3d62af06 (patch)
tree4daeaa2561d3edf5c0a6f2298054970e27928a0b /src/include/gnunet_common.h
parent26dbd65eff8dc627697a1ee5c3b755c2951ac013 (diff)
downloadgnunet-a5edf8ac9f03a368c87ea6163994d4ac3d62af06.tar.gz
gnunet-a5edf8ac9f03a368c87ea6163994d4ac3d62af06.zip
client_manager: add API for async operations
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 880fc1fee..6a02190cc 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -248,6 +248,29 @@ struct GNUNET_MessageHeader
248 248
249}; 249};
250 250
251
252/**
253 * Answer from service to client about last operation.
254 */
255struct GNUNET_OperationResultMessage
256{
257 struct GNUNET_MessageHeader header;
258
259 uint32_t reserved GNUNET_PACKED;
260
261 /**
262 * Operation ID.
263 */
264 uint64_t op_id GNUNET_PACKED;
265
266 /**
267 * Status code for the operation.
268 */
269 uint64_t result_code GNUNET_PACKED;
270
271 /* Followed by data. */
272};
273
251GNUNET_NETWORK_STRUCT_END 274GNUNET_NETWORK_STRUCT_END
252 275
253/** 276/**
@@ -273,6 +296,23 @@ typedef void
273(*GNUNET_ContinuationCallback) (void *cls); 296(*GNUNET_ContinuationCallback) (void *cls);
274 297
275 298
299/**
300 * Function called with the result of an asynchronous operation.
301 *
302 * @param cls
303 * Closure.
304 * @param result_code
305 * Result code for the operation.
306 * @param data
307 * Data result for the operation.
308 * @param data_size
309 * Size of @a data.
310 */
311typedef void
312(*GNUNET_ResultCallback) (void *cls, int64_t result_code,
313 const void *data, uint16_t data_size);
314
315
276/* ****************************** logging ***************************** */ 316/* ****************************** logging ***************************** */
277 317
278/** 318/**