613a0c746d6d2801652031d178d746556e55a534
[oweals/gnunet.git] / src / sq / sq_query_helper.c
1 /*
2   This file is part of GNUnet
3   Copyright (C) 2017 GNUnet e.V.
4
5   GNUnet is free software; you can redistribute it and/or modify it under the
6   terms of the GNU General Public License as published by the Free Software
7   Foundation; either version 3, or (at your option) any later version.
8
9   GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY
10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12
13   You should have received a copy of the GNU General Public License along with
14   GNUnet; see the file COPYING.  If not, If not, see <http://www.gnu.org/licenses/>
15 */
16 /**
17  * @file sq/sq_query_helper.c
18  * @brief helper functions for queries
19  * @author Christian Grothoff
20  */
21 #include "gnunet_sq_lib.h"
22
23
24 /**
25  * Generate query parameter for a buffer @a ptr of
26  * @a ptr_size bytes.
27  *
28  * @param ptr pointer to the query parameter to pass
29  * @oaran ptr_size number of bytes in @a ptr
30  */
31 struct GNUNET_SQ_QueryParam
32 GNUNET_SQ_query_param_fixed_size (const void *ptr,
33                                   size_t ptr_size)
34 {
35 }
36
37
38 /**
39  * Generate query parameter for a string.
40  *
41  * @param ptr pointer to the string query parameter to pass
42  */
43 struct GNUNET_SQ_QueryParam
44 GNUNET_SQ_query_param_string (const char *ptr)
45 {
46 }
47
48
49 /**
50  * Generate query parameter for an RSA public key.  The
51  * database must contain a BLOB type in the respective position.
52  *
53  * @param x the query parameter to pass.
54  */
55 struct GNUNET_SQ_QueryParam
56 GNUNET_SQ_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x)
57 {
58 }
59
60
61 /**
62  * Generate query parameter for an RSA signature.  The
63  * database must contain a BLOB type in the respective position.
64  *
65  * @param x the query parameter to pass
66  */
67 struct GNUNET_SQ_QueryParam
68 GNUNET_SQ_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x)
69 {
70 }
71
72
73 /**
74  * Generate query parameter for an absolute time value.
75  * The database must store a 64-bit integer.
76  *
77  * @param x pointer to the query parameter to pass
78  */
79 struct GNUNET_SQ_QueryParam
80 GNUNET_SQ_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x)
81 {
82 }
83
84
85 /**
86  * Generate query parameter for an absolute time value.
87  * The database must store a 64-bit integer.
88  *
89  * @param x pointer to the query parameter to pass
90  */
91 struct GNUNET_SQ_QueryParam
92 GNUNET_SQ_query_param_absolute_time_nbo (const struct GNUNET_TIME_AbsoluteNBO *x)
93 {
94 }
95
96
97 /**
98  * Generate query parameter for an uint16_t in host byte order.
99  *
100  * @param x pointer to the query parameter to pass
101  */
102 struct GNUNET_SQ_QueryParam
103 GNUNET_SQ_query_param_uint16 (const uint16_t *x)
104 {
105 }
106
107
108 /**
109  * Generate query parameter for an uint32_t in host byte order.
110  *
111  * @param x pointer to the query parameter to pass
112  */
113 struct GNUNET_SQ_QueryParam
114 GNUNET_SQ_query_param_uint32 (const uint32_t *x)
115 {
116 }
117
118
119 /**
120  * Generate query parameter for an uint16_t in host byte order.
121  *
122  * @param x pointer to the query parameter to pass
123  */
124 struct GNUNET_SQ_QueryParam
125 GNUNET_SQ_query_param_uint64 (const uint64_t *x)
126 {
127 }
128
129 /* end of sq_query_helper.c */