diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-12 21:44:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-12 21:44:22 +0000 |
commit | 997b729e8cbd05f51bac7dcd795ca7b35aa5e551 (patch) | |
tree | 9f884f259b3916eeea3bef9b662db50160077413 /src/include/gnunet_configuration_lib.h | |
parent | 530b55e3cf376821a4e28cfdd86f82e151c6f28f (diff) | |
download | gnunet-997b729e8cbd05f51bac7dcd795ca7b35aa5e551.tar.gz gnunet-997b729e8cbd05f51bac7dcd795ca7b35aa5e551.zip |
adding function to compute configuration differences in memory
Diffstat (limited to 'src/include/gnunet_configuration_lib.h')
-rw-r--r-- | src/include/gnunet_configuration_lib.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 77d6d5552..0c87a537d 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -154,6 +154,7 @@ int | |||
154 | GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | 154 | GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, |
155 | const char *filename); | 155 | const char *filename); |
156 | 156 | ||
157 | |||
157 | /** | 158 | /** |
158 | * Write only configuration entries that have been changed to configuration file | 159 | * Write only configuration entries that have been changed to configuration file |
159 | * @param cfgDefault default configuration | 160 | * @param cfgDefault default configuration |
@@ -167,6 +168,21 @@ GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle | |||
167 | const struct GNUNET_CONFIGURATION_Handle | 168 | const struct GNUNET_CONFIGURATION_Handle |
168 | *cfgNew, const char *filename); | 169 | *cfgNew, const char *filename); |
169 | 170 | ||
171 | |||
172 | /** | ||
173 | * Compute configuration with only entries that have been changed | ||
174 | * | ||
175 | * @param cfgDefault original configuration | ||
176 | * @param cfgNew new configuration | ||
177 | * @return configuration with only the differences, never NULL | ||
178 | */ | ||
179 | struct GNUNET_CONFIGURATION_Handle * | ||
180 | GNUNET_CONFIGURATION_get_diff (const struct GNUNET_CONFIGURATION_Handle | ||
181 | *cfgDefault, | ||
182 | const struct GNUNET_CONFIGURATION_Handle | ||
183 | *cfgNew); | ||
184 | |||
185 | |||
170 | /** | 186 | /** |
171 | * Test if there are configuration options that were | 187 | * Test if there are configuration options that were |
172 | * changed since the last save. | 188 | * changed since the last save. |