summaryrefslogtreecommitdiff
path: root/src/pq
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-16 20:33:01 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-16 20:33:01 +0200
commitaa89db4d0a92f341eb6239a06c7b69410934132b (patch)
treed352df5b1ce83e15e98994fbf7edffb113f9752e /src/pq
parent21da34a5011bfb9445b658febdb40c90c34b4170 (diff)
downloadexchange-aa89db4d0a92f341eb6239a06c7b69410934132b.tar.gz
exchange-aa89db4d0a92f341eb6239a06c7b69410934132b.tar.bz2
exchange-aa89db4d0a92f341eb6239a06c7b69410934132b.zip
organize #include, remove redundant includes
Diffstat (limited to 'src/pq')
-rw-r--r--src/pq/pq_helper.c22
-rw-r--r--src/pq/test_pq.c36
2 files changed, 29 insertions, 29 deletions
diff --git a/src/pq/pq_helper.c b/src/pq/pq_helper.c
index 98c02de73..5da1ced41 100644
--- a/src/pq/pq_helper.c
+++ b/src/pq/pq_helper.c
@@ -33,7 +33,7 @@
* @return array entry for the query parameters to use
*/
struct TALER_PQ_QueryParam
-TALER_PQ_QUERY_PARAM_AMOUNT_NBO (const struct TALER_AmountNBO *x)
+TALER_PQ_query_param_amount_nbo (const struct TALER_AmountNBO *x)
{
struct TALER_PQ_QueryParam res =
{ TALER_PQ_QF_AMOUNT_NBO, x, sizeof (*x) };
@@ -51,7 +51,7 @@ TALER_PQ_QUERY_PARAM_AMOUNT_NBO (const struct TALER_AmountNBO *x)
* @return array entry for the query parameters to use
*/
struct TALER_PQ_QueryParam
-TALER_PQ_QUERY_PARAM_AMOUNT (const struct TALER_Amount *x)
+TALER_PQ_query_param_amount (const struct TALER_Amount *x)
{
struct TALER_PQ_QueryParam res =
{ TALER_PQ_QF_AMOUNT, x, sizeof (*x) };
@@ -67,7 +67,7 @@ TALER_PQ_QUERY_PARAM_AMOUNT (const struct TALER_Amount *x)
* @return array entry for the query parameters to use
*/
struct TALER_PQ_QueryParam
-TALER_PQ_QUERY_PARAM_RSA_PUBLIC_KEY (const struct GNUNET_CRYPTO_rsa_PublicKey *x)
+TALER_PQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_rsa_PublicKey *x)
{
struct TALER_PQ_QueryParam res =
{ TALER_PQ_QF_RSA_PUBLIC_KEY, (x), 0 };
@@ -83,7 +83,7 @@ TALER_PQ_QUERY_PARAM_RSA_PUBLIC_KEY (const struct GNUNET_CRYPTO_rsa_PublicKey *x
* @return array entry for the query parameters to use
*/
struct TALER_PQ_QueryParam
-TALER_PQ_QUERY_PARAM_RSA_SIGNATURE (const struct GNUNET_CRYPTO_rsa_Signature *x)
+TALER_PQ_query_param_rsa_signature (const struct GNUNET_CRYPTO_rsa_Signature *x)
{
struct TALER_PQ_QueryParam res =
{ TALER_PQ_QF_RSA_SIGNATURE, (x), 0 };
@@ -99,7 +99,7 @@ TALER_PQ_QUERY_PARAM_RSA_SIGNATURE (const struct GNUNET_CRYPTO_rsa_Signature *x)
* @return array entry for the query parameters to use
*/
struct TALER_PQ_QueryParam
-TALER_PQ_QUERY_PARAM_ABSOLUTE_TIME (const struct GNUNET_TIME_Absolute *x)
+TALER_PQ_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x)
{
struct TALER_PQ_QueryParam res =
{ TALER_PQ_QF_TIME_ABSOLUTE, x, sizeof (*x) };
@@ -116,7 +116,7 @@ TALER_PQ_QUERY_PARAM_ABSOLUTE_TIME (const struct GNUNET_TIME_Absolute *x)
* @return array entry for the result specification to use
*/
struct TALER_PQ_ResultSpec
-TALER_PQ_RESULT_SPEC_VAR (const char *name,
+TALER_PQ_result_spec_variable_size (const char *name,
void **dst,
size_t *sptr)
{
@@ -134,7 +134,7 @@ TALER_PQ_RESULT_SPEC_VAR (const char *name,
* @return array entry for the result specification to use
*/
struct TALER_PQ_ResultSpec
-TALER_PQ_RESULT_SPEC_AMOUNT_NBO (const char *name,
+TALER_PQ_result_spec_amount_nbo (const char *name,
struct TALER_AmountNBO *amount)
{
struct TALER_PQ_ResultSpec res =
@@ -151,7 +151,7 @@ TALER_PQ_RESULT_SPEC_AMOUNT_NBO (const char *name,
* @return array entry for the result specification to use
*/
struct TALER_PQ_ResultSpec
-TALER_PQ_RESULT_SPEC_AMOUNT (const char *name,
+TALER_PQ_result_spec_amount (const char *name,
struct TALER_Amount *amount)
{
struct TALER_PQ_ResultSpec res =
@@ -168,7 +168,7 @@ TALER_PQ_RESULT_SPEC_AMOUNT (const char *name,
* @return array entry for the result specification to use
*/
struct TALER_PQ_ResultSpec
-TALER_PQ_RESULT_SPEC_RSA_PUBLIC_KEY (const char *name,
+TALER_PQ_result_spec_rsa_public_key (const char *name,
struct GNUNET_CRYPTO_rsa_PublicKey **rsa)
{
struct TALER_PQ_ResultSpec res =
@@ -185,7 +185,7 @@ TALER_PQ_RESULT_SPEC_RSA_PUBLIC_KEY (const char *name,
* @return array entry for the result specification to use
*/
struct TALER_PQ_ResultSpec
-TALER_PQ_RESULT_SPEC_RSA_SIGNATURE (const char *name,
+TALER_PQ_result_spec_rsa_signature (const char *name,
struct GNUNET_CRYPTO_rsa_Signature **sig)
{
struct TALER_PQ_ResultSpec res =
@@ -202,7 +202,7 @@ TALER_PQ_RESULT_SPEC_RSA_SIGNATURE (const char *name,
* @return array entry for the result specification to use
*/
struct TALER_PQ_ResultSpec
-TALER_PQ_RESULT_SPEC_ABSOLUTE_TIME (const char *name,
+TALER_PQ_result_spec_absolute_time (const char *name,
struct GNUNET_TIME_Absolute *at)
{
struct TALER_PQ_ResultSpec res =
diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c
index d34171110..185b95ca1 100644
--- a/src/pq/test_pq.c
+++ b/src/pq/test_pq.c
@@ -124,30 +124,30 @@ run_queries (PGconn *conn)
&hamount);
TALER_string_to_amount ("EUR:4.4",
&hamount);
- /* FIXME: test TALER_PQ_RESULT_SPEC_VAR */
+ /* FIXME: test TALER_PQ_result_spec_variable_size */
{
struct TALER_PQ_QueryParam params_insert[] = {
- TALER_PQ_QUERY_PARAM_RSA_PUBLIC_KEY (pub),
- TALER_PQ_QUERY_PARAM_RSA_SIGNATURE (sig),
- TALER_PQ_QUERY_PARAM_ABSOLUTE_TIME (&abs_time),
- TALER_PQ_QUERY_PARAM_ABSOLUTE_TIME (&forever),
- TALER_PQ_QUERY_PARAM_PTR (&hc),
- TALER_PQ_QUERY_PARAM_AMOUNT (&hamount),
- TALER_PQ_QUERY_PARAM_AMOUNT_NBO (&namount),
- TALER_PQ_QUERY_PARAM_END
+ TALER_PQ_query_param_rsa_public_key (pub),
+ TALER_PQ_query_param_rsa_signature (sig),
+ TALER_PQ_query_param_absolute_time (&abs_time),
+ TALER_PQ_query_param_absolute_time (&forever),
+ TALER_PQ_query_param_auto_from_type (&hc),
+ TALER_PQ_query_param_amount (&hamount),
+ TALER_PQ_query_param_amount_nbo (&namount),
+ TALER_PQ_query_param_end
};
struct TALER_PQ_QueryParam params_select[] = {
- TALER_PQ_QUERY_PARAM_END
+ TALER_PQ_query_param_end
};
struct TALER_PQ_ResultSpec results_select[] = {
- TALER_PQ_RESULT_SPEC_RSA_PUBLIC_KEY ("pub", &pub2),
- TALER_PQ_RESULT_SPEC_RSA_SIGNATURE ("sig", &sig2),
- TALER_PQ_RESULT_SPEC_ABSOLUTE_TIME ("abs_time", &abs_time2),
- TALER_PQ_RESULT_SPEC_ABSOLUTE_TIME ("forever", &forever2),
- TALER_PQ_RESULT_SPEC ("hash", &hc2),
- TALER_PQ_RESULT_SPEC_AMOUNT ("hamount", &hamount2),
- TALER_PQ_RESULT_SPEC_AMOUNT_NBO ("namount", &namount2),
- TALER_PQ_RESULT_SPEC_END
+ TALER_PQ_result_spec_rsa_public_key ("pub", &pub2),
+ TALER_PQ_result_spec_rsa_signature ("sig", &sig2),
+ TALER_PQ_result_spec_absolute_time ("abs_time", &abs_time2),
+ TALER_PQ_result_spec_absolute_time ("forever", &forever2),
+ TALER_PQ_result_spec_auto_from_type ("hash", &hc2),
+ TALER_PQ_result_spec_amount ("hamount", &hamount2),
+ TALER_PQ_result_spec_amount_nbo ("namount", &namount2),
+ TALER_PQ_result_spec_end
};
result = TALER_PQ_exec_prepared (conn,