- void Read(bool bail, const std::string &useruid);
-
- /** Read a file into a file_cache object
- */
- bool ReadFile(file_cache &F, const char* fname);
-
- /* Returns true if the given string starts with a windows drive letter
- */
- bool StartsWithWindowsDriveLetter(const std::string &path);
-
- /** Report a configuration error given in errormessage.
- * @param bail If this is set to true, the error is sent to the console, and the program exits
- * @param useruid If this is set to a non-empty value which is a valid UID, and bail is false,
- * the errors are spooled to this user as SNOTICEs.
- * If the parameter is not a valid UID, the messages are spooled to all opers.
- */
- void ReportConfigError(const std::string &errormessage, bool bail, const std::string &useruid);
-
- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(ConfigDataHash &target, FILE* &conf, const char* filename, std::ostringstream &errorstream);
-
- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(ConfigDataHash &target, FILE* &conf, const std::string &filename, std::ostringstream &errorstream);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(ConfigDataHash &target, const char* tag, const char* var, int index, char* result, int length, bool allow_linefeeds = false);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(ConfigDataHash &target, const char* tag, const char* var, const char* default_value, int index, char* result, int length, bool allow_linefeeds = false);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(ConfigDataHash &target, const std::string &tag, const std::string &var, int index, std::string &result, bool allow_linefeeds = false);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index, std::string &result, bool allow_linefeeds = false);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(ConfigDataHash &target, const char* tag, const char* var, int index, int &result);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(ConfigDataHash &target, const char* tag, const char* var, const char* default_value, int index, int &result);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(ConfigDataHash &target, const std::string &tag, const std::string &var, int index, int &result);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index, int &result);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(ConfigDataHash &target, const char* tag, const char* var, int index);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(ConfigDataHash &target, const char* tag, const char* var, const char* default_value, int index);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(ConfigDataHash &target, const std::string &tag, const std::string &var, int index);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index);
-
- /** Returns the number of occurences of tag in the config file
- */
- int ConfValueEnum(ConfigDataHash &target, const char* tag);
- /** Returns the number of occurences of tag in the config file
- */
- int ConfValueEnum(ConfigDataHash &target, const std::string &tag);
-
- /** Returns the numbers of vars inside the index'th 'tag in the config file
- */
- int ConfVarEnum(ConfigDataHash &target, const char* tag, int index);
- /** Returns the numbers of vars inside the index'th 'tag in the config file
- */
- int ConfVarEnum(ConfigDataHash &target, const std::string &tag, int index);