convert fs publish to MQ
[oweals/gnunet.git] / src / include / gnunet_pq_lib.h
index 39c288f5ae667703bda9ec007487fe2c5090ef4c..4e4139b431de402451dfc0fc016b063439b55da9 100644 (file)
@@ -102,6 +102,16 @@ GNUNET_PQ_query_param_fixed_size (const void *ptr,
                                  size_t ptr_size);
 
 
+
+/**
+ * Generate query parameter for a string.
+ *
+ * @param ptr pointer to the string query parameter to pass
+ */
+struct GNUNET_PQ_QueryParam
+GNUNET_PQ_query_param_string (const char *ptr);
+
+
 /**
  * Generate fixed-size query parameter with size determined
  * by variable type.
@@ -189,8 +199,7 @@ GNUNET_PQ_query_param_uint64 (const uint64_t *x);
  * @param[out] dst where to store the result
  * @return
  *   #GNUNET_YES if all results could be extracted
- *   #GNUNET_NO if at least one result was NULL
- *   #GNUNET_SYSERR if a result was invalid (non-existing field)
+ *   #GNUNET_SYSERR if a result was invalid (non-existing field or NULL)
  */
 typedef int
 (*GNUNET_PQ_ResultConverter)(void *cls,
@@ -321,6 +330,18 @@ GNUNET_PQ_result_spec_variable_size (const char *name,
                                     size_t *sptr);
 
 
+/**
+ * 0-terminated string expected.
+ *
+ * @param name name of the field in the table
+ * @param[out] dst where to store the result, allocated
+ * @return array entry for the result specification to use
+ */
+struct GNUNET_PQ_ResultSpec
+GNUNET_PQ_result_spec_string (const char *name,
+                              char **dst);
+
+
 /**
  * RSA public key expected.
  *