summaryrefslogtreecommitdiff
path: root/src/include/gnunet_reclaim_attribute_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_reclaim_attribute_lib.h')
-rw-r--r--src/include/gnunet_reclaim_attribute_lib.h53
1 files changed, 28 insertions, 25 deletions
diff --git a/src/include/gnunet_reclaim_attribute_lib.h b/src/include/gnunet_reclaim_attribute_lib.h
index 527a3977e..4563a5f67 100644
--- a/src/include/gnunet_reclaim_attribute_lib.h
+++ b/src/include/gnunet_reclaim_attribute_lib.h
@@ -54,7 +54,8 @@ extern "C" {
54/** 54/**
55 * An attribute. 55 * An attribute.
56 */ 56 */
57struct GNUNET_RECLAIM_ATTRIBUTE_Claim { 57struct GNUNET_RECLAIM_ATTRIBUTE_Claim
58{
58 /** 59 /**
59 * ID 60 * ID
60 */ 61 */
@@ -92,7 +93,8 @@ struct GNUNET_RECLAIM_ATTRIBUTE_Claim {
92/** 93/**
93 * A list of GNUNET_RECLAIM_ATTRIBUTE_Claim structures. 94 * A list of GNUNET_RECLAIM_ATTRIBUTE_Claim structures.
94 */ 95 */
95struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList { 96struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList
97{
96 /** 98 /**
97 * List head 99 * List head
98 */ 100 */
@@ -105,7 +107,8 @@ struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList {
105}; 107};
106 108
107 109
108struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry { 110struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry
111{
109 /** 112 /**
110 * DLL 113 * DLL
111 */ 114 */
@@ -133,10 +136,10 @@ struct GNUNET_RECLAIM_ATTRIBUTE_ClaimListEntry {
133 * @return the new attribute 136 * @return the new attribute
134 */ 137 */
135struct GNUNET_RECLAIM_ATTRIBUTE_Claim * 138struct GNUNET_RECLAIM_ATTRIBUTE_Claim *
136GNUNET_RECLAIM_ATTRIBUTE_claim_new(const char *attr_name, 139GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char *attr_name,
137 uint32_t type, 140 uint32_t type,
138 const void *data, 141 const void *data,
139 size_t data_size); 142 size_t data_size);
140 143
141 144
142/** 145/**
@@ -146,7 +149,7 @@ GNUNET_RECLAIM_ATTRIBUTE_claim_new(const char *attr_name,
146 * @return the required buffer size 149 * @return the required buffer size
147 */ 150 */
148size_t 151size_t
149GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size( 152GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (
150 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); 153 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs);
151 154
152 155
@@ -156,7 +159,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size(
156 * @param attrs list to destroy 159 * @param attrs list to destroy
157 */ 160 */
158void 161void
159GNUNET_RECLAIM_ATTRIBUTE_list_destroy( 162GNUNET_RECLAIM_ATTRIBUTE_list_destroy (
160 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); 163 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs);
161 164
162 165
@@ -169,7 +172,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_destroy(
169 * @param data_size claim payload size 172 * @param data_size claim payload size
170 */ 173 */
171void 174void
172GNUNET_RECLAIM_ATTRIBUTE_list_add( 175GNUNET_RECLAIM_ATTRIBUTE_list_add (
173 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, 176 struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
174 const char *attr_name, 177 const char *attr_name,
175 uint32_t type, 178 uint32_t type,
@@ -185,7 +188,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_add(
185 * @return length of serialized data 188 * @return length of serialized data
186 */ 189 */
187size_t 190size_t
188GNUNET_RECLAIM_ATTRIBUTE_list_serialize( 191GNUNET_RECLAIM_ATTRIBUTE_list_serialize (
189 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs, 192 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs,
190 char *result); 193 char *result);
191 194
@@ -198,7 +201,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_serialize(
198 * @return a GNUNET_IDENTITY_PROVIDER_AttributeList, must be free'd by caller 201 * @return a GNUNET_IDENTITY_PROVIDER_AttributeList, must be free'd by caller
199 */ 202 */
200struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * 203struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *
201GNUNET_RECLAIM_ATTRIBUTE_list_deserialize(const char *data, size_t data_size); 204GNUNET_RECLAIM_ATTRIBUTE_list_deserialize (const char *data, size_t data_size);
202 205
203 206
204/** 207/**
@@ -208,7 +211,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_deserialize(const char *data, size_t data_size);
208 * @return the required buffer size 211 * @return the required buffer size
209 */ 212 */
210size_t 213size_t
211GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size( 214GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size (
212 const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr); 215 const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr);
213 216
214 217
@@ -220,7 +223,7 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize_get_size(
220 * @return length of serialized data 223 * @return length of serialized data
221 */ 224 */
222size_t 225size_t
223GNUNET_RECLAIM_ATTRIBUTE_serialize( 226GNUNET_RECLAIM_ATTRIBUTE_serialize (
224 const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr, 227 const struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr,
225 char *result); 228 char *result);
226 229
@@ -234,7 +237,7 @@ GNUNET_RECLAIM_ATTRIBUTE_serialize(
234 * @return a GNUNET_IDENTITY_PROVIDER_Attribute, must be free'd by caller 237 * @return a GNUNET_IDENTITY_PROVIDER_Attribute, must be free'd by caller
235 */ 238 */
236struct GNUNET_RECLAIM_ATTRIBUTE_Claim * 239struct GNUNET_RECLAIM_ATTRIBUTE_Claim *
237GNUNET_RECLAIM_ATTRIBUTE_deserialize(const char *data, size_t data_size); 240GNUNET_RECLAIM_ATTRIBUTE_deserialize (const char *data, size_t data_size);
238 241
239 242
240/** 243/**
@@ -243,7 +246,7 @@ GNUNET_RECLAIM_ATTRIBUTE_deserialize(const char *data, size_t data_size);
243 * @return copied claim list 246 * @return copied claim list
244 */ 247 */
245struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList * 248struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *
246GNUNET_RECLAIM_ATTRIBUTE_list_dup( 249GNUNET_RECLAIM_ATTRIBUTE_list_dup (
247 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs); 250 const struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList *attrs);
248 251
249 252
@@ -254,7 +257,7 @@ GNUNET_RECLAIM_ATTRIBUTE_list_dup(
254 * @return corresponding number, UINT32_MAX on error 257 * @return corresponding number, UINT32_MAX on error
255 */ 258 */
256uint32_t 259uint32_t
257GNUNET_RECLAIM_ATTRIBUTE_typename_to_number(const char *typename); 260GNUNET_RECLAIM_ATTRIBUTE_typename_to_number (const char *typename);
258 261
259/** 262/**
260 * Convert human-readable version of a 'claim' of an attribute to the binary 263 * Convert human-readable version of a 'claim' of an attribute to the binary
@@ -267,10 +270,10 @@ GNUNET_RECLAIM_ATTRIBUTE_typename_to_number(const char *typename);
267 * @return #GNUNET_OK on success 270 * @return #GNUNET_OK on success
268 */ 271 */
269int 272int
270GNUNET_RECLAIM_ATTRIBUTE_string_to_value(uint32_t type, 273GNUNET_RECLAIM_ATTRIBUTE_string_to_value (uint32_t type,
271 const char *s, 274 const char *s,
272 void **data, 275 void **data,
273 size_t *data_size); 276 size_t *data_size);
274 277
275 278
276/** 279/**
@@ -282,9 +285,9 @@ GNUNET_RECLAIM_ATTRIBUTE_string_to_value(uint32_t type,
282 * @return NULL on error, otherwise human-readable representation of the claim 285 * @return NULL on error, otherwise human-readable representation of the claim
283 */ 286 */
284char * 287char *
285GNUNET_RECLAIM_ATTRIBUTE_value_to_string(uint32_t type, 288GNUNET_RECLAIM_ATTRIBUTE_value_to_string (uint32_t type,
286 const void *data, 289 const void *data,
287 size_t data_size); 290 size_t data_size);
288 291
289 292
290/** 293/**
@@ -294,7 +297,7 @@ GNUNET_RECLAIM_ATTRIBUTE_value_to_string(uint32_t type,
294 * @return corresponding typestring, NULL on error 297 * @return corresponding typestring, NULL on error
295 */ 298 */
296const char * 299const char *
297GNUNET_RECLAIM_ATTRIBUTE_number_to_typename(uint32_t type); 300GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (uint32_t type);
298 301
299 302
300#if 0 /* keep Emacsens' auto-indent happy */ 303#if 0 /* keep Emacsens' auto-indent happy */