summaryrefslogtreecommitdiff
path: root/src/mintdb/perf_taler_mintdb_init.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mintdb/perf_taler_mintdb_init.h')
-rw-r--r--src/mintdb/perf_taler_mintdb_init.h99
1 files changed, 77 insertions, 22 deletions
diff --git a/src/mintdb/perf_taler_mintdb_init.h b/src/mintdb/perf_taler_mintdb_init.h
index 5f2e44cd5..4682f800f 100644
--- a/src/mintdb/perf_taler_mintdb_init.h
+++ b/src/mintdb/perf_taler_mintdb_init.h
@@ -27,74 +27,114 @@
#define CURRENCY "EUR"
+
/**
- * @return a randomly generated CollectableBlindcoin
+ * Generate a dummy DenominationKeyInformation for testing purposes
+ * @return a dummy denomination key
*/
-struct TALER_MINTDB_CollectableBlindcoin *
-PERF_TALER_MINTDB_collectable_blindcoin_init (void);
+struct TALER_MINTDB_DenominationKeyIssueInformation *
+PERF_TALER_MINTDB_denomination_init (void);
/**
- * Liberate memory of @a coin
+ * Copies the given denomination
+ * @param reserve the deposit copy
+ * @return a copy of @a deposit; NULL if error
+ */
+struct TALER_MINTDB_DenominationKeyIssueInformation *
+PERF_TALER_MINTDB_denomination_copy (
+ const struct TALER_MINTDB_DenominationKeyIssueInformation *dki);
+
+
+/**
+ * Free memory of a DenominationKeyIssueInformation
+ * @param dki pointer to the struct to free
*/
int
-PERF_TALER_MINTDB_collectable_blindcoin_free (struct TALER_MINTDB_CollectableBlindcoin *NAME);
+PERF_TALER_MINTDB_denomination_free (
+ struct TALER_MINTDB_DenominationKeyIssueInformation *dki);
/**
- * @return a randomly generated reserve
+ * Generate a dummy reserve for testing
+ * @return a reserve with 1000 EUR in it
*/
struct TALER_MINTDB_Reserve *
PERF_TALER_MINTDB_reserve_init (void);
/**
- * Free memory of a reserve
+ * Copies the given reserve
+ * @param reserve the reserve to copy
+ * @return a copy of @a reserve; NULL if error
*/
-int
-PERF_TALER_MINTDB_reserve_free (struct TALER_MINTDB_Reserve *reserve);
+struct TALER_MINTDB_Reserve *
+PERF_TALER_MINTDB_reserve_copy (const struct TALER_MINTDB_Reserve *reserve);
/**
- * @return a randomly generated refresh session
+ * Free memory of a reserve
+ * @param reserve pointer to the structure to be freed
*/
-struct TALER_MINTDB_RefreshSession *
-PERF_TALER_MINTDB_refresh_session_init (void);
+int
+PERF_TALER_MINTDB_reserve_free (struct TALER_MINTDB_Reserve *reserve);
/**
- * Frees memory of a refresh_session
+ * Generate a dummy deposit for testing purposes
+ * @param dki the denomination key used to sign the key
*/
-int
-PERF_TALER_MINTDB_refresh_session_free (struct TALER_MINTDB_RefreshSession *refresh_session);
+struct TALER_MINTDB_Deposit *
+PERF_TALER_MINTDB_deposit_init (
+ const struct TALER_MINTDB_DenominationKeyIssueInformation *dki);
/**
- * Create a randomly generated deposit
+ * Copies the given deposit
+ * @param reserve the deposit copy
+ * @return a copy of @a deposit; NULL if error
*/
struct TALER_MINTDB_Deposit *
-PERF_TALER_MINTDB_deposit_init (void);
+PERF_TALER_MINTDB_deposit_copy (const struct TALER_MINTDB_Deposit *deposit);
/**
* Free memory of a deposit
+ * @param deposit pointer to the structure to free
*/
int
PERF_TALER_MINTDB_deposit_free (struct TALER_MINTDB_Deposit *deposit);
/**
- * Generate a randomly generate DenominationKeyInformation
+ * Generate a CollectableBlindcoin for testing purpuses
+ * @param dki denomination key used to sign the coin
+ * @param reserve reserve providing the money for the coin
+ * @return a randomly generated CollectableBlindcoin
*/
-struct TALER_MINTDB_DenominationKeyIssueInformation *
-PERF_TALER_MINTDB_denomination_init (void);
+struct TALER_MINTDB_CollectableBlindcoin *
+PERF_TALER_MINTDB_collectable_blindcoin_init (
+ const struct TALER_MINTDB_DenominationKeyIssueInformation *dki,
+ const struct TALER_MINTDB_Reserve *reserve);
+
+
+/**
+ * Copies the given coin
+ * @param coin the coin to copy
+ * @return a copy of coin; NULL if error
+ */
+struct TALER_MINTDB_CollectableBlindcoin *
+PERF_TALER_MINTDB_collectable_blindcoin_copy (
+ const struct TALER_MINTDB_CollectableBlindcoin *coin);
/**
- * Free memory for a DenominationKeyIssueInformation
+ * Liberate memory of @a coin
+ * @param coin pointer to the structure to free
*/
int
-PERF_TALER_MINTDB_denomination_free (struct TALER_MINTDB_DenominationKeyIssueInformation *dki);
+PERF_TALER_MINTDB_collectable_blindcoin_free (
+ struct TALER_MINTDB_CollectableBlindcoin *coin);
/**
@@ -109,4 +149,19 @@ PERF_TALER_MINTDB_coin_public_info_init (void);
*/
int PERF_TALER_MINTDB_coin_public_info_free (struct TALER_CoinPublicInfo *cpi);
+
+/**
+ * @return a randomly generated refresh session
+ */
+struct TALER_MINTDB_RefreshSession *
+PERF_TALER_MINTDB_refresh_session_init (void);
+
+
+/**
+ * Frees memory of a refresh_session
+ */
+int
+PERF_TALER_MINTDB_refresh_session_free (
+ struct TALER_MINTDB_RefreshSession *refresh_session);
+
#endif