diff options
author | Fournier Nicolas <nicolas.fournier@ensta-paristech.fr> | 2015-07-23 16:10:49 +0200 |
---|---|---|
committer | Fournier Nicolas <nicolas.fournier@ensta-paristech.fr> | 2015-07-23 16:10:49 +0200 |
commit | 663fa898f5a94c19e702a1263af85dd7d84f31f6 (patch) | |
tree | 47fc8c0d4ff0daf1da05b026bca094199cc08c9f /src/mintdb/perf_taler_mintdb_interpreter.c | |
parent | 00fb066842c8413aa343777eb320c6d011b9080a (diff) | |
download | exchange-663fa898f5a94c19e702a1263af85dd7d84f31f6.tar.xz |
Initial work for more commands
Diffstat (limited to 'src/mintdb/perf_taler_mintdb_interpreter.c')
-rw-r--r-- | src/mintdb/perf_taler_mintdb_interpreter.c | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.c b/src/mintdb/perf_taler_mintdb_interpreter.c index 30403a628..87bc1c4c7 100644 --- a/src/mintdb/perf_taler_mintdb_interpreter.c +++ b/src/mintdb/perf_taler_mintdb_interpreter.c @@ -770,6 +770,93 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state) } break; + case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_ORDER: + { + int hash_index; + int denom_index; + struct GNUNET_HashCode session_hash; + struct TALER_MINTDB_DenominationKeyIssueInformation *denom; + + hash_index = cmd_find (state->cmd, + state->cmd[state->i].details.insert_refresh_order.label_hash); + GNUNET_assert (GNUNET_SYSERR != hash_index); + denom_index = cmd_find (state->cmd, + state->cmd[state->i].details.insert_refresh_order.label_denom); + GNUNET_assert (GNUNET_SYSERR != denom_index); + session_hash = state->cmd[hash_index].exposed.data.session_hash; + denom = state->cmd[denom_index].exposed.data.dki; + state->plugin->insert_refresh_order (state->plugin->cls, + state->session, + &session_hash, + 1, + &denom->denom_pub); + + } + break; + + case PERF_TALER_MINTDB_CMD_GET_REFRESH_ORDER: + { + int hash_index; + struct GNUNET_HashCode hash; + struct TALER_DenominationPublicKey denom_pub; + + hash_index = cmd_find (state->cmd, + state->cmd[state->i].details.get_refresh_order.label_hash); + GNUNET_assert (GNUNET_SYSERR != hash_index); + hash = state->cmd[hash_index].exposed.data.session_hash; + state->plugin->get_refresh_order (state->plugin->cls, + state->session, + &hash, + 1, + &denom_pub); + } + break; + + case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_COIN: + { + int hash_index; + + hash_index = cmd_find (state->cmd, + state->cmd[state->i].details.insert_refresh_commit_coin.label_hash); + GNUNET_assert (GNUNET_SYSERR != hash_index); + } + break; + + case PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_COIN: + { + int hash_index; + + hash_index = cmd_find (state->cmd, + state->cmd[state->i].details.insert_refresh_commit_coin.label_hash); + GNUNET_assert (GNUNET_SYSERR != hash_index); + } + break; + + case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_COMMIT_LINK: + { + int hash_index; + + hash_index = cmd_find (state->cmd, + state->cmd[state->i].details.insert_refresh_commit_link.label_hash); + GNUNET_assert (GNUNET_SYSERR != hash_index); + } + break; + + case PERF_TALER_MINTDB_CMD_GET_REFRESH_COMMIT_LINK: + break; + + case PERF_TALER_MINTDB_CMD_GET_MELT_COMMITMENT: + break; + + case PERF_TALER_MINTDB_CMD_INSERT_REFRESH_OUT: + break; + + case PERF_TALER_MINTDB_CMD_GET_LINK_DATA_LIST: + break; + + case PERF_TALER_MINTDB_CMD_GET_TRANSFER: + break; + default: break; } |