18#ifndef __TRINITY_SECRETMGR_H__
19#define __TRINITY_SECRETMGR_H__
60 explicit operator bool()
const {
return (state == PRESENT); }
63 bool IsAvailable()
const {
return (state != NOT_LOADED_YET) && (state != LOAD_FAILED); }
67 enum { NOT_LOADED_YET,
LOAD_FAILED, NOT_PRESENT, PRESENT } state = NOT_LOADED_YET;
83#define sSecretMgr SecretMgr::instance()
std::optional< T > Optional
Optional helper class to wrap optional values within.
@ SECRET_OWNER_BNETSERVER
@ SECRET_OWNER_WORLDSERVER
std::array< Secret, NUM_SECRETS > _secrets
Optional< std::string > AttemptTransition(Secrets i, Optional< BigNumber > const &newSecret, Optional< BigNumber > const &oldSecret, bool hadOldSecret) const
void AttemptLoad(Secrets i, LogLevel errorLevel, std::unique_lock< std::mutex > const &)
SecretMgr(SecretMgr const &)=delete
Secret const & GetSecret(Secrets i)
BigNumber const & operator*() const
BigNumber const * operator->() const