add is_plugin_enabled to application
This commit is contained in:
parent
0581df5245
commit
f7f7669e02
2 changed files with 11 additions and 1 deletions
|
|
@ -1046,6 +1046,13 @@ std::shared_ptr<abstract_plugin> application::get_plugin(const string& name) con
|
||||||
return my->_active_plugins[name];
|
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()
|
net::node_ptr application::p2p_node()
|
||||||
{
|
{
|
||||||
return my->_p2p_network;
|
return my->_p2p_network;
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,11 @@ namespace graphene { namespace app {
|
||||||
/// Emitted when syncing finishes (is_finished_syncing will return true)
|
/// Emitted when syncing finishes (is_finished_syncing will return true)
|
||||||
boost::signals2::signal<void()> syncing_finished;
|
boost::signals2::signal<void()> syncing_finished;
|
||||||
|
|
||||||
private:
|
|
||||||
void enable_plugin( const string& name );
|
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 );
|
void add_available_plugin( std::shared_ptr<abstract_plugin> p );
|
||||||
std::shared_ptr<detail::application_impl> my;
|
std::shared_ptr<detail::application_impl> my;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue