示例#1
0
文件: Logic.cpp 项目: Samsung/cynara
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);
    }
}
示例#2
0
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);
    }
}