add missing functions to deal with auditor_progress to the auditordb API
This commit is contained in:
parent
2a44112a25
commit
02d28bc81c
@ -1,6 +1,6 @@
|
||||
/*
|
||||
This file is part of TALER
|
||||
Copyright (C) 2014, 2015, 2016 GNUnet e.V.
|
||||
Copyright (C) 2016 GNUnet e.V. and INRIA
|
||||
|
||||
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
|
||||
@ -16,9 +16,7 @@
|
||||
/**
|
||||
* @file auditordb/test_auditordb.c
|
||||
* @brief test cases for DB interaction functions
|
||||
* @author Sree Harsha Totakura
|
||||
* @author Christian Grothoff
|
||||
* @author Marcello Stanisci
|
||||
* @author Gabor Toth
|
||||
*/
|
||||
#include "platform.h"
|
||||
#include "taler_auditordb_lib.h"
|
||||
|
@ -805,6 +805,87 @@ struct TALER_AUDITORDB_Plugin
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
struct TALER_Amount *balance);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Insert information about the auditor's progress with an exchange's
|
||||
* data.
|
||||
*
|
||||
* @param cls the @e cls of this struct with the plugin-specific state
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param last_reserve_in_serial_id serial ID of the last reserve_in transfer the auditor processed
|
||||
* @param last_reserve_out_serial_id serial ID of the last withdraw the auditor processed
|
||||
* @param last_deposit_serial_id serial ID of the last deposit the auditor processed
|
||||
* @param last_melt_serial_id serial ID of the last refresh the auditor processed
|
||||
* @param last_prewire_serial_id serial ID of the last prewire transfer the auditor processed
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
*/
|
||||
int
|
||||
(*insert_auditor_progress)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
uint64_t last_reserve_in_serial_id,
|
||||
uint64_t last_reserve_out_serial_id,
|
||||
uint64_t last_deposit_serial_id,
|
||||
uint64_t last_melt_serial_id,
|
||||
uint64_t last_refund_serial_id,
|
||||
uint64_t last_prewire_serial_id);
|
||||
|
||||
|
||||
/**
|
||||
* Update information about the progress of the auditor. There
|
||||
* must be an existing record for the exchange.
|
||||
*
|
||||
* @param cls the @e cls of this struct with the plugin-specific state
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param last_reserve_in_serial_id serial ID of the last reserve_in transfer the auditor processed
|
||||
* @param last_reserve_out_serial_id serial ID of the last withdraw the auditor processed
|
||||
* @param last_deposit_serial_id serial ID of the last deposit the auditor processed
|
||||
* @param last_melt_serial_id serial ID of the last refresh the auditor processed
|
||||
* @param last_prewire_serial_id serial ID of the last prewire transfer the auditor processed
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure
|
||||
*/
|
||||
int
|
||||
(*update_auditor_progress)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
uint64_t last_reserve_in_serial_id,
|
||||
uint64_t last_reserve_out_serial_id,
|
||||
uint64_t last_deposit_serial_id,
|
||||
uint64_t last_melt_serial_id,
|
||||
uint64_t last_refund_serial_id,
|
||||
uint64_t last_prewire_serial_id);
|
||||
|
||||
|
||||
/**
|
||||
* Get an exchange's predicted balance.
|
||||
*
|
||||
* @param cls the @e cls of this struct with the plugin-specific state
|
||||
* @param session connection to use
|
||||
* @param master_pub master key of the exchange
|
||||
* @param[out] last_reserve_in_serial_id serial ID of the last reserve_in transfer the auditor processed
|
||||
* @param[out] last_reserve_out_serial_id serial ID of the last withdraw the auditor processed
|
||||
* @param[out] last_deposit_serial_id serial ID of the last deposit the auditor processed
|
||||
* @param[out] last_melt_serial_id serial ID of the last refresh the auditor processed
|
||||
* @param[out] last_prewire_serial_id serial ID of the last prewire transfer the auditor processed
|
||||
* @return #GNUNET_OK on success; #GNUNET_SYSERR on failure;
|
||||
* #GNUNET_NO if we have no records for the @a master_pub
|
||||
*/
|
||||
int
|
||||
(*get_auditor_progress)(void *cls,
|
||||
struct TALER_AUDITORDB_Session *session,
|
||||
const struct TALER_MasterPublicKeyP *master_pub,
|
||||
uint64_t *last_reserve_in_serial_id,
|
||||
uint64_t *last_reserve_out_serial_id,
|
||||
uint64_t *last_deposit_serial_id,
|
||||
uint64_t *last_melt_serial_id,
|
||||
uint64_t *last_refund_serial_id,
|
||||
uint64_t *last_prewire_serial_id);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user