chiark / gitweb /
debian/control: Add Build-Depends for PulseAudio.
[disorder] / lib / kvp.h
index 745304b75f58f704f4921391efb0cf271b432468..732a8a68623613be96154d3a0d3c95a57baaffeb 100644 (file)
--- a/lib/kvp.h
+++ b/lib/kvp.h
 struct dynstr;
 struct sink;
 
+/** @brief Linked list of key-value pairs */
 struct kvp {
-  struct kvp *next;                    /* next entry */
-  const char *name;                    /* name */
-  const char *value;                   /* value */
+  /** @brief Next entry */
+  struct kvp *next;
+
+  /** @brief Name
+   *
+   * Might not be unique.  Must not be null.
+   */
+  const char *name;
+
+  /** @brief Value
+   *
+   * Must not be null.
+   */
+  const char *value;
 };
 
 struct kvp *kvp_urldecode(const char *ptr, size_t n);
@@ -59,6 +71,8 @@ char *urlencodestring(const char *s);
 char *urldecodestring(const char *s, size_t ns);
 struct kvp *kvp_make(const char *key, ...);
 
+void kvp_free(struct kvp *k);
+
 #endif /* KVP_H */
 
 /*