git.droids-corp.org
/
protos
/
libecoli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use helper in cmd node
[protos/libecoli.git]
/
lib
/
ecoli_config.h
diff --git
a/lib/ecoli_config.h
b/lib/ecoli_config.h
index
44e32c8
..
96e47b3
100644
(file)
--- a/
lib/ecoli_config.h
+++ b/
lib/ecoli_config.h
@@
-8,6
+8,7
@@
#include <sys/queue.h>
#include <stdbool.h>
#include <stdint.h>
#include <sys/queue.h>
#include <stdbool.h>
#include <stdint.h>
+#include <stdio.h>
#ifndef EC_COUNT_OF //XXX
#define EC_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / \
#ifndef EC_COUNT_OF //XXX
#define EC_COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / \
@@
-109,6
+110,16
@@
void ec_config_schema_dump(FILE *out, const struct ec_config_schema *schema,
/* config */
/* config */
+/**
+ * Get the type of the configuration.
+ *
+ * @param config
+ * The configuration.
+ * @return
+ * The configuration type.
+ */
+enum ec_config_type ec_config_get_type(const struct ec_config *config);
+
/**
* Create a boolean configuration value.
*
/**
* Create a boolean configuration value.
*
@@
-264,7
+275,7
@@
int ec_config_cmp(const struct ec_config *config1,
/**
* Get configuration value.
*/
/**
* Get configuration value.
*/
-struct ec_config *ec_config_get(const struct ec_config *config,
+struct ec_config *ec_config_
dict_
get(const struct ec_config *config,
const char *key);
/**
const char *key);
/**
@@
-314,6
+325,17
@@
void ec_config_free(struct ec_config *config);
int ec_config_cmp(const struct ec_config *value1,
const struct ec_config *value2);
int ec_config_cmp(const struct ec_config *value1,
const struct ec_config *value2);
+/**
+ * Duplicate a configuration.
+ *
+ * @param config
+ * The configuration to duplicate.
+ * @return
+ * The duplicated configuration, or NULL on error (errno is set).
+ */
+struct ec_config *
+ec_config_dup(const struct ec_config *config);
+
/**
* Dump a configuration.
*
/**
* Dump a configuration.
*