diff options
Diffstat (limited to 'src/include/gnunet_scalarproduct_service.h')
-rw-r--r-- | src/include/gnunet_scalarproduct_service.h | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/src/include/gnunet_scalarproduct_service.h b/src/include/gnunet_scalarproduct_service.h index 512d72260..b12a19a2f 100644 --- a/src/include/gnunet_scalarproduct_service.h +++ b/src/include/gnunet_scalarproduct_service.h | |||
@@ -49,7 +49,8 @@ extern "C" { | |||
49 | /** | 49 | /** |
50 | * Result status values for the computation. | 50 | * Result status values for the computation. |
51 | */ | 51 | */ |
52 | enum GNUNET_SCALARPRODUCT_ResponseStatus { | 52 | enum GNUNET_SCALARPRODUCT_ResponseStatus |
53 | { | ||
53 | /** | 54 | /** |
54 | * Operation is still active (never returned, used internally). | 55 | * Operation is still active (never returned, used internally). |
55 | */ | 56 | */ |
@@ -93,7 +94,8 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
93 | /** | 94 | /** |
94 | * An element key-value pair for scalarproduct | 95 | * An element key-value pair for scalarproduct |
95 | */ | 96 | */ |
96 | struct GNUNET_SCALARPRODUCT_Element { | 97 | struct GNUNET_SCALARPRODUCT_Element |
98 | { | ||
97 | /** | 99 | /** |
98 | * Key used to identify matching pairs of values to multiply. | 100 | * Key used to identify matching pairs of values to multiply. |
99 | */ | 101 | */ |
@@ -117,7 +119,9 @@ GNUNET_NETWORK_STRUCT_END | |||
117 | */ | 119 | */ |
118 | typedef void | 120 | typedef void |
119 | (*GNUNET_SCALARPRODUCT_ContinuationWithStatus) (void *cls, | 121 | (*GNUNET_SCALARPRODUCT_ContinuationWithStatus) (void *cls, |
120 | enum GNUNET_SCALARPRODUCT_ResponseStatus status); | 122 | enum |
123 | GNUNET_SCALARPRODUCT_ResponseStatus | ||
124 | status); | ||
121 | 125 | ||
122 | 126 | ||
123 | /** | 127 | /** |
@@ -129,7 +133,8 @@ typedef void | |||
129 | */ | 133 | */ |
130 | typedef void | 134 | typedef void |
131 | (*GNUNET_SCALARPRODUCT_DatumProcessor) (void *cls, | 135 | (*GNUNET_SCALARPRODUCT_DatumProcessor) (void *cls, |
132 | enum GNUNET_SCALARPRODUCT_ResponseStatus status, | 136 | enum GNUNET_SCALARPRODUCT_ResponseStatus |
137 | status, | ||
133 | gcry_mpi_t result); | 138 | gcry_mpi_t result); |
134 | 139 | ||
135 | 140 | ||
@@ -152,13 +157,16 @@ struct GNUNET_SCALARPRODUCT_ComputationHandle; | |||
152 | * @return a new handle for this computation | 157 | * @return a new handle for this computation |
153 | */ | 158 | */ |
154 | struct GNUNET_SCALARPRODUCT_ComputationHandle * | 159 | struct GNUNET_SCALARPRODUCT_ComputationHandle * |
155 | GNUNET_SCALARPRODUCT_start_computation(const struct GNUNET_CONFIGURATION_Handle *cfg, | 160 | GNUNET_SCALARPRODUCT_start_computation (const struct |
156 | const struct GNUNET_HashCode *session_key, | 161 | GNUNET_CONFIGURATION_Handle *cfg, |
157 | const struct GNUNET_PeerIdentity *peer, | 162 | const struct |
158 | const struct GNUNET_SCALARPRODUCT_Element *elements, | 163 | GNUNET_HashCode *session_key, |
159 | uint32_t element_count, | 164 | const struct GNUNET_PeerIdentity *peer, |
160 | GNUNET_SCALARPRODUCT_DatumProcessor cont, | 165 | const struct |
161 | void *cont_cls); | 166 | GNUNET_SCALARPRODUCT_Element *elements, |
167 | uint32_t element_count, | ||
168 | GNUNET_SCALARPRODUCT_DatumProcessor cont, | ||
169 | void *cont_cls); | ||
162 | 170 | ||
163 | 171 | ||
164 | /** | 172 | /** |
@@ -173,12 +181,15 @@ GNUNET_SCALARPRODUCT_start_computation(const struct GNUNET_CONFIGURATION_Handle | |||
173 | * @return a new handle for this computation | 181 | * @return a new handle for this computation |
174 | */ | 182 | */ |
175 | struct GNUNET_SCALARPRODUCT_ComputationHandle * | 183 | struct GNUNET_SCALARPRODUCT_ComputationHandle * |
176 | GNUNET_SCALARPRODUCT_accept_computation(const struct GNUNET_CONFIGURATION_Handle *cfg, | 184 | GNUNET_SCALARPRODUCT_accept_computation (const struct |
177 | const struct GNUNET_HashCode *key, | 185 | GNUNET_CONFIGURATION_Handle *cfg, |
178 | const struct GNUNET_SCALARPRODUCT_Element *elements, | 186 | const struct GNUNET_HashCode *key, |
179 | uint32_t element_count, | 187 | const struct |
180 | GNUNET_SCALARPRODUCT_ContinuationWithStatus cont, | 188 | GNUNET_SCALARPRODUCT_Element *elements, |
181 | void *cont_cls); | 189 | uint32_t element_count, |
190 | GNUNET_SCALARPRODUCT_ContinuationWithStatus | ||
191 | cont, | ||
192 | void *cont_cls); | ||
182 | 193 | ||
183 | 194 | ||
184 | /** | 195 | /** |
@@ -188,7 +199,7 @@ GNUNET_SCALARPRODUCT_accept_computation(const struct GNUNET_CONFIGURATION_Handle | |||
188 | * @param h computation handle to terminate | 199 | * @param h computation handle to terminate |
189 | */ | 200 | */ |
190 | void | 201 | void |
191 | GNUNET_SCALARPRODUCT_cancel(struct GNUNET_SCALARPRODUCT_ComputationHandle *h); | 202 | GNUNET_SCALARPRODUCT_cancel (struct GNUNET_SCALARPRODUCT_ComputationHandle *h); |
192 | 203 | ||
193 | 204 | ||
194 | #if 0 /* keep Emacsens' auto-indent happy */ | 205 | #if 0 /* keep Emacsens' auto-indent happy */ |