aboutsummaryrefslogtreecommitdiff
path: root/src/sq/sq_result_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sq/sq_result_helper.c')
-rw-r--r--src/sq/sq_result_helper.c164
1 files changed, 164 insertions, 0 deletions
diff --git a/src/sq/sq_result_helper.c b/src/sq/sq_result_helper.c
new file mode 100644
index 000000000..361fea7bf
--- /dev/null
+++ b/src/sq/sq_result_helper.c
@@ -0,0 +1,164 @@
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 */
33struct GNUNET_SQ_ResultSpec
34GNUNET_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 */
47struct GNUNET_SQ_ResultSpec
48GNUNET_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 */
61struct GNUNET_SQ_ResultSpec
62GNUNET_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 */
74struct GNUNET_SQ_ResultSpec
75GNUNET_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 */
86struct GNUNET_SQ_ResultSpec
87GNUNET_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 */
98struct GNUNET_SQ_ResultSpec
99GNUNET_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 */
110struct GNUNET_SQ_ResultSpec
111GNUNET_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 */
122struct GNUNET_SQ_ResultSpec
123GNUNET_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 */
134struct GNUNET_SQ_ResultSpec
135GNUNET_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 */
146struct GNUNET_SQ_ResultSpec
147GNUNET_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 */
158struct GNUNET_SQ_ResultSpec
159GNUNET_SQ_result_spec_uint64 (uint64_t *u64)
160{
161}
162
163
164/* end of sq_result_helper.c */