summaryrefslogtreecommitdiff
path: root/src/include/taler_auditordb_plugin.h
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2016-11-06 14:24:17 +0100
committertg(x) <*@tg-x.net>2016-11-06 14:24:17 +0100
commit247b8e33b3ea20407910929c78232ff0d44e8d9a (patch)
treec5e933cdb0be4c9a18d8f7eb900a8a350d57254e /src/include/taler_auditordb_plugin.h
parent02d28bc81cf2b163950d8c7e11b8dd9fd26ebaff (diff)
downloadexchange-247b8e33b3ea20407910929c78232ff0d44e8d9a.tar.gz
exchange-247b8e33b3ea20407910929c78232ff0d44e8d9a.tar.bz2
exchange-247b8e33b3ea20407910929c78232ff0d44e8d9a.zip
auditordb postgres plugin: auditor_progress implementation + tests
Diffstat (limited to 'src/include/taler_auditordb_plugin.h')
-rw-r--r--src/include/taler_auditordb_plugin.h158
1 files changed, 78 insertions, 80 deletions
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
index a04abca9..c27295a0 100644
--- a/src/include/taler_auditordb_plugin.h
+++ b/src/include/taler_auditordb_plugin.h
@@ -253,6 +253,84 @@ struct TALER_AUDITORDB_Plugin
/**
+ * 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 information about the progress of the auditor.
+ *
+ * @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);
+
+
+ /**
* Insert information about a reserve. There must not be an
* existing record for the reserve.
*
@@ -806,86 +884,6 @@ struct TALER_AUDITORDB_Plugin
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);
-
-
};