Functions for setting and deleting configuration parameters in the database. More...
#include <string.h>#include <unistd.h>#include <assert.h>#include <sqlite3.h>#include <eurephia_nullsafe.h>#include <eurephia_context.h>#include <eurephia_log.h>#include <eurephia_values.h>#include <eurephia_xml.h>#include "../sqlite.h"
Include dependency graph for configuration.c:Go to the source code of this file.
Functions | |
| static int | config_set (eurephiaCTX *ctx, const char *key, const char *val) |
| static int | config_delete (eurephiaCTX *ctx, const char *key) |
| xmlDoc * | validate_key_value (eurephiaCTX *ctx, const char *key, const char *value) |
| xmlDoc * | eDBadminConfiguration (eurephiaCTX *ctx, xmlDoc *cfgxml) |
Functions for setting and deleting configuration parameters in the database.
Definition in file configuration.c.
| static int config_delete | ( | eurephiaCTX * | ctx, | |
| const char * | key | |||
| ) | [static] |
Internal function. Deletes a configuration parameter from the database.
| ctx | eurephiaCTX | |
| key | String (char *) containing the key to be deleted. |
< Messages intended when debugging. Only for log level > 10
< The context is used via the eurephiadm console utility
< The context is used via a web based utility
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Input data or processing revealed unexpected data. Log level never > 2
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 105 of file configuration.c.
Here is the call graph for this function:
Here is the caller graph for this function:| static int config_set | ( | eurephiaCTX * | ctx, | |
| const char * | key, | |||
| const char * | val | |||
| ) | [static] |
Internal function. Sets a configuration parameter in the database. If the key already exists, it will be replaced. This operation will immediately update the in-memory copy of the setting.
| ctx | eurephiaCTX | |
| key | String (char *) containing the key name of the value | |
| val | String (char *) with the value to be stored |
< Messages intended when debugging. Only for log level > 10
< The context is used via the eurephiadm console utility
< The context is used via a web based utility
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
< Alias for LOG_ERROR, in case it is not defined
< API errors but not sever, program can continue to run
Definition at line 57 of file configuration.c.
Here is the call graph for this function:
Here is the caller graph for this function:| xmlDoc* eDBadminConfiguration | ( | eurephiaCTX * | ctx, | |
| xmlDoc * | cfgxml | |||
| ) |
Set or delete configuration parameters in the database. This operation will also update the in-memory copy of the configuration
| ctx | eurephiaCTX | |
| cfgxml | XML document specifying the operation |
XML format skeleton for setting or deleting configuration parameters
<eurephia format="1"> <configuration> <set key="{name of the key}">{Value to be assigned}</set> <delete key="{name of the key"}/> </configuration> </eurephia>
Only one operation can be called per request to this function.
< Messages intended when debugging. Only for log level > 10
< The context is used via the eurephiadm console utility
< The context is used via a web based utility
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
< Alias for LOG_CRITICAL
< Operation failed and might have been aborted. Log level always 0
Definition at line 170 of file configuration.c.
Here is the call graph for this function:| xmlDoc* validate_key_value | ( | eurephiaCTX * | ctx, | |
| const char * | key, | |||
| const char * | value | |||
| ) |
Internal function. Validates if key or value strings are NULL or not.
| ctx | eurephiaCTX | |
| key | char pointer to the key string | |
| value | char pointer to the value string |
Definition at line 151 of file configuration.c.
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1