diff options
author | lloyd <[email protected]> | 2006-12-14 11:12:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-12-14 11:12:32 +0000 |
commit | 2b32d88fabd0cf45cb42981dd03258b39d1828c4 (patch) | |
tree | db8549290d367b6eef4ff62ff4bc62357135afe4 /src/libstate.cpp | |
parent | 780243495bda65e52f8f1797a3db0a25e420998b (diff) |
Move the UI pulse functions into the global library state. That is (as best
as I can tell) the last of the global data, with the exception of the single
global_lib_state pointer in libstate.cpp
Diffstat (limited to 'src/libstate.cpp')
-rw-r--r-- | src/libstate.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libstate.cpp b/src/libstate.cpp index c9db23be8..e8d47be24 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -292,6 +292,24 @@ X509_GlobalState& Library_State::x509_state() } /************************************************* +* Set the UI object state * +*************************************************/ +void Library_State::set_ui(UI* new_ui) + { + delete ui; + ui = new_ui; + } + +/************************************************* +* Send a pulse to the UI object * +*************************************************/ +void Library_State::pulse(Pulse_Type pulse_type) const + { + if(ui) + ui->pulse(pulse_type); + } + +/************************************************* * Set the configuration object * *************************************************/ Config& Library_State::config() const @@ -348,6 +366,7 @@ Library_State::Library_State(Mutex_Factory* mutex_factory) rng = 0; cached_default_allocator = 0; x509_state_obj = 0; + ui = 0; } /************************************************* @@ -360,6 +379,7 @@ Library_State::~Library_State() delete rng; delete timer; delete config_obj; + delete ui; std::for_each(entropy_sources.begin(), entropy_sources.end(), del_fun<EntropySource>()); |