diff options
-rw-r--r-- | src/app.cpp | 17 | ||||
-rw-r--r-- | src/app.hpp | 5 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/app.cpp b/src/app.cpp index 8d094ff..9e27ea8 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -414,7 +414,7 @@ void App::set_timer(){ CLOCK_REALTIME, time(NULL) + TIME_OUT, 0, processTimerHandler, this); if (ret < 0) { - HMI_ERROR("wm", "Can't set timer"); + HMI_ERROR("wm", "Could't set timer"); } } else @@ -425,6 +425,15 @@ void App::set_timer(){ } } +void App::stop_timer(){ + unsigned seq = app_list.currentSequenceNumber(); + HMI_SEQ_DEBUG(seq, "Timer stop"); + int rc = sd_event_source_set_enabled(timer_ev_src, SD_EVENT_OFF); + if(rc < 0){ + HMI_SEQ_ERROR(seq, "Timer stop failed"); + } +} + bool App::do_allocate_window_resource(unsigned request_seq) { /* @@ -459,7 +468,7 @@ bool App::do_allocate_window_resource(unsigned request_seq) return ret; } -void App::lm_layout_change(unsigned req, const char* drawing_name) +void App::lm_layout_change(unsigned req_num, const char* drawing_name) { auto const &surface_id = this->lookup_id(drawing_name); auto layer_id = this->layers.get_layer_id(*surface_id); @@ -604,7 +613,7 @@ void App::lm_layout_change(unsigned req, const char* drawing_name) } } -const char* App::lm_check_surface_exist(unsigned req, const char* drawing_name) +const char* App::check_surface_exist(unsigned req_num, const char* drawing_name) { auto const &surface_id = this->lookup_id(drawing_name); if (!surface_id) @@ -691,7 +700,7 @@ void App::api_activate_surface(char const *appid, char const *drawing_name, char bool ret = this->do_allocate_window_resource(new_req); // layer manager task - const char* msg = this->lm_check_surface_exist(new_req, drawing_name); // this function will be integrated in do_allocate_window_resource() + const char* msg = this->check_surface_exist(new_req, drawing_name); // this function will be integrated in do_allocate_window_resource() if(msg){ HMI_SEQ_DEBUG(new_req,"surface doesn't exist"); diff --git a/src/app.hpp b/src/app.hpp index a7fb70c..5f6ec83 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -247,6 +247,8 @@ struct App { void do_enddraw(unsigned sequence_number); void process_request(); void set_timer(); + void stop_timer(); + const char *check_surface_exist(unsigned req_num, const char *drawing_name); void activate(int id); void deactivate(int id); @@ -259,9 +261,8 @@ struct App { // The following function is temporary. // Then will be removed when layermanager is finished - void lm_layout_change(unsigned req, const char* drawing_name); + void lm_layout_change(unsigned req_num, const char* drawing_name); void lm_enddraw(const char* drawing_name); - const char *lm_check_surface_exist(unsigned req, const char *drawing_name); }; } // namespace wm |