aboutsummaryrefslogtreecommitdiff
path: root/src/my
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-24 20:23:03 +0000
committerChristian Grothoff <christian@grothoff.org>2016-06-24 20:23:03 +0000
commit917577b90b38e848b8c62d10478ce4b65de04244 (patch)
tree3bb55125046d5c7499778acd346f21a1f965cbef /src/my
parent3140154d46212e08e0d73ed891a66213a6813075 (diff)
downloadgnunet-917577b90b38e848b8c62d10478ce4b65de04244.tar.gz
gnunet-917577b90b38e848b8c62d10478ce4b65de04244.zip
-housekeeping
Diffstat (limited to 'src/my')
-rw-r--r--src/my/my_query_helper.c133
-rw-r--r--src/my/my_result_helper.c2
2 files changed, 67 insertions, 68 deletions
diff --git a/src/my/my_query_helper.c b/src/my/my_query_helper.c
index c806a73fb..436860691 100644
--- a/src/my/my_query_helper.c
+++ b/src/my/my_query_helper.c
@@ -57,7 +57,6 @@ my_conv_fixed_size (void *cls,
57 MYSQL_BIND *qbind) 57 MYSQL_BIND *qbind)
58{ 58{
59 GNUNET_assert (1 == qp->num_params); 59 GNUNET_assert (1 == qp->num_params);
60
61 qbind->buffer = (void *) qp->data; 60 qbind->buffer = (void *) qp->data;
62 qbind->buffer_length = qp->data_len; 61 qbind->buffer_length = qp->data_len;
63 qbind->buffer_type = MYSQL_TYPE_BLOB; 62 qbind->buffer_type = MYSQL_TYPE_BLOB;
@@ -90,29 +89,29 @@ GNUNET_MY_query_param_fixed_size (const void *ptr,
90 89
91 90
92/** 91/**
93 * Generate query parameter for a string 92 * Generate query parameter for a string
94 * 93 *
95 *@param ptr pointer to the string query parameter to pass 94 * @param ptr pointer to the string query parameter to pass
96 */ 95 */
97struct GNUNET_MY_QueryParam 96struct GNUNET_MY_QueryParam
98GNUNET_MY_query_param_string (const char *ptr) 97GNUNET_MY_query_param_string (const char *ptr)
99{ 98{
100 return GNUNET_MY_query_param_fixed_size(ptr, 99 return GNUNET_MY_query_param_fixed_size (ptr,
101 strlen(ptr)); 100 strlen(ptr));
102} 101}
103 102
104 103
105/** 104/**
106 * Function called to convert input argument into SQL parameters 105 * Function called to convert input argument into SQL parameters
107 * 106 *
108 *@param cls closure 107 * @param cls closure
109 *@param pq data about the query 108 * @param pq data about the query
110 * @param qbind array of parameters to initialize 109 * @param qbind array of parameters to initialize
111 *@return -1 on error 110 * @return -1 on error
112 */ 111 */
113static int 112static int
114my_conv_uint16 (void *cls, 113my_conv_uint16 (void *cls,
115 const struct GNUNET_MY_QueryParam * qp, 114 const struct GNUNET_MY_QueryParam *qp,
116 MYSQL_BIND *qbind) 115 MYSQL_BIND *qbind)
117{ 116{
118 GNUNET_assert (1 == qp->num_params); 117 GNUNET_assert (1 == qp->num_params);
@@ -124,10 +123,10 @@ my_conv_uint16 (void *cls,
124 123
125 124
126/** 125/**
127 * Generate query parameter for an uint16_t in host byte order. 126 * Generate query parameter for an uint16_t in host byte order.
128 * 127 *
129 * @param x pointer to the query parameter to pass 128 * @param x pointer to the query parameter to pass
130 */ 129 */
131struct GNUNET_MY_QueryParam 130struct GNUNET_MY_QueryParam
132GNUNET_MY_query_param_uint16 (const uint16_t *x) 131GNUNET_MY_query_param_uint16 (const uint16_t *x)
133{ 132{
@@ -145,13 +144,13 @@ GNUNET_MY_query_param_uint16 (const uint16_t *x)
145 144
146 145
147/** 146/**
148 * Function called to convert input argument into SQL parameters 147 * Function called to convert input argument into SQL parameters
149 * 148 *
150 *@param cls closure 149 * @param cls closure
151 *@param pq data about the query 150 * @param pq data about the query
152 * @param qbind array of parameters to initialize 151 * @param qbind array of parameters to initialize
153 *@return -1 on error 152 * @return -1 on error
154 */ 153 */
155static int 154static int
156my_conv_uint32 (void *cls, 155my_conv_uint32 (void *cls,
157 const struct GNUNET_MY_QueryParam *qp, 156 const struct GNUNET_MY_QueryParam *qp,
@@ -167,10 +166,10 @@ my_conv_uint32 (void *cls,
167 166
168 167
169/** 168/**
170 * Generate query parameter for an uint32_t in host byte order 169 * Generate query parameter for an uint32_t in host byte order
171 * 170 *
172 *@param x pointer to the query parameter to pass 171 * @param x pointer to the query parameter to pass
173 */ 172 */
174struct GNUNET_MY_QueryParam 173struct GNUNET_MY_QueryParam
175GNUNET_MY_query_param_uint32 (const uint32_t *x) 174GNUNET_MY_query_param_uint32 (const uint32_t *x)
176{ 175{
@@ -188,13 +187,13 @@ GNUNET_MY_query_param_uint32 (const uint32_t *x)
188 187
189 188
190/** 189/**
191 * Function called to convert input argument into SQL parameters 190 * Function called to convert input argument into SQL parameters
192 * 191 *
193 *@param cls closure 192 * @param cls closure
194 *@param pq data about the query 193 * @param pq data about the query
195 * @param qbind array of parameters to initialize 194 * @param qbind array of parameters to initialize
196 *@return -1 on error 195 * @return -1 on error
197 */ 196 */
198static int 197static int
199my_conv_uint64 (void *cls, 198my_conv_uint64 (void *cls,
200 const struct GNUNET_MY_QueryParam *qp, 199 const struct GNUNET_MY_QueryParam *qp,
@@ -209,10 +208,10 @@ my_conv_uint64 (void *cls,
209 208
210 209
211/** 210/**
212 * Generate query parameter for an uint64_t in host byte order 211 * Generate query parameter for an uint64_t in host byte order
213 * 212 *
214 *@param x pointer to the query parameter to pass 213 * @param x pointer to the query parameter to pass
215 */ 214 */
216struct GNUNET_MY_QueryParam 215struct GNUNET_MY_QueryParam
217GNUNET_MY_query_param_uint64 (const uint64_t *x) 216GNUNET_MY_query_param_uint64 (const uint64_t *x)
218{ 217{
@@ -230,13 +229,13 @@ GNUNET_MY_query_param_uint64 (const uint64_t *x)
230 229
231 230
232/** 231/**
233 * Function called to convert input argument into SQL parameters 232 * Function called to convert input argument into SQL parameters
234 * 233 *
235 *@param cls closure 234 * @param cls closure
236 *@param pq data about the query 235 * @param pq data about the query
237 * @param qbind array of parameters to initialize 236 * @param qbind array of parameters to initialize
238 *@return -1 on error 237 * @return -1 on error
239 */ 238 */
240static int 239static int
241my_conv_rsa_public_key (void *cls, 240my_conv_rsa_public_key (void *cls,
242 const struct GNUNET_MY_QueryParam *qp, 241 const struct GNUNET_MY_QueryParam *qp,
@@ -259,12 +258,12 @@ my_conv_rsa_public_key (void *cls,
259 258
260 259
261/** 260/**
262 * Generate query parameter for an RSA public key. The 261 * Generate query parameter for an RSA public key. The
263 * database must contain a BLOB type in the respective position. 262 * database must contain a BLOB type in the respective position.
264 * 263 *
265 * @param x the query parameter to pass 264 * @param x the query parameter to pass
266 * @return array entry for the query parameters to use 265 * @return array entry for the query parameters to use
267 */ 266 */
268struct GNUNET_MY_QueryParam 267struct GNUNET_MY_QueryParam
269GNUNET_MY_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x) 268GNUNET_MY_query_param_rsa_public_key (const struct GNUNET_CRYPTO_RsaPublicKey *x)
270{ 269{
@@ -311,12 +310,12 @@ my_conv_rsa_signature (void *cls,
311 310
312 311
313/** 312/**
314 * Generate query parameter for an RSA signature. The 313 * Generate query parameter for an RSA signature. The
315 * database must contain a BLOB type in the respective position 314 * database must contain a BLOB type in the respective position
316 * 315 *
317 *@param x the query parameter to pass 316 * @param x the query parameter to pass
318 *@return array entry for the query parameters to use 317 * @return array entry for the query parameters to use
319 */ 318 */
320struct GNUNET_MY_QueryParam 319struct GNUNET_MY_QueryParam
321GNUNET_MY_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x) 320GNUNET_MY_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x)
322{ 321{
@@ -333,12 +332,12 @@ GNUNET_MY_query_param_rsa_signature (const struct GNUNET_CRYPTO_RsaSignature *x)
333 332
334 333
335/** 334/**
336 * Generate query parameter for an absolute time value. 335 * Generate query parameter for an absolute time value.
337 * The database must store a 64-bit integer. 336 * The database must store a 64-bit integer.
338 * 337 *
339 *@param x pointer to the query parameter to pass 338 * @param x pointer to the query parameter to pass
340 *@return array entry for the query parameters to use 339 * @return array entry for the query parameters to use
341 */ 340 */
342struct GNUNET_MY_QueryParam 341struct GNUNET_MY_QueryParam
343GNUNET_MY_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x) 342GNUNET_MY_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x)
344{ 343{
@@ -347,11 +346,11 @@ GNUNET_MY_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x)
347 346
348 347
349/** 348/**
350 * Generate query parameter for an absolute time value. 349 * Generate query parameter for an absolute time value.
351 * The database must store a 64-bit integer. 350 * The database must store a 64-bit integer.
352 * 351 *
353 *@param x pointer to the query parameter to pass 352 * @param x pointer to the query parameter to pass
354 */ 353 */
355struct GNUNET_MY_QueryParam 354struct GNUNET_MY_QueryParam
356GNUNET_MY_query_param_absolute_time_nbo (const struct GNUNET_TIME_AbsoluteNBO *x) 355GNUNET_MY_query_param_absolute_time_nbo (const struct GNUNET_TIME_AbsoluteNBO *x)
357{ 356{
diff --git a/src/my/my_result_helper.c b/src/my/my_result_helper.c
index bee6e3304..6c6a4e3b1 100644
--- a/src/my/my_result_helper.c
+++ b/src/my/my_result_helper.c
@@ -865,4 +865,4 @@ GNUNET_MY_result_spec_uint64 (uint64_t *u64)
865} 865}
866 866
867 867
868/* end of pq_result_helper.c */ 868/* end of my_result_helper.c */