diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2020-07-03 22:37:42 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-14 15:56:00 +0200 |
commit | 0f2ac01f3d935435f9fa0e3d1fb7e038fb0c19fa (patch) | |
tree | 9481b67bd57b9fd1b1d499253c920d623393fc70 /src/include/gnunet_configuration_lib.h | |
parent | c15f75419f4d2b40aa787b6ad2f4d48dcd0dc9b2 (diff) | |
download | gnunet-0f2ac01f3d935435f9fa0e3d1fb7e038fb0c19fa.tar.gz gnunet-0f2ac01f3d935435f9fa0e3d1fb7e038fb0c19fa.zip |
Add function to return GNUnet's default configuration
It's for convenience when applications call `GNUNET_OS_init', after which it's
impossible to obtain GNUnet's configuration without manually checking the
filesystem.
With this function it's possible to get the configuration regardless of the
state of the application.
Diffstat (limited to 'src/include/gnunet_configuration_lib.h')
-rw-r--r-- | src/include/gnunet_configuration_lib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 302429430..b5ceb5b94 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -101,6 +101,18 @@ GNUNET_CONFIGURATION_load_from (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
101 | 101 | ||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Return GNUnet's default configuration. A new configuration is allocated | ||
105 | * each time and it's up to the caller to destroy it when done. This function | ||
106 | * returns GNUnet's configuration even when #GNUNET_OS_init has been called | ||
107 | * with a value different from #GNUNET_OS_project_data_default. | ||
108 | * | ||
109 | * @return a freshly allocated configuration | ||
110 | */ | ||
111 | struct GNUNET_CONFIGURATION_Handle * | ||
112 | GNUNET_CONFIGURATION_default(void); | ||
113 | |||
114 | |||
115 | /** | ||
104 | * Parse a configuration file, add all of the options in the | 116 | * Parse a configuration file, add all of the options in the |
105 | * file to the configuration environment. | 117 | * file to the configuration environment. |
106 | * | 118 | * |