aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_escrow_lib.h37
-rw-r--r--src/include/gnunet_escrow_plugin.h38
2 files changed, 26 insertions, 49 deletions
diff --git a/src/include/gnunet_escrow_lib.h b/src/include/gnunet_escrow_lib.h
index dddf5e030..f9135c28e 100644
--- a/src/include/gnunet_escrow_lib.h
+++ b/src/include/gnunet_escrow_lib.h
@@ -77,7 +77,7 @@ struct GNUNET_ESCROW_Anchor
77 /** 77 /**
78 * The name of the ego that was put in escrow. 78 * The name of the ego that was put in escrow.
79 */ 79 */
80 char *egoName; 80 const char *egoName;
81 81
82 /** 82 /**
83 * The size of the anchor data. 83 * The size of the anchor data.
@@ -370,33 +370,48 @@ GNUNET_ESCROW_get_status (
370 * Deserialize an escrow anchor string (e.g. from command line) into a 370 * Deserialize an escrow anchor string (e.g. from command line) into a
371 * GNUNET_ESCROW_Anchor struct 371 * GNUNET_ESCROW_Anchor struct
372 * 372 *
373 * @param h the handle for the escrow component
374 * @param anchorString the encoded escrow anchor string 373 * @param anchorString the encoded escrow anchor string
375 * @param method the escrow method to use
376 * 374 *
377 * @return the deserialized data packed into a GNUNET_ESCROW_Anchor struct, 375 * @return the deserialized data packed into a GNUNET_ESCROW_Anchor struct,
378 * NULL if we failed to parse the string 376 * NULL if we failed to parse the string
379 */ 377 */
380struct GNUNET_ESCROW_Anchor * 378struct GNUNET_ESCROW_Anchor *
381GNUNET_ESCROW_anchor_string_to_data ( 379GNUNET_ESCROW_anchor_string_to_data (
382 struct GNUNET_ESCROW_Handle *h, 380 const char *anchorString);
383 char *anchorString,
384 enum GNUNET_ESCROW_Key_Escrow_Method method);
385 381
386 382
387/** 383/**
388 * Serialize an escrow anchor (struct GNUNET_ESCROW_Anchor) into a string 384 * Serialize an escrow anchor (struct GNUNET_ESCROW_Anchor) into a string
389 * 385 *
390 * @param h the handle for the escrow component
391 * @param escrowAnchor the escrow anchor struct 386 * @param escrowAnchor the escrow anchor struct
392 * @param method the escrow method to use
393 * 387 *
394 * @return the encoded escrow anchor string 388 * @return the encoded escrow anchor string
395 */ 389 */
396char * 390char *
397GNUNET_ESCROW_anchor_data_to_string (struct GNUNET_ESCROW_Handle *h, 391GNUNET_ESCROW_anchor_data_to_string (
398 struct GNUNET_ESCROW_Anchor *escrowAnchor, 392 const struct GNUNET_ESCROW_Anchor *escrowAnchor);
399 enum GNUNET_ESCROW_Key_Escrow_Method method); 393
394
395/**
396 * Convert a method name string to the respective enum number
397 *
398 * @param methodString the method name string
399 *
400 * @return the enum number
401 */
402enum GNUNET_ESCROW_Key_Escrow_Method
403GNUNET_ESCROW_method_string_to_number (const char *methodString);
404
405
406/**
407 * Convert a method enum number to the respective method string
408 *
409 * @param method the method enum number
410 *
411 * @return the method string
412 */
413const char *
414GNUNET_ESCROW_method_number_to_string (enum GNUNET_ESCROW_Key_Escrow_Method method);
400 415
401 416
402/** 417/**
diff --git a/src/include/gnunet_escrow_plugin.h b/src/include/gnunet_escrow_plugin.h
index b8b88ff3f..dbdf6dce6 100644
--- a/src/include/gnunet_escrow_plugin.h
+++ b/src/include/gnunet_escrow_plugin.h
@@ -114,34 +114,6 @@ typedef struct GNUNET_ESCROW_Status *(*GNUNET_ESCROW_GetEscrowStatusFunction) (
114 114
115 115
116/** 116/**
117 * Function called to deserialize an escrow anchor string into a
118 * GNUNET_ESCROW_Anchor struct
119 *
120 * @param h the handle for the escrow component
121 * @param anchorString the encoded escrow anchor string
122 *
123 * @return the deserialized data packed into a GNUNET_ESCROW_Anchor struct,
124 * NULL if we failed to parse the string
125 */
126typedef struct GNUNET_ESCROW_Anchor *(*GNUNET_ESCROW_AnchorStringToDataFunction) (
127 struct GNUNET_ESCROW_Handle *h,
128 char *anchorString);
129
130
131/**
132 * Function called to serialize an escrow anchor struct into a string
133 *
134 * @param h the handle for the escrow component
135 * @param escrowAnchor the escrow anchor struct
136 *
137 * @return the encoded escrow anchor string
138 */
139typedef char *(*GNUNET_ESCROW_AnchorDataToStringFunction) (
140 struct GNUNET_ESCROW_Handle *h,
141 struct GNUNET_ESCROW_Anchor *escrowAnchor);
142
143
144/**
145 * Function called to cancel a plugin operation 117 * Function called to cancel a plugin operation
146 * 118 *
147 * @param plugin_op_wrap plugin operation wrapper containing the plugin operation 119 * @param plugin_op_wrap plugin operation wrapper containing the plugin operation
@@ -182,16 +154,6 @@ struct GNUNET_ESCROW_KeyPluginFunctions
182 GNUNET_ESCROW_GetEscrowStatusFunction get_status; 154 GNUNET_ESCROW_GetEscrowStatusFunction get_status;
183 155
184 /** 156 /**
185 * Deserialize anchor string to data
186 */
187 GNUNET_ESCROW_AnchorStringToDataFunction anchor_string_to_data;
188
189 /**
190 * Serialize anchor data to string
191 */
192 GNUNET_ESCROW_AnchorDataToStringFunction anchor_data_to_string;
193
194 /**
195 * Cancel plugin operation 157 * Cancel plugin operation
196 */ 158 */
197 GNUNET_ESCROW_CancelPluginOperationFunction cancel_plugin_operation; 159 GNUNET_ESCROW_CancelPluginOperationFunction cancel_plugin_operation;