21 #ifndef INCLUDE_OLAD_PLUGIN_H_
22 #define INCLUDE_OLAD_PLUGIN_H_
24 #include <ola/plugin_id.h>
44 virtual bool LoadPreferences() = 0;
47 virtual string PreferenceSource()
const = 0;
49 virtual bool IsEnabled()
const = 0;
51 virtual bool Start() = 0;
53 virtual bool Stop() = 0;
55 virtual ola_plugin_id Id()
const = 0;
57 virtual string Name()
const = 0;
59 virtual string Description()
const = 0;
61 virtual void ConflictsWith(std::set<ola_plugin_id> *conflict_set) = 0;
69 AbstractPlugin*, bool> {
71 return x->Id() < y->Id();
80 m_plugin_adaptor(plugin_adaptor),
86 bool LoadPreferences();
87 string PreferenceSource()
const;
88 bool IsEnabled()
const;
92 virtual bool DefaultMode()
const {
return true; }
93 virtual ola_plugin_id Id()
const = 0;
96 virtual string PluginPrefix()
const = 0;
99 virtual void ConflictsWith(std::set<ola_plugin_id>*) {}
102 return Id() < other.Id();
106 virtual bool StartHook() {
return 0; }
107 virtual bool StopHook() {
return 0; }
108 virtual bool SetDefaultPreferences() {
return true; }
112 static const char ENABLED_KEY[];
124 #endif // INCLUDE_OLAD_PLUGIN_H_