-joint hdr hacking
authorChristian Grothoff <christian@grothoff.org>
Mon, 16 Apr 2012 10:51:59 +0000 (10:51 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 16 Apr 2012 10:51:59 +0000 (10:51 +0000)
src/include/gnunet_regex_lib.h

index c54f3b88beead8c1e4dfeafacd77cc375969f96f..100b73f50e058515cdd58c75cea8be46999af6b7 100644 (file)
@@ -101,6 +101,7 @@ GNUNET_REGEX_eval (struct GNUNET_REGEX_Automaton *a,
                    const char *string);
 
 
+
 /**
  * Get the starting state of the given automaton 'a'.
  *
@@ -111,6 +112,45 @@ GNUNET_REGEX_eval (struct GNUNET_REGEX_Automaton *a,
 struct GNUNET_REGEX_State *
 GNUNET_REGEX_automaton_get_start (struct GNUNET_REGEX_Automaton *a);
 
+
+/**
+ * @return number of bits of 'input_string' that have been consumed
+ *         to construct the key
+ */
+unsigned int
+GNUNET_REGEX_get_first_key (const char *input_string,
+                           GNUNET_HashCode *key);
+
+
+
+/**
+ * @return GNUNET_OK if the proof is valid for the given key
+ */
+int
+GNUNET_REGEX_check_proof (const char *proof,
+                         const GNUNET_HashCode *key);
+
+
+struct GNUNET_REGEX_Edge
+{
+  const char *label;
+  GNUNET_HashCode destination;
+};
+
+
+typedef void (*GNUNET_REGEX_KeyIterator)(void *cls,
+                                        const GNUNET_HashCode *key,
+                                        const char *proof,
+                                        unsigned int num_edges,
+                                        const struct GNUNET_REGEX_Edge *edges);
+
+
+int
+GNUNET_REGEX_iterate_all_edges (struct GNUNET_REGEX_Automaton *a,
+                               GNUNET_REGEX_KeyIterator iterator,
+                               void *iterator_cls);
+
+
 /**
  * Get the next states, starting from states 's'.
  *
@@ -140,6 +180,9 @@ GNUNET_REGEX_automaton_states_hash (struct GNUNET_REGEX_Automaton *a,
                                     struct GNUNET_REGEX_State **s,
                                     unsigned int count);
 
+
+
+
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif