add is_plugin_enabled to application

This commit is contained in:
Srdjan Obucina 2019-09-06 16:43:24 +02:00
parent 0581df5245
commit f7f7669e02
2 changed files with 11 additions and 1 deletions

View file

@ -1046,6 +1046,13 @@ std::shared_ptr<abstract_plugin> application::get_plugin(const string& name) con
return my->_active_plugins[name];
}
bool application::is_plugin_enabled(const string& name) const
{
if(my->_active_plugins.find(name) == my->_active_plugins.end())
return false;
return true;
}
net::node_ptr application::p2p_node()
{
return my->_p2p_network;

View file

@ -95,8 +95,11 @@ namespace graphene { namespace app {
/// Emitted when syncing finishes (is_finished_syncing will return true)
boost::signals2::signal<void()> syncing_finished;
private:
void enable_plugin( const string& name );
bool is_plugin_enabled(const string& name) const;
private:
void add_available_plugin( std::shared_ptr<abstract_plugin> p );
std::shared_ptr<detail::application_impl> my;