18#ifndef __TRINITY_SECRETMGR_H__
19#define __TRINITY_SECRETMGR_H__
64 explicit operator bool()
const {
return (state == PRESENT); }
67 bool IsAvailable()
const {
return (state != NOT_LOADED_YET) && (state != LOAD_FAILED); }
71 enum { NOT_LOADED_YET,
LOAD_FAILED, NOT_PRESENT, PRESENT } state = NOT_LOADED_YET;
81 void AttemptLoad(
Secrets i,
LogLevel errorLevel, std::scoped_lock<std::mutex>
const&);
87#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
SecretMgr & operator=(SecretMgr const &)=delete
SecretMgr(SecretMgr &&)=delete
SecretMgr(SecretMgr const &)=delete
SecretMgr & operator=(SecretMgr &&)=delete
BigNumber const & operator*() const
BigNumber const * operator->() const