/**
* Duplicate an existing configuration object.
*
- * @param c configuration to duplicate
+ * @param cfg configuration to duplicate
* @return duplicate configuration
*/
struct GNUNET_CONFIGURATION_Handle *
-GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *c);
+GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
const char *filename);
+/**
+ * Write only configuration entries that have been changed to configuration file
+ * @param cfgDefault default configuration
+ * @param cfgNew new configuration
+ * @param filename where to write the configuration diff between default and new
+ * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ */
+int
+GNUNET_CONFIGURATION_write_diffs(const struct GNUNET_CONFIGURATION_Handle *cfgDefault,
+ const struct GNUNET_CONFIGURATION_Handle *cfgNew,
+ const char* filename);
/**
* Test if there are configuration options that were
const char *option,
unsigned long long *number);
+
/**
* Get a configuration value that should be a relative time.
*
const char *option,
struct GNUNET_TIME_Relative *time);
+
/**
* Test if we have a value for a particular option
*
int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg,
const char *section, const char *option);
+
/**
* Get a configuration value that should be a string.
*
*cfg, const char *section,
const char *option, char **value);
+
/**
* Get a configuration value that should be the name of a file
* or directory.
* "FOO" is set to "DIRECTORY".
*
* @param cfg configuration to use for path expansion
- * @param old string to $-expand (will be freed!)
+ * @param orig string to $-expand (will be freed!)
* @return $-expanded string
*/
char *GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
- *cfg, char *old);
+ *cfg, char *orig);
+
/**
* Set a configuration value that should be a number.