smap: New functions smap_from_json(), smap_to_json().
[openvswitch] / lib / smap.h
index 993d0b2434617bad3a81ec8e24b9bb6d4b4737c7..8510a3761efabda1a127f680e64d1e8a36935931 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "hmap.h"
 
+struct json;
+
 /* A map from string to string. */
 struct smap {
     struct hmap map;           /* Contains "struct smap_node"s. */
@@ -57,7 +59,10 @@ int smap_get_int(const struct smap *smap, const char *key, int def);
 bool smap_is_empty(const struct smap *);
 size_t smap_count(const struct smap *);
 
-void smap_clone(struct smap *dst, struct smap *src);
+void smap_clone(struct smap *dst, const struct smap *src);
 const struct smap_node **smap_sort(const struct smap *);
 
+void smap_from_json(struct smap *, const struct json *);
+struct json *smap_to_json(const struct smap *);
+
 #endif /* smap.h */