Files
nwipe/src/conf.h
PartialVolume f12ee921b8 PDFGen36_Add_Optional_Org_Customer_Preview_Prior_To_Drive_Selection.
Added new options in GUI config menu to display preview of
organisation, customer, date/time at startup prior to drive
selection. This preview is disabled as default but can be
enabled in the config menu.

The purpose of the preview is to allow the user to check &
update as required the organisation details, customer &
current date/time so that the details provided on the PDF
certificate/report are correct.
2023-10-14 22:22:14 +01:00

53 lines
1.5 KiB
C

#ifndef CONF_H_
#define CONF_H_
/**
* Initialises the libconfig code, called once at the
* start of nwipe, prior to any attempts to access
* nwipe's config file /etc/nwipe/nwipe.conf
* @param none
* @return int
* 0 = success
* -1 = error
*/
int nwipe_conf_init();
/**
* Before exiting nwipe, this function should be called
* to free up libconfig's memory usage
* @param none
* @return void
*/
void nwipe_conf_close();
void save_selected_customer( char** );
/**
* int nwipe_conf_update_setting( char *, char * );
* Use this function to update a setting in nwipe.conf
* @param char * this is the group name and setting name separated by a period '.'
* i.e "PDF_Certificate.PDF_Enable"
* @param char * this is the setting, i.e ENABLED
* @return int 0 = Success
* 1 = Unable to update memory copy
* 2 = Unable to write new configuration to /etc/nwipe/nwipe.conf
*/
int nwipe_conf_update_setting( char*, char* );
/**
* int nwipe_conf_read_setting( char *, char *, const char ** )
* Use this function to read a setting value in nwipe.conf
* @param char * this is the group name
* @param char * this is the setting name
* @param char ** this is a pointer to the setting value
* @return int 0 = Success
* -1 = Unable to find the specified group name
* -2 = Unable to find the specified setting name
*/
int nwipe_conf_read_setting( char*, const char** );
#define FIELD_LENGTH 256
#define NUMBER_OF_FIELDS 4
#endif /* CONF_H_ */