summaryrefslogtreecommitdiffstats
path: root/src/window_manager.cpp
diff options
context:
space:
mode:
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2018-11-29 13:12:43 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-11-30 17:44:40 +0000
commitd9dc8ef258ed2ddeeca83775eee945dbfdae59c5 (patch)
treed2a8853847e48925c0ecbb82e58be0a3e52a6e36 /src/window_manager.cpp
parentc5b67725974af99e50fa5dc02843c7d741add880 (diff)
Migrates bindings v3
This patch migrates biding API of WM to v3. Change-Id: I2f2b23a8af437a414e2a00d629d3e72d0614eb72 Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Diffstat (limited to 'src/window_manager.cpp')
-rw-r--r--src/window_manager.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index cc6f410..cd7d2e5 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -136,7 +136,7 @@ int WindowManager::init()
// Make afb event
for (int i = Event_Val_Min; i <= Event_Val_Max; i++)
{
- map_afb_event[kListEventName[i]] = afb_daemon_make_event(kListEventName[i].c_str());
+ map_afb_event[kListEventName[i]] = afb_api_make_event(afbBindingV3root, kListEventName[i].c_str());
}
const struct rect css_bg = this->lc->getAreaSize("fullscreen");
@@ -378,9 +378,9 @@ void WindowManager::api_enddraw(char const *appid, char const *drawing_name)
}
}
-int WindowManager::api_subscribe(afb_req req, int event_id)
+int WindowManager::api_subscribe(afb_req_t req, int event_id)
{
- struct afb_event event = this->map_afb_event[kListEventName[event_id]];
+ afb_event_t event = this->map_afb_event[kListEventName[event_id]];
return afb_req_subscribe(req, event);
}
@@ -839,6 +839,13 @@ void WindowManager::emitScreenUpdated(unsigned req_num)
HMI_SEQ_DEBUG(req_num, "emit screen updated");
bool found = false;
auto actions = g_app_list.getActions(req_num, &found);
+ if (!found)
+ {
+ HMI_SEQ_ERROR(req_num,
+ "Window Manager bug :%s : Action is not set",
+ errorDescription(WMError::NO_ENTRY));
+ return;
+ }
// create json object
json_object *j = json_object_new_object();
@@ -874,7 +881,7 @@ void WindowManager::setTimer()
if (g_timer_ev_src == nullptr)
{
// firsttime set into sd_event
- int ret = sd_event_add_time(afb_daemon_get_event_loop(), &g_timer_ev_src,
+ int ret = sd_event_add_time(afb_api_get_event_loop(afbBindingV3root), &g_timer_ev_src,
CLOCK_BOOTTIME, (uint64_t)(ts.tv_sec + kTimeOut) * 1000000ULL, 1, processTimerHandler, this);
if (ret < 0)
{