From 5cf6f65044c27a69e70d795d75e826ce3f0b97a1 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 2 Sep 2019 15:17:30 +0100 Subject: Document ConfigStatus and add a way to detect the initial load. --- include/configreader.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configreader.h b/include/configreader.h index 511bedbee..a891f98f7 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -490,13 +490,23 @@ class CoreExport ConfigReaderThread : public Thread bool IsDone() { return done; } }; +/** Represents the status of a config load. */ class CoreExport ConfigStatus { public: + /** Whether this is the initial config load. */ + bool const initial; + + /** The user who initiated the config load or NULL if not initiated by a user. */ User* const srcuser; - ConfigStatus(User* user = NULL) - : srcuser(user) + /** Initializes a new instance of the ConfigStatus class. + * @param user The user who initiated the config load or NULL if not initiated by a user. + * @param isinitial Whether this is the initial config load. + */ + ConfigStatus(User* user = NULL, bool isinitial = false) + : initial(isinitial) + , srcuser(user) { } }; -- cgit v1.2.3