libraries were folded, fold headers as well

This commit is contained in:
Christian Grothoff 2020-01-18 14:24:55 +01:00
parent 5146d62b14
commit 5583b7a059
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
13 changed files with 157 additions and 191 deletions

View File

@ -30,7 +30,19 @@
</member>
<member kind="define">
<type>#define</type>
<name>MHD_OPTION_NOTIFY_COMPLETED</name>
<name>MHD_HTTP_GONE</name>
<anchorfile>microhttpd.h</anchorfile>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>MHD_HTTP_PRECONDITION_FAILED</name>
<anchorfile>microhttpd.h</anchorfile>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>MHD_HTTP_CONFLICT</name>
<anchorfile>microhttpd.h</anchorfile>
<arglist></arglist>
</member>

View File

@ -16,7 +16,6 @@ talerinclude_HEADERS = \
taler_exchangedb_plugin.h \
taler_fakebank_lib.h \
taler_json_lib.h \
taler_testing_auditor_lib.h \
taler_testing_lib.h \
taler_util.h \
taler_mhd_lib.h \

View File

@ -246,7 +246,7 @@ TALER_AUDITOR_deposit_confirmation (struct TALER_AUDITOR_Handle *auditor,
* Cancel a deposit-confirmation permission request. This function cannot be used
* on a request handle if a response is already served for it.
*
* @param deposit-confirmation the deposit-confirmation permission request handle
* @param deposit_confirmation the deposit-confirmation permission request handle
*/
void
TALER_AUDITOR_deposit_confirmation_cancel (struct
@ -316,10 +316,10 @@ TALER_AUDITOR_list_exchanges (struct TALER_AUDITOR_Handle *auditor,
/**
* Cancel a deposit-confirmation permission request. This function cannot be used
* Cancel a list exchanges request. This function cannot be used
* on a request handle if a response is already served for it.
*
* @param deposit-confirmation the deposit-confirmation permission request handle
* @param leh the list exchanges request handle
*/
void
TALER_AUDITOR_list_exchanges_cancel (struct

View File

@ -54,7 +54,7 @@ struct TALER_CURL_PostContext
* Add the @a body as POST data to the easy handle in
* @a ctx.
*
* @param ctx[in,out] a request context (updated)
* @param[in,out] ctx a request context (updated)
* @param eh easy handle to use
* @param body JSON body to add to @e ctx
* @return #GNUNET_OK on success #GNUNET_SYSERR on failure
@ -68,7 +68,7 @@ TALER_curl_easy_post (struct TALER_CURL_PostContext *ctx,
/**
* Free the data in @a ctx.
*
* @param ctx[in] a request context (updated)
* @param[in] ctx a request context (updated)
*/
void
TALER_curl_easy_post_finished (struct TALER_CURL_PostContext *ctx);

View File

@ -1543,7 +1543,7 @@ typedef void
/**
* Function called with information about the exchange's denomination keys.
*
* @parma cls closure
* @param cls closure
* @param denom_pub public key of the denomination
* @param issue detailed information about the denomination (value, expiration times, fees)
*/

View File

@ -204,7 +204,6 @@ TALER_MHD_reply_agpl (struct MHD_Connection *connection,
* Function to call to handle the request by sending
* back static data.
*
* @param rh context of the handler
* @param connection the MHD connection to handle
* @param http_status status code to return
* @param mime_type content-type to use

View File

@ -1,172 +0,0 @@
/*
This file is part of TALER
(C) 2018 Taler Systems SA
TALER is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3, or
(at your option) any later version.
TALER is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with TALER; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>
*/
/**
* @file include/taler_testing_auditor_lib.h
* @brief API for writing an interpreter to test Taler components
* @author Christian Grothoff <christian@grothoff.org>
* @author Marcello Stanisci
*/
#ifndef TALER_TESTING_AUDITOR_LIB_H
#define TALER_TESTING_AUDITOR_LIB_H
#include "taler_util.h"
#include "taler_exchange_service.h"
#include <gnunet/gnunet_json_lib.h>
#include "taler_json_lib.h"
#include <microhttpd.h>
/* ********************* Commands ********************* */
/**
* Make the "exec-auditor" CMD.
*
* @param label command label.
* @param config_filename configuration filename.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_auditor (const char *label,
const char *config_filename);
/**
* Make the "exec-auditor-dbinit" CMD. Always run with the "-r" option.
*
* @param label command label.
* @param config_filename configuration filename.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_auditor_dbinit (const char *label,
const char *config_filename);
/**
* Make the "exec wire-auditor" CMD.
*
* @param label command label.
* @param config_filename configuration filename.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_wire_auditor (const char *label,
const char *config_filename);
/**
* Create a "deposit-confirmation" command.
*
* @param label command label.
* @param auditor auditor connection.
* @param deposit_reference reference to any operation that can
* provide a coin.
* @param coin_index if @a deposit_reference offers an array of
* coins, this parameter selects which one in that array.
* This value is currently ignored, as only one-coin
* deposits are implemented.
* @param amount_without_fee deposited amount without the fee
* @param expected_response_code expected HTTP response code.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_deposit_confirmation (const char *label,
struct TALER_AUDITOR_Handle *auditor,
const char *deposit_reference,
unsigned int coin_index,
const char *amount_without_fee,
unsigned int expected_response_code);
/**
* Modify a deposit confirmation command to enable retries when we get
* transient errors from the auditor.
*
* @param cmd a deposit confirmation command
* @return the command with retries enabled
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_deposit_confirmation_with_retry (struct TALER_TESTING_Command
cmd);
/**
* Create a "list exchanges" command.
*
* @param label command label.
* @param auditor auditor connection.
* @param expected_response_code expected HTTP response code.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exchanges (const char *label,
struct TALER_AUDITOR_Handle *auditor,
unsigned int expected_response_code);
/**
* Create a "list exchanges" command and check whether
* a particular exchange belongs to the returned bundle.
*
* @param label command label.
* @param auditor auditor connection.
* @param expected_response_code expected HTTP response code.
* @param exchange_url URL of the exchange supposed to
* be included in the response.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exchanges_with_url (const char *label,
unsigned int expected_response_code,
const char *exchange_url);
/**
* Modify an exchanges command to enable retries when we get
* transient errors from the auditor.
*
* @param cmd a deposit confirmation command
* @return the command with retries enabled
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exchanges_with_retry (struct TALER_TESTING_Command cmd);
/* ********************* Helper functions ********************* */
/**
* Install signal handlers plus schedules the main wrapper
* around the "run" method.
*
* @param main_cb the "run" method which contains all the
* commands.
* @param main_cb_cls a closure for "run", typically NULL.
* @param config_filename configuration filename.
* @return #GNUNET_OK if all is okay, != #GNUNET_OK otherwise.
* non-GNUNET_OK codes are #GNUNET_SYSERR most of the
* times.
*/
int
TALER_TESTING_AUDITOR_setup (TALER_TESTING_Main main_cb,
void *main_cb_cls,
const char *config_filename);
#endif

View File

@ -656,6 +656,24 @@ TALER_TESTING_setup (TALER_TESTING_Main main_cb,
int exchange_connect);
/**
* Install signal handlers plus schedules the main wrapper
* around the "run" method.
*
* @param main_cb the "run" method which contains all the
* commands.
* @param main_cb_cls a closure for "run", typically NULL.
* @param config_filename configuration filename.
* @return #GNUNET_OK if all is okay, != #GNUNET_OK otherwise.
* non-GNUNET_OK codes are #GNUNET_SYSERR most of the
* times.
*/
int
TALER_TESTING_auditor_setup (TALER_TESTING_Main main_cb,
void *main_cb_cls,
const char *config_filename);
/**
* Closure for #TALER_TESTING_setup_with_exchange_cfg().
*/
@ -868,6 +886,119 @@ TALER_TESTING_cmd_transfer (const char *label,
const char *exchange_base_url);
/**
* Make the "exec-auditor" CMD.
*
* @param label command label.
* @param config_filename configuration filename.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_auditor (const char *label,
const char *config_filename);
/**
* Make the "exec-auditor-dbinit" CMD. Always run with the "-r" option.
*
* @param label command label.
* @param config_filename configuration filename.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_auditor_dbinit (const char *label,
const char *config_filename);
/**
* Make the "exec wire-auditor" CMD.
*
* @param label command label.
* @param config_filename configuration filename.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exec_wire_auditor (const char *label,
const char *config_filename);
/**
* Create a "deposit-confirmation" command.
*
* @param label command label.
* @param auditor auditor connection.
* @param deposit_reference reference to any operation that can
* provide a coin.
* @param coin_index if @a deposit_reference offers an array of
* coins, this parameter selects which one in that array.
* This value is currently ignored, as only one-coin
* deposits are implemented.
* @param amount_without_fee deposited amount without the fee
* @param expected_response_code expected HTTP response code.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_deposit_confirmation (const char *label,
struct TALER_AUDITOR_Handle *auditor,
const char *deposit_reference,
unsigned int coin_index,
const char *amount_without_fee,
unsigned int expected_response_code);
/**
* Modify a deposit confirmation command to enable retries when we get
* transient errors from the auditor.
*
* @param cmd a deposit confirmation command
* @return the command with retries enabled
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_deposit_confirmation_with_retry (struct TALER_TESTING_Command
cmd);
/**
* Create a "list exchanges" command.
*
* @param label command label.
* @param auditor auditor connection.
* @param expected_response_code expected HTTP response code.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exchanges (const char *label,
struct TALER_AUDITOR_Handle *auditor,
unsigned int expected_response_code);
/**
* Create a "list exchanges" command and check whether
* a particular exchange belongs to the returned bundle.
*
* @param label command label.
* @param auditor auditor connection.
* @param expected_response_code expected HTTP response code.
* @param exchange_url URL of the exchange supposed to
* be included in the response.
* @return the command.
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exchanges_with_url (const char *label,
unsigned int expected_response_code,
const char *exchange_url);
/**
* Modify an exchanges command to enable retries when we get
* transient errors from the auditor.
*
* @param cmd a deposit confirmation command
* @return the command with retries enabled
*/
struct TALER_TESTING_Command
TALER_TESTING_cmd_exchanges_with_retry (struct TALER_TESTING_Command cmd);
/* ***** Commands ONLY for testing (/admin-API) **** */
/**

View File

@ -383,7 +383,7 @@ TALER_AUDITOR_deposit_confirmation (struct TALER_AUDITOR_Handle *auditor,
* Cancel a deposit-confirmation permission request. This function cannot be used
* on a request handle if a response is already served for it.
*
* @param deposit-confirmation the deposit-confirmation permission request handle
* @param deposit_confirmation the deposit-confirmation permission request handle
*/
void
TALER_AUDITOR_deposit_confirmation_cancel (struct

View File

@ -224,10 +224,10 @@ TALER_AUDITOR_list_exchanges (struct TALER_AUDITOR_Handle *auditor,
/**
* Cancel a deposit-confirmation permission request. This function cannot be used
* Cancel a list exchanges request. This function cannot be used
* on a request handle if a response is already served for it.
*
* @param deposit-confirmation the deposit-confirmation permission request handle
* @param leh the list exchanges request handle
*/
void
TALER_AUDITOR_list_exchanges_cancel (struct

View File

@ -16,7 +16,6 @@
License along with TALER; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>
*/
/**
* @file lib/test_auditor_api.c
* @brief testcase to test auditor's HTTP API interface
@ -34,7 +33,7 @@
#include "taler_bank_service.h"
#include "taler_fakebank_lib.h"
#include "taler_testing_lib.h"
#include "taler_testing_auditor_lib.h"
/**
* Configuration file we use. One (big) configuration is used
@ -695,7 +694,7 @@ main (int argc,
* start/stop the exchange. It calls TALER_TESTING_setup
* which creates the 'is' object.
*/
TALER_TESTING_AUDITOR_setup (&run,
TALER_TESTING_auditor_setup (&run,
NULL,
CONFIG_FILE))
return 1;

View File

@ -16,7 +16,6 @@
License along with TALER; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>
*/
/**
* @file lib/test_auditor_api_version.c
* @brief testcase to test auditor's HTTP API interface to fetch /version
@ -34,7 +33,7 @@
#include "taler_bank_service.h"
#include "taler_fakebank_lib.h"
#include "taler_testing_lib.h"
#include "taler_testing_auditor_lib.h"
/**
* Configuration file we use. One (big) configuration is used

View File

@ -25,7 +25,6 @@
#include "taler_json_lib.h"
#include <gnunet/gnunet_curl_lib.h>
#include "taler_testing_lib.h"
#include "taler_testing_auditor_lib.h"
#include "taler_auditor_service.h"
@ -212,7 +211,7 @@ setup_with_cfg (void *cls,
* times.
*/
int
TALER_TESTING_AUDITOR_setup (TALER_TESTING_Main main_cb,
TALER_TESTING_auditor_setup (TALER_TESTING_Main main_cb,
void *main_cb_cls,
const char *config_filename)
{