mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 18:33:54 +00:00
31 lines
628 B
C++
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)
|