osquery-1/include/osquery/config/plugin.h
mike@arpaia.co fb2591d82a #143
2014-09-15 11:09:33 -07:00

31 lines
628 B
C++

// Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include <future>
#include <utility>
#include "osquery/registry.h"
#include "osquery/status.h"
namespace osquery {
class ConfigPlugin {
public:
virtual std::pair<osquery::Status, std::string> genConfig() = 0;
virtual ~ConfigPlugin() {}
protected:
ConfigPlugin() {};
};
}
DECLARE_REGISTRY(ConfigPlugins,
std::string,
std::shared_ptr<osquery::ConfigPlugin>)
#define REGISTERED_CONFIG_PLUGINS REGISTRY(ConfigPlugins)
#define REGISTER_CONFIG_PLUGIN(name, decorator) \
REGISTER(ConfigPlugins, name, decorator)