diff options
author | Fournier Nicolas <nicolas.fournier@ensta-paristech.fr> | 2015-06-30 09:23:04 +0200 |
---|---|---|
committer | Fournier Nicolas <nicolas.fournier@ensta-paristech.fr> | 2015-06-30 09:23:04 +0200 |
commit | 582e623b13457f372f22edd8d8c1c99d26e07626 (patch) | |
tree | 093fbd5e45329c40c204a844c0317e3f3ced7306 /src/mintdb/perf_taler_mintdb_interpreter.h | |
parent | c023cdc96a18026fd2eb84f8c7b2f9ad621192eb (diff) | |
download | exchange-582e623b13457f372f22edd8d8c1c99d26e07626.tar.gz exchange-582e623b13457f372f22edd8d8c1c99d26e07626.tar.bz2 exchange-582e623b13457f372f22edd8d8c1c99d26e07626.zip |
initialization of the database
Diffstat (limited to 'src/mintdb/perf_taler_mintdb_interpreter.h')
-rw-r--r-- | src/mintdb/perf_taler_mintdb_interpreter.h | 74 |
1 files changed, 42 insertions, 32 deletions
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.h b/src/mintdb/perf_taler_mintdb_interpreter.h index 9f7ee4207..b69e39ebe 100644 --- a/src/mintdb/perf_taler_mintdb_interpreter.h +++ b/src/mintdb/perf_taler_mintdb_interpreter.h @@ -38,7 +38,7 @@ /** - * + * Prints @ _label to stdout */ #define PERF_TALER_MINTDB_INIT_CMD_DEBUG(_label) \ { \ @@ -86,6 +86,10 @@ /** * Commits the duration between @a _label_start and @a _label_stop * to Gauger with @a _description explaining + * @param _label_start label of the start of the measurment + * @param _label_stop label of the end of the measurment + * @param _description description of the measure displayed in gauger + * @param _divide number of measurments in the interval */ #define PERF_TALER_MINTDB_INIT_CMD_GAUGER(_label, _label_start, _label_stop, _description, _divide) \ { \ @@ -151,27 +155,26 @@ .label_save = _label_save \ } \ } + /** - * Insert a deposit into the database + * Inserts informations about a denomination key in the database */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT(_label, _label_dki) \ +#define PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION(_label) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT,\ + .command = PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION, \ .label = _label, \ - .exposed_type = PERF_TALER_MINTDB_DEPOSIT, \ - .details.insert_deposit.label_dki = _label_dki, \ + .exposed_type = PERF_TALER_MINTDB_DENOMINATION_INFO, \ } /** - * Check if a deposit is in the database - * @param _label_deposit Label of the deposit to use + * Polls the database about informations regarding a specific denomination key */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT(_label, _label_deposit) \ +#define PERF_TALER_MINTDB_INIT_CMD_GET_DENOMINATION(_label, _label_source) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_DEPOSIT, \ + .command = PERF_TALER_MINTDB_CMD_GET_DENOMINATION, \ .label = _label, \ .exposed_type = PERF_TALER_MINTDB_NONE, \ - .details.get_deposit.label_source = _label_deposit \ + .details.get_denomination.label_source = _label_source, \ } /** @@ -199,50 +202,57 @@ /** - * Inserts informations about a withdrawal in the database + * Insert a deposit into the database + * @param _label_dki source to use for the denomination key */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW(_label, _label_dki, _label_reserve) \ +#define PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT(_label, _label_dki) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW, \ + .command = PERF_TALER_MINTDB_CMD_INSERT_DEPOSIT,\ .label = _label, \ - .exposed_type = PERF_TALER_MINTDB_BLINDCOIN, \ - .details.insert_withdraw = {\ - .label_dki = _label_dki, \ - .label.reserve = _label_reserve, \ - } \ -}\ + .exposed_type = PERF_TALER_MINTDB_DEPOSIT, \ + .details.insert_deposit.label_dki = _label_dki, \ +} /** - * Polls the database about informations regarding a secific withdrawal + * Check if a deposit is in the database + * @param _label_deposit Label of the deposit to use */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW(_label, _label_source) \ +#define PERF_TALER_MINTDB_INIT_CMD_GET_DEPOSIT(_label, _label_deposit) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_WITHDRAW, \ + .command = PERF_TALER_MINTDB_CMD_GET_DEPOSIT, \ .label = _label, \ .exposed_type = PERF_TALER_MINTDB_NONE, \ - .details.get_withdraw.label_source = _label_source, \ + .details.get_deposit.label_source = _label_deposit \ } + /** - * Inserts informations about a denomination key in the database + * Inserts informations about a withdrawal in the database + * @param _label_dki denomination key used to sign the coin + * @param _label_reserve reserve used to emmit the coin */ -#define PERF_TALER_MINTDB_INIT_CMD_INSERT_DENOMINATION(_label) \ +#define PERF_TALER_MINTDB_INIT_CMD_INSERT_WITHDRAW(_label, _label_dki, _label_reserve) \ { \ - .command = PERF_TALER_MINTDB_CMD_INSERT_DENOMINATION, \ + .command = PERF_TALER_MINTDB_CMD_INSERT_WITHDRAW, \ .label = _label, \ - .exposed_type = PERF_TALER_MINTDB_DENOMINATION_INFO, \ + .exposed_type = PERF_TALER_MINTDB_BLINDCOIN, \ + .details.insert_withdraw = {\ + .label_dki = _label_dki, \ + .label_reserve = _label_reserve, \ + } \ } + /** - * Polls the database about informations regarding a specific denomination key + * Polls the database about informations regarding a secific withdrawal */ -#define PERF_TALER_MINTDB_INIT_CMD_GET_DENOMINATION(_label, _label_source) \ +#define PERF_TALER_MINTDB_INIT_CMD_GET_WITHDRAW(_label, _label_source) \ { \ - .command = PERF_TALER_MINTDB_CMD_GET_DENOMINATION, \ + .command = PERF_TALER_MINTDB_CMD_GET_WITHDRAW, \ .label = _label, \ .exposed_type = PERF_TALER_MINTDB_NONE, \ - .details.get_denomination.label_source = _label_source, \ + .details.get_withdraw.label_source = _label_source, \ } |