add nick name for cached records
[oweals/gnunet.git] / src / regex / regex_block_lib.h
index dec02520509089c512d98790bcc79e3240cdbd25..4ea4c0765a61eeed00f9c29bf27c3ebffbffe6e6 100644 (file)
@@ -40,6 +40,12 @@ extern "C"
 #include "block_regex.h"
 
 
+/**
+ * Representation of a Regex node (and edges) in the DHT.
+ */
+struct RegexBlock;
+
+
 /**
  * Edge representation.
  */
@@ -100,7 +106,7 @@ REGEX_BLOCK_check (const struct RegexBlock *block,
  * @param cls Closure.
  * @param token Token that follows to next state.
  * @param len Length of token.
- * @param key Hash of next state. 
+ * @param key Hash of next state.
  *
  * @return GNUNET_YES if should keep iterating, GNUNET_NO otherwise.
  */
@@ -137,7 +143,7 @@ REGEX_BLOCK_iterate (const struct RegexBlock *block,
  *
  * @param block block to get the key from
  * @param block_len number of bytes in block
- * @param query where to store the key
+ * @param key where to store the key
  * @return GNUNET_OK on success, GNUNET_SYSERR if the block is malformed
  */
 int
@@ -146,6 +152,17 @@ REGEX_BLOCK_get_key (const struct RegexBlock *block,
                     struct GNUNET_HashCode *key);
 
 
+/**
+ * Test if this block is marked as being an accept state.
+ *
+ * @param block block to test
+ * @param size number of bytes in block
+ * @return GNUNET_YES if the block is accepting, GNUNET_NO if not
+ */
+int
+GNUNET_BLOCK_is_accepting (const struct RegexBlock *block,
+                          size_t block_len);
+
 
 /**
  * Construct a regex block to be stored in the DHT.