diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-21 19:07:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-21 19:07:03 +0000 |
commit | 7262f6743a026cf110d3aedc7e39951280d65fa1 (patch) | |
tree | 6e48d45fafe9dc0da62d23cee31ae4cc37b109ac /src/include/gnunet_namecache_service.h | |
parent | 3d7b29ec1c5d1c2de96cf4c9badaa112e86ef899 (diff) | |
download | gnunet-7262f6743a026cf110d3aedc7e39951280d65fa1.tar.gz gnunet-7262f6743a026cf110d3aedc7e39951280d65fa1.zip |
convert namecache to new MQ API
Diffstat (limited to 'src/include/gnunet_namecache_service.h')
-rw-r--r-- | src/include/gnunet_namecache_service.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/include/gnunet_namecache_service.h b/src/include/gnunet_namecache_service.h index a6d293575..2c4ca29c3 100644 --- a/src/include/gnunet_namecache_service.h +++ b/src/include/gnunet_namecache_service.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | Copyright (C) 2012, 2013 GNUnet e.V. | 3 | Copyright (C) 2012, 2013, 2016 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 |
@@ -98,9 +98,10 @@ GNUNET_NAMECACHE_disconnect (struct GNUNET_NAMECACHE_Handle *h); | |||
98 | * #GNUNET_YES (or other positive value) on success | 98 | * #GNUNET_YES (or other positive value) on success |
99 | * @param emsg NULL on success, otherwise an error message | 99 | * @param emsg NULL on success, otherwise an error message |
100 | */ | 100 | */ |
101 | typedef void (*GNUNET_NAMECACHE_ContinuationWithStatus) (void *cls, | 101 | typedef void |
102 | int32_t success, | 102 | (*GNUNET_NAMECACHE_ContinuationWithStatus) (void *cls, |
103 | const char *emsg); | 103 | int32_t success, |
104 | const char *emsg); | ||
104 | 105 | ||
105 | 106 | ||
106 | 107 | ||
@@ -112,7 +113,7 @@ typedef void (*GNUNET_NAMECACHE_ContinuationWithStatus) (void *cls, | |||
112 | * @param block block to store | 113 | * @param block block to store |
113 | * @param cont continuation to call when done | 114 | * @param cont continuation to call when done |
114 | * @param cont_cls closure for @a cont | 115 | * @param cont_cls closure for @a cont |
115 | * @return handle to abort the request | 116 | * @return handle to abort the request, NULL on error |
116 | */ | 117 | */ |
117 | struct GNUNET_NAMECACHE_QueueEntry * | 118 | struct GNUNET_NAMECACHE_QueueEntry * |
118 | GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, | 119 | GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, |
@@ -127,8 +128,9 @@ GNUNET_NAMECACHE_block_cache (struct GNUNET_NAMECACHE_Handle *h, | |||
127 | * @param cls closure | 128 | * @param cls closure |
128 | * @param block block that was stored in the namecache | 129 | * @param block block that was stored in the namecache |
129 | */ | 130 | */ |
130 | typedef void (*GNUNET_NAMECACHE_BlockProcessor) (void *cls, | 131 | typedef void |
131 | const struct GNUNET_GNSRECORD_Block *block); | 132 | (*GNUNET_NAMECACHE_BlockProcessor) (void *cls, |
133 | const struct GNUNET_GNSRECORD_Block *block); | ||
132 | 134 | ||
133 | 135 | ||
134 | /** | 136 | /** |
@@ -141,12 +143,13 @@ typedef void (*GNUNET_NAMECACHE_BlockProcessor) (void *cls, | |||
141 | * @param proc function to call on the matching block, or with | 143 | * @param proc function to call on the matching block, or with |
142 | * NULL if there is no matching block | 144 | * NULL if there is no matching block |
143 | * @param proc_cls closure for @a proc | 145 | * @param proc_cls closure for @a proc |
144 | * @return a handle that can be used to cancel | 146 | * @return a handle that can be used to cancel, NULL on error |
145 | */ | 147 | */ |
146 | struct GNUNET_NAMECACHE_QueueEntry * | 148 | struct GNUNET_NAMECACHE_QueueEntry * |
147 | GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h, | 149 | GNUNET_NAMECACHE_lookup_block (struct GNUNET_NAMECACHE_Handle *h, |
148 | const struct GNUNET_HashCode *derived_hash, | 150 | const struct GNUNET_HashCode *derived_hash, |
149 | GNUNET_NAMECACHE_BlockProcessor proc, void *proc_cls); | 151 | GNUNET_NAMECACHE_BlockProcessor proc, |
152 | void *proc_cls); | ||
150 | 153 | ||
151 | 154 | ||
152 | /** | 155 | /** |