diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-04-24 11:48:31 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-04-24 11:48:31 +0000 |
commit | 9113520987972a798a23d1d21544d8ec4daa078c (patch) | |
tree | 178a1bca3b9083d554de20227cd0a8f1190c958c /src/include/gnunet_set_service.h | |
parent | 6a9bc072e64367297498b93cd6d975995203d2e9 (diff) | |
download | gnunet-9113520987972a798a23d1d21544d8ec4daa078c.tar.gz gnunet-9113520987972a798a23d1d21544d8ec4daa078c.zip |
started implementing union operation for set
Diffstat (limited to 'src/include/gnunet_set_service.h')
-rw-r--r-- | src/include/gnunet_set_service.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h index cf782c841..87d766c68 100644 --- a/src/include/gnunet_set_service.h +++ b/src/include/gnunet_set_service.h | |||
@@ -63,11 +63,6 @@ struct GNUNET_SET_OperationHandle; | |||
63 | 63 | ||
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Opaque handle to a listen operation. | ||
67 | */ | ||
68 | struct GNUNET_SET_ListenHandle; | ||
69 | |||
70 | /** | ||
71 | * The operation that a set set supports. | 66 | * The operation that a set set supports. |
72 | */ | 67 | */ |
73 | enum GNUNET_SET_OperationType | 68 | enum GNUNET_SET_OperationType |
@@ -135,10 +130,12 @@ struct GNUNET_SET_Element | |||
135 | * Number of bytes in the buffer pointed to by data. | 130 | * Number of bytes in the buffer pointed to by data. |
136 | */ | 131 | */ |
137 | uint16_t size; | 132 | uint16_t size; |
133 | |||
138 | /** | 134 | /** |
139 | * Application-specific element type. | 135 | * Application-specific element type. |
140 | */ | 136 | */ |
141 | uint16_t type; | 137 | uint16_t type; |
138 | |||
142 | /** | 139 | /** |
143 | * Actual data of the element | 140 | * Actual data of the element |
144 | */ | 141 | */ |
@@ -153,6 +150,7 @@ struct GNUNET_SET_Element | |||
153 | */ | 150 | */ |
154 | typedef void (*GNUNET_SET_Continuation) (void *cls); | 151 | typedef void (*GNUNET_SET_Continuation) (void *cls); |
155 | 152 | ||
153 | |||
156 | /** | 154 | /** |
157 | * Callback for set operation results. Called for each element | 155 | * Callback for set operation results. Called for each element |
158 | * in the result set. | 156 | * in the result set. |
@@ -161,10 +159,9 @@ typedef void (*GNUNET_SET_Continuation) (void *cls); | |||
161 | * @param element a result element, only valid if status is GNUNET_SET_STATUS_OK | 159 | * @param element a result element, only valid if status is GNUNET_SET_STATUS_OK |
162 | * @param status see enum GNUNET_SET_Status | 160 | * @param status see enum GNUNET_SET_Status |
163 | */ | 161 | */ |
164 | typedef void | 162 | typedef void (*GNUNET_SET_ResultIterator) (void *cls, |
165 | (*GNUNET_SET_ResultIterator) (void *cls, | 163 | struct GNUNET_SET_Element *element, |
166 | struct GNUNET_SET_Element *element, | 164 | enum GNUNET_SET_Status status); |
167 | enum GNUNET_SET_Status status); | ||
168 | 165 | ||
169 | 166 | ||
170 | /** | 167 | /** |
@@ -201,7 +198,7 @@ typedef void | |||
201 | * @return a handle to the set | 198 | * @return a handle to the set |
202 | */ | 199 | */ |
203 | struct GNUNET_SET_Handle * | 200 | struct GNUNET_SET_Handle * |
204 | GNUNET_SET_create (struct GNUNET_CONFIGURATION_Handle *cfg, | 201 | GNUNET_SET_create (const struct GNUNET_CONFIGURATION_Handle *cfg, |
205 | enum GNUNET_SET_OperationType op); | 202 | enum GNUNET_SET_OperationType op); |
206 | 203 | ||
207 | 204 | ||
@@ -270,8 +267,6 @@ GNUNET_SET_evaluate (struct GNUNET_SET_Handle *set, | |||
270 | void *result_cls); | 267 | void *result_cls); |
271 | 268 | ||
272 | 269 | ||
273 | |||
274 | |||
275 | /** | 270 | /** |
276 | * Wait for set operation requests for the given application id | 271 | * Wait for set operation requests for the given application id |
277 | * | 272 | * |
@@ -285,7 +280,7 @@ GNUNET_SET_evaluate (struct GNUNET_SET_Handle *set, | |||
285 | * @return a handle that can be used to cancel the listen operation | 280 | * @return a handle that can be used to cancel the listen operation |
286 | */ | 281 | */ |
287 | struct GNUNET_SET_ListenHandle * | 282 | struct GNUNET_SET_ListenHandle * |
288 | GNUNET_SET_listen (struct GNUNET_CONFIGURATION_Handle *cfg, | 283 | GNUNET_SET_listen (const struct GNUNET_CONFIGURATION_Handle *cfg, |
289 | enum GNUNET_SET_OperationType op_type, | 284 | enum GNUNET_SET_OperationType op_type, |
290 | const struct GNUNET_HashCode *app_id, | 285 | const struct GNUNET_HashCode *app_id, |
291 | GNUNET_SET_ListenCallback listen_cb, | 286 | GNUNET_SET_ListenCallback listen_cb, |