diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-14 15:23:44 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-04-14 15:23:44 +0200 |
commit | 494af3383d2a5d3402e1f03209cb574af86079a8 (patch) | |
tree | 6b457d61846e2f18c3f1b4ace0e3e58480e3e15c /src/reclaim/reclaim.h | |
parent | a277e037fefe605c93d81869ac514f87cad25768 (diff) | |
download | gnunet-494af3383d2a5d3402e1f03209cb574af86079a8.tar.gz gnunet-494af3383d2a5d3402e1f03209cb574af86079a8.zip |
RECLAIM: bugfixes; add delete attribute API
Diffstat (limited to 'src/reclaim/reclaim.h')
-rw-r--r-- | src/reclaim/reclaim.h | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/src/reclaim/reclaim.h b/src/reclaim/reclaim.h index c29902ab1..982cd8ae4 100644 --- a/src/reclaim/reclaim.h +++ b/src/reclaim/reclaim.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | GNUNET_NETWORK_STRUCT_BEGIN | 34 | GNUNET_NETWORK_STRUCT_BEGIN |
35 | 35 | ||
36 | |||
36 | /** | 37 | /** |
37 | * Use to store an identity attribute | 38 | * Use to store an identity attribute |
38 | */ | 39 | */ |
@@ -64,13 +65,42 @@ struct AttributeStoreMessage | |||
64 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; | 65 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; |
65 | 66 | ||
66 | /* followed by the serialized attribute */ | 67 | /* followed by the serialized attribute */ |
68 | }; | ||
69 | |||
70 | |||
71 | /** | ||
72 | * Use to delete an identity attribute | ||
73 | */ | ||
74 | struct AttributeDeleteMessage | ||
75 | { | ||
76 | /** | ||
77 | * Type: #GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT | ||
78 | */ | ||
79 | struct GNUNET_MessageHeader header; | ||
80 | |||
81 | /** | ||
82 | * Unique identifier for this request (for key collisions). | ||
83 | */ | ||
84 | uint32_t id GNUNET_PACKED; | ||
85 | |||
86 | /** | ||
87 | * The length of the attribute | ||
88 | */ | ||
89 | uint32_t attr_len GNUNET_PACKED; | ||
90 | |||
91 | /** | ||
92 | * Identity | ||
93 | */ | ||
94 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; | ||
67 | 95 | ||
96 | /* followed by the serialized attribute */ | ||
68 | }; | 97 | }; |
69 | 98 | ||
99 | |||
70 | /** | 100 | /** |
71 | * Attribute store response message | 101 | * Attribute store/delete response message |
72 | */ | 102 | */ |
73 | struct AttributeStoreResultMessage | 103 | struct SuccessResultMessage |
74 | { | 104 | { |
75 | /** | 105 | /** |
76 | * Message header | 106 | * Message header |
@@ -86,7 +116,6 @@ struct AttributeStoreResultMessage | |||
86 | * #GNUNET_SYSERR on failure, #GNUNET_OK on success | 116 | * #GNUNET_SYSERR on failure, #GNUNET_OK on success |
87 | */ | 117 | */ |
88 | int32_t op_result GNUNET_PACKED; | 118 | int32_t op_result GNUNET_PACKED; |
89 | |||
90 | }; | 119 | }; |
91 | 120 | ||
92 | /** | 121 | /** |
@@ -99,7 +128,7 @@ struct AttributeResultMessage | |||
99 | */ | 128 | */ |
100 | struct GNUNET_MessageHeader header; | 129 | struct GNUNET_MessageHeader header; |
101 | 130 | ||
102 | /** | 131 | /** |
103 | * Unique identifier for this request (for key collisions). | 132 | * Unique identifier for this request (for key collisions). |
104 | */ | 133 | */ |
105 | uint32_t id GNUNET_PACKED; | 134 | uint32_t id GNUNET_PACKED; |
@@ -144,7 +173,6 @@ struct AttributeIterationStartMessage | |||
144 | * Identity. | 173 | * Identity. |
145 | */ | 174 | */ |
146 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; | 175 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; |
147 | |||
148 | }; | 176 | }; |
149 | 177 | ||
150 | 178 | ||
@@ -162,7 +190,6 @@ struct AttributeIterationNextMessage | |||
162 | * Unique identifier for this request (for key collisions). | 190 | * Unique identifier for this request (for key collisions). |
163 | */ | 191 | */ |
164 | uint32_t id GNUNET_PACKED; | 192 | uint32_t id GNUNET_PACKED; |
165 | |||
166 | }; | 193 | }; |
167 | 194 | ||
168 | 195 | ||
@@ -180,7 +207,6 @@ struct AttributeIterationStopMessage | |||
180 | * Unique identifier for this request (for key collisions). | 207 | * Unique identifier for this request (for key collisions). |
181 | */ | 208 | */ |
182 | uint32_t id GNUNET_PACKED; | 209 | uint32_t id GNUNET_PACKED; |
183 | |||
184 | }; | 210 | }; |
185 | 211 | ||
186 | /** | 212 | /** |
@@ -202,7 +228,6 @@ struct TicketIterationStartMessage | |||
202 | * Identity. | 228 | * Identity. |
203 | */ | 229 | */ |
204 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; | 230 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; |
205 | |||
206 | }; | 231 | }; |
207 | 232 | ||
208 | 233 | ||
@@ -220,7 +245,6 @@ struct TicketIterationNextMessage | |||
220 | * Unique identifier for this request (for key collisions). | 245 | * Unique identifier for this request (for key collisions). |
221 | */ | 246 | */ |
222 | uint32_t id GNUNET_PACKED; | 247 | uint32_t id GNUNET_PACKED; |
223 | |||
224 | }; | 248 | }; |
225 | 249 | ||
226 | 250 | ||
@@ -238,11 +262,9 @@ struct TicketIterationStopMessage | |||
238 | * Unique identifier for this request (for key collisions). | 262 | * Unique identifier for this request (for key collisions). |
239 | */ | 263 | */ |
240 | uint32_t id GNUNET_PACKED; | 264 | uint32_t id GNUNET_PACKED; |
241 | |||
242 | }; | 265 | }; |
243 | 266 | ||
244 | 267 | ||
245 | |||
246 | /** | 268 | /** |
247 | * Ticket issue message | 269 | * Ticket issue message |
248 | */ | 270 | */ |
@@ -273,7 +295,7 @@ struct IssueTicketMessage | |||
273 | */ | 295 | */ |
274 | uint32_t attr_len GNUNET_PACKED; | 296 | uint32_t attr_len GNUNET_PACKED; |
275 | 297 | ||
276 | //Followed by a serialized attribute list | 298 | // Followed by a serialized attribute list |
277 | }; | 299 | }; |
278 | 300 | ||
279 | /** | 301 | /** |
@@ -301,7 +323,7 @@ struct RevokeTicketMessage | |||
301 | */ | 323 | */ |
302 | uint32_t attrs_len GNUNET_PACKED; | 324 | uint32_t attrs_len GNUNET_PACKED; |
303 | 325 | ||
304 | //Followed by a ticket and serialized attribute list | 326 | // Followed by a ticket and serialized attribute list |
305 | }; | 327 | }; |
306 | 328 | ||
307 | /** | 329 | /** |
@@ -340,7 +362,6 @@ struct TicketResultMessage | |||
340 | * Unique identifier for this request (for key collisions). | 362 | * Unique identifier for this request (for key collisions). |
341 | */ | 363 | */ |
342 | uint32_t id GNUNET_PACKED; | 364 | uint32_t id GNUNET_PACKED; |
343 | |||
344 | }; | 365 | }; |
345 | 366 | ||
346 | /** | 367 | /** |
@@ -363,7 +384,7 @@ struct ConsumeTicketMessage | |||
363 | */ | 384 | */ |
364 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; | 385 | struct GNUNET_CRYPTO_EcdsaPrivateKey identity; |
365 | 386 | ||
366 | //Followed by a serialized ticket | 387 | // Followed by a serialized ticket |
367 | }; | 388 | }; |
368 | 389 | ||
369 | /** | 390 | /** |
@@ -376,7 +397,7 @@ struct ConsumeTicketResultMessage | |||
376 | */ | 397 | */ |
377 | struct GNUNET_MessageHeader header; | 398 | struct GNUNET_MessageHeader header; |
378 | 399 | ||
379 | /** | 400 | /** |
380 | * Unique identifier for this request (for key collisions). | 401 | * Unique identifier for this request (for key collisions). |
381 | */ | 402 | */ |
382 | uint32_t id GNUNET_PACKED; | 403 | uint32_t id GNUNET_PACKED; |
@@ -407,7 +428,6 @@ struct ConsumeTicketResultMessage | |||
407 | }; | 428 | }; |
408 | 429 | ||
409 | 430 | ||
410 | |||
411 | GNUNET_NETWORK_STRUCT_END | 431 | GNUNET_NETWORK_STRUCT_END |
412 | 432 | ||
413 | #endif | 433 | #endif |