summaryrefslogtreecommitdiff
path: root/src/exchange-lib/testing_api_cmd_status.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-05-28 13:45:19 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-05-28 13:45:19 +0200
commit25ca8f90ad56bc5ccd76e2fc019feb85310ce2f2 (patch)
tree57265d4256d6abbde4daf50d76d9527b7b480057 /src/exchange-lib/testing_api_cmd_status.c
parent26be8717c53dcc1f06214d8226df3d5249e7250b (diff)
downloadexchange-25ca8f90ad56bc5ccd76e2fc019feb85310ce2f2.tar.gz
exchange-25ca8f90ad56bc5ccd76e2fc019feb85310ce2f2.tar.bz2
exchange-25ca8f90ad56bc5ccd76e2fc019feb85310ce2f2.zip
Commenting the "reserve status" CMD.
Diffstat (limited to 'src/exchange-lib/testing_api_cmd_status.c')
-rw-r--r--src/exchange-lib/testing_api_cmd_status.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/exchange-lib/testing_api_cmd_status.c b/src/exchange-lib/testing_api_cmd_status.c
index 2107b753a..1e5f6710d 100644
--- a/src/exchange-lib/testing_api_cmd_status.c
+++ b/src/exchange-lib/testing_api_cmd_status.c
@@ -27,6 +27,10 @@
#include "exchange_api_handle.h"
#include "taler_testing_lib.h"
+
+/**
+ * State for a "status" CMD.
+ */
struct StatusState
{
/**
@@ -36,7 +40,7 @@ struct StatusState
const char *reserve_reference;
/**
- * Handle to a /reserve/status operation.
+ * Handle to the "reserve status" operation.
*/
struct TALER_EXCHANGE_ReserveStatusHandle *rsh;
@@ -51,7 +55,7 @@ struct StatusState
unsigned int expected_response_code;
/**
- * Handle to the exchange.
+ * Connection handle to the exchange.
*/
struct TALER_EXCHANGE_Handle *exchange;
@@ -63,19 +67,16 @@ struct StatusState
/**
- * Check exchange returned expected values.
+ * Check that the reserve balance and HTTP response code are
+ * both acceptable.
*
- * @param cls closure
- * @param http_status HTTP response code, #MHD_HTTP_OK (200) for
- * successful status request 0 if the exchange's reply is
- * bogus (fails to follow the protocol)
- * @param ec taler-specific error code, #TALER_EC_NONE on success
- * @param[in] json original response in JSON format (useful only
- * for diagnostics)
- * @param balance current balance in the reserve, NULL on error
+ * @param cls closure.
+ * @param http_status HTTP response code.
+ * @param ec taler-specific error code.
+ * @param balance current balance in the reserve, NULL on error.
* @param history_length number of entries in the transaction
- * history, 0 on error
- * @param history detailed transaction history, NULL on error
+ * history, 0 on error.
+ * @param history detailed transaction history, NULL on error.
*/
static void
reserve_status_cb
@@ -136,9 +137,9 @@ reserve_status_cb
/**
* Run the command.
*
- * @param cls closure, typically a #struct WireState.
- * @param cmd the command to execute, a /wire one.
- * @param i the interpreter state.
+ * @param cls closure.
+ * @param cmd the command being executed.
+ * @param is the interpreter state.
*/
static void
status_run (void *cls,
@@ -185,9 +186,10 @@ status_run (void *cls,
/**
- * Cleanup the state.
+ * Cleanup the state from a "reserve status" CMD, and possibly
+ * cancel a pending operation thereof.
*
- * @param cls closure, typically a #struct WireState.
+ * @param cls closure.
* @param cmd the command which is being cleaned up.
*/
static void
@@ -210,15 +212,15 @@ status_cleanup (void *cls,
/**
- * Create a /reserve/status command.
+ * Create a "reserve status" command.
*
* @param label the command label.
* @param exchange the exchange to connect to.
* @param reserve_reference reference to the reserve to check.
- * @param expected_balance balance expected to be at the referenced reserve.
+ * @param expected_balance expected balance for the reserve.
* @param expected_response_code expected HTTP response code.
*
- * @return the command to be executed by the interpreter.
+ * @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_status (const char *label,