skeleton for libgnunetsq implementation
[oweals/gnunet.git] / src / sq / sq_result_helper.c
1
2 /*
3   This file is part of GNUnet
4   Copyright (C) 2017 GNUnet e.V.
5
6   GNUnet is free software; you can redistribute it and/or modify it under the
7   terms of the GNU General Public License as published by the Free Software
8   Foundation; either version 3, or (at your option) any later version.
9
10   GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY
11   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
14   You should have received a copy of the GNU General Public License along with
15   GNUnet; see the file COPYING.  If not, If not, see <http://www.gnu.org/licenses/>
16 */
17 /**
18  * @file sq/sq_result_helper.c
19  * @brief helper functions for queries
20  * @author Christian Grothoff
21  */
22 #include "platform.h"
23 #include "gnunet_sq_lib.h"
24
25
26 /**
27  * Variable-size result expected.
28  *
29  * @param[out] dst where to store the result, allocated
30  * @param[out] sptr where to store the size of @a dst
31  * @return array entry for the result specification to use
32  */
33 struct GNUNET_SQ_ResultSpec
34 GNUNET_SQ_result_spec_variable_size (void **dst,
35                                      size_t *sptr)
36 {
37 }
38
39
40 /**
41  * Fixed-size result expected.
42  *
43  * @param[out] dst where to store the result
44  * @param dst_size number of bytes in @a dst
45  * @return array entry for the result specification to use
46  */
47 struct GNUNET_SQ_ResultSpec
48 GNUNET_SQ_result_spec_fixed_size (void *dst,
49                                   size_t dst_size)
50 {
51 }
52
53
54 /**
55  * Variable-size result expected.
56  *
57  * @param[out] dst where to store the result, allocated
58  * @param[out] sptr where to store the size of @a dst
59  * @return array entry for the result specification to use
60  */
61 struct GNUNET_SQ_ResultSpec
62 GNUNET_SQ_result_spec_variable_size (void **dst,
63                                      size_t *sptr)
64 {
65 }
66
67
68 /**
69  * 0-terminated string expected.
70  *
71  * @param[out] dst where to store the result, allocated
72  * @return array entry for the result specification to use
73  */
74 struct GNUNET_SQ_ResultSpec
75 GNUNET_SQ_result_spec_string (char **dst)
76 {
77 }
78
79
80 /**
81  * RSA public key expected.
82  *
83  * @param[out] rsa where to store the result
84  * @return array entry for the result specification to use
85  */
86 struct GNUNET_SQ_ResultSpec
87 GNUNET_SQ_result_spec_rsa_public_key (struct GNUNET_CRYPTO_RsaPublicKey **rsa)
88 {
89 }
90
91
92 /**
93  * RSA signature expected.
94  *
95  * @param[out] sig where to store the result;
96  * @return array entry for the result specification to use
97  */
98 struct GNUNET_SQ_ResultSpec
99 GNUNET_SQ_result_spec_rsa_signature (struct GNUNET_CRYPTO_RsaSignature **sig)
100 {
101 }
102
103
104 /**
105  * Absolute time expected.
106  *
107  * @param[out] at where to store the result
108  * @return array entry for the result specification to use
109  */
110 struct GNUNET_SQ_ResultSpec
111 GNUNET_SQ_result_spec_absolute_time (struct GNUNET_TIME_Absolute *at)
112 {
113 }
114
115
116 /**
117  * Absolute time expected.
118  *
119  * @param[out] at where to store the result
120  * @return array entry for the result specification to use
121  */
122 struct GNUNET_SQ_ResultSpec
123 GNUNET_SQ_result_spec_absolute_time_nbo (struct GNUNET_TIME_AbsoluteNBO *at)
124 {
125 }
126
127
128 /**
129  * uint16_t expected.
130  *
131  * @param[out] u16 where to store the result
132  * @return array entry for the result specification to use
133  */
134 struct GNUNET_SQ_ResultSpec
135 GNUNET_SQ_result_spec_uint16 (uint16_t *u16)
136 {
137 }
138
139
140 /**
141  * uint32_t expected.
142  *
143  * @param[out] u32 where to store the result
144  * @return array entry for the result specification to use
145  */
146 struct GNUNET_SQ_ResultSpec
147 GNUNET_SQ_result_spec_uint32 (uint32_t *u32)
148 {
149 }
150
151
152 /**
153  * uint64_t expected.
154  *
155  * @param[out] u64 where to store the result
156  * @return array entry for the result specification to use
157  */
158 struct GNUNET_SQ_ResultSpec
159 GNUNET_SQ_result_spec_uint64 (uint64_t *u64)
160 {
161 }
162
163
164 /* end of sq_result_helper.c */