Logic::Logic(const Configuration &conf) : m_socketClient(PathConfig::SocketPath::client, std::make_shared<ProtocolClient>()), m_cache(conf.getCacheSize()), m_monitoringEnabled(conf.monitoringEnabled()) { auto naiveInterpreter = std::make_shared<NaiveInterpreter>(); for (auto &descr : naiveInterpreter->getSupportedPolicyDescr()) { m_cache.registerPlugin(descr, naiveInterpreter); } }
Logic::Logic(cynara_status_callback callback, void *userStatusData, const Configuration &conf) : m_statusCallback(callback, userStatusData), m_cache(conf.getCacheSize()), m_socketClient(PathConfig::SocketPath::client, std::make_shared<ProtocolClient>()), m_operationPermitted(true), m_inAnswerCancelResponseCallback(false) { auto naiveInterpreter = std::make_shared<NaiveInterpreter>(); for (auto &descr : naiveInterpreter->getSupportedPolicyDescr()) { m_cache.registerPlugin(descr, naiveInterpreter); } }