21 #ifndef INCLUDE_OLAD_PLUGIN_H_
22 #define INCLUDE_OLAD_PLUGIN_H_
25 #include <ola/plugin_id.h>
75 virtual bool Start() = 0;
83 virtual bool Stop() = 0;
89 virtual ola_plugin_id
Id()
const = 0;
95 virtual std::string
Name()
const = 0;
103 virtual void ConflictsWith(std::set<ola_plugin_id> *conflict_set)
const = 0;
111 AbstractPlugin*, bool> {
113 return x->
Id() < y->
Id();
122 m_plugin_adaptor(plugin_adaptor),
132 virtual bool Start();
135 virtual bool DefaultMode()
const {
return true; }
136 virtual ola_plugin_id
Id()
const = 0;
146 virtual void ConflictsWith(std::set<ola_plugin_id>*)
const {}
149 return Id() < other.
Id();
153 virtual bool StartHook() {
return 0; }
154 virtual bool StopHook() {
return 0; }
163 static const char ENABLED_KEY[];
175 #endif // INCLUDE_OLAD_PLUGIN_H_
virtual bool Stop()
Stop the plugin.
Definition: Plugin.cpp:99
virtual void SetEnabledState(bool enable)=0
Set the plugin's enabled state.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
bool IsEnabled() const
Is the plugin enabled?
Definition: Plugin.cpp:70
bool LoadPreferences()
Load the preferences for a plugin and set defaults.
Definition: Plugin.cpp:33
void SetEnabledState(bool enable)
Set the plugin's enabled state.
Definition: Plugin.cpp:74
std::string PreferenceConfigLocation() const
The location for preferences.
Definition: Plugin.cpp:66
virtual bool LoadPreferences()=0
Load the preferences for a plugin and set defaults.
Definition: PluginAdaptor.h:41
virtual ola_plugin_id Id() const =0
Get the plugin ID of this plugin.
virtual std::string PluginPrefix() const =0
The prefix to use for storing configuration files.
virtual bool Start()
Start the plugin.
Definition: Plugin.cpp:79
virtual bool SetDefaultPreferences()
Definition: Plugin.h:159
virtual bool Start()=0
Start the plugin.
Definition: Preferences.h:145
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
virtual std::string PreferenceConfigLocation() const =0
The location for preferences.
virtual bool Stop()=0
Stop the plugin.
virtual std::string Description() const =0
virtual bool IsEnabled() const =0
Is the plugin enabled?
virtual ola_plugin_id Id() const =0
Get the plugin ID of this plugin.
virtual std::string Name() const =0
Get the plugin name.