aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct/scalarproduct_api.c
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-10-14 13:00:11 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-10-14 13:00:11 +0000
commitba5f1e5d05604ab91319aa1d7260ba7cd8a03b99 (patch)
tree26c9d13e2f62b9cb42b9e9c6e7071e5e51365100 /src/scalarproduct/scalarproduct_api.c
parente9dda4933275bc7e260981a8757ba8803c585907 (diff)
downloadgnunet-ba5f1e5d05604ab91319aa1d7260ba7cd8a03b99.tar.gz
gnunet-ba5f1e5d05604ab91319aa1d7260ba7cd8a03b99.zip
more work on doxygenization for SP
Diffstat (limited to 'src/scalarproduct/scalarproduct_api.c')
-rw-r--r--src/scalarproduct/scalarproduct_api.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/scalarproduct/scalarproduct_api.c b/src/scalarproduct/scalarproduct_api.c
index 0f8a409cc..96b176080 100644
--- a/src/scalarproduct/scalarproduct_api.c
+++ b/src/scalarproduct/scalarproduct_api.c
@@ -95,6 +95,9 @@ struct GNUNET_SCALARPRODUCT_ComputationHandle
95 */ 95 */
96 struct GNUNET_SCALARPRODUCT_client_request * msg; 96 struct GNUNET_SCALARPRODUCT_client_request * msg;
97 97
98 /**
99 * The msg handler callback
100 */
98 union 101 union
99 { 102 {
100 /** 103 /**
@@ -145,11 +148,11 @@ GNUNET_SCALARPRODUCT_cancel (struct GNUNET_SCALARPRODUCT_ComputationHandle * h);
145 148
146 149
147/** 150/**
148 * Handles the RESULT received in reply of prepare_response from the 151 * Handles the STATUS received from the service for a response, does not contain a payload
149 * service
150 * 152 *
151 * @param cls Handle to the Master Context 153 * @param cls our Handle
152 * @param msg Pointer to the response received 154 * @param msg Pointer to the response received
155 * @param status the condition the request was terminated with (eg: disconnect)
153 */ 156 */
154static void 157static void
155process_status_message (void *cls, 158process_status_message (void *cls,
@@ -163,11 +166,11 @@ process_status_message (void *cls,
163 166
164 167
165/** 168/**
166 * Handles the RESULT received in reply of prepare_response from the 169 * Handles the RESULT received from the service for a request, should contain a result MPI value
167 * service
168 * 170 *
169 * @param cls Handle to the Master Context 171 * @param cls our Handle
170 * @param msg Pointer to the response received 172 * @param msg Pointer to the response received
173 * @param status the condition the request was terminated with (eg: disconnect)
171 */ 174 */
172static void 175static void
173process_result_message (void *cls, 176process_result_message (void *cls,
@@ -212,7 +215,7 @@ process_result_message (void *cls,
212 215
213 216
214/** 217/**
215 * Called when a response is received from the service. After basic check 218 * Called when a response is received from the service. After basic check, the
216 * handler in qe->response_proc is called. This functions handles the response 219 * handler in qe->response_proc is called. This functions handles the response
217 * to the client which used the API. 220 * to the client which used the API.
218 * 221 *
@@ -255,7 +258,7 @@ receive_cb (void *cls, const struct GNUNET_MessageHeader *msg)
255 258
256 259
257/** 260/**
258 * Transmits the request to the VectorProduct Sevice 261 * Transmits the request to the VectorProduct Service
259 * 262 *
260 * @param cls Closure 263 * @param cls Closure
261 * @param size Size of the buffer 264 * @param size Size of the buffer
@@ -309,8 +312,8 @@ transmit_request (void *cls, size_t size,
309/** 312/**
310 * Used by Bob's client to cooperate with Alice, 313 * Used by Bob's client to cooperate with Alice,
311 * 314 *
312 * @param h handle to the master context 315 * @param cfg the gnunet configuration handle
313 * @param key Session key - unique to the requesting client 316 * @param key Session key unique to the requesting client
314 * @param elements Array of elements of the vector 317 * @param elements Array of elements of the vector
315 * @param element_count Number of elements in the vector 318 * @param element_count Number of elements in the vector
316 * @param cont Callback function 319 * @param cont Callback function
@@ -394,8 +397,8 @@ GNUNET_SCALARPRODUCT_response (const struct GNUNET_CONFIGURATION_Handle *cfg,
394/** 397/**
395 * Request by Alice's client for computing a scalar product 398 * Request by Alice's client for computing a scalar product
396 * 399 *
397 * @param h handle to the master context 400 * @param cfg the gnunet configuration handle
398 * @param key Session key - unique to the requesting client 401 * @param key Session key should be unique to the requesting client
399 * @param peer PeerID of the other peer 402 * @param peer PeerID of the other peer
400 * @param elements Array of elements of the vector 403 * @param elements Array of elements of the vector
401 * @param element_count Number of elements in the vector 404 * @param element_count Number of elements in the vector
@@ -488,9 +491,10 @@ GNUNET_SCALARPRODUCT_request (const struct GNUNET_CONFIGURATION_Handle *cfg,
488 491
489 492
490/** 493/**
491 * Disconnect from the scalarproduct service. 494 * Cancel an ongoing computation or revoke our collaboration offer.
495 * Closes the connection to the service
492 * 496 *
493 * @param h a computation handle to cancel 497 * @param h computation handle to terminate
494 */ 498 */
495void 499void
496GNUNET_SCALARPRODUCT_cancel (struct GNUNET_SCALARPRODUCT_ComputationHandle * h) 500GNUNET_SCALARPRODUCT_cancel (struct GNUNET_SCALARPRODUCT_ComputationHandle * h)
@@ -513,7 +517,7 @@ GNUNET_SCALARPRODUCT_cancel (struct GNUNET_SCALARPRODUCT_ComputationHandle * h)
513 } 517 }
514} 518}
515/** 519/**
516 * Cancel ALL our ongoing scalar product computations and collaboration offers. 520 * Cancel ALL ongoing computation or revoke our collaboration offer.
517 * Closes ALL connections to the service 521 * Closes ALL connections to the service
518 */ 522 */
519void 523void