g_afb_instance->app.controller->surfaces.erase(sid);
HMI_DEBUG("wm", "delete surfaceID %d", sid);
}
+ g_afb_instance->app.removeClient(ctxt->name);
delete ctxt;
}
HMI_DEBUG("wm", "You're %s.", ctxt->name.c_str());
if (ctxt->name != std::string(a_drawing_name))
{
- afb_req_fail_f(req, "failed", "Don't request with other name: %s for now", a_drawing_name);
+ afb_req_fail_f(req, "failed", "Dont request with other name: %s for now", a_drawing_name);
HMI_DEBUG("wm", "Don't request with other name: %s for now", a_drawing_name);
return;
}
}
- auto ret = g_afb_instance->app.api_request_surface(a_drawing_name);
+ auto ret = g_afb_instance->app.api_request_surface(
+ afb_req_get_application_id(req), a_drawing_name);
if (isFirstReq)
{
}
char const *a_ivi_id = json_object_get_string(j_ivi_id);
- auto ret = g_afb_instance->app.api_request_surface(a_drawing_name, a_ivi_id);
+ auto ret = g_afb_instance->app.api_request_surface(
+ afb_req_get_application_id(req), a_drawing_name, a_ivi_id);
if (ret != nullptr)
{
afb_req_fail(req, "failed", ret);
return;
}
- g_afb_instance->app.api_activate_surface(a_drawing_name, a_drawing_area,
- [&req](const char *errmsg) {
- if (errmsg != nullptr)
- {
- HMI_ERROR("wm", errmsg);
- afb_req_fail(req, "failed", errmsg);
- return;
- }
- afb_req_success(req, NULL, "success");
- });
+ g_afb_instance->app.api_activate_surface(
+ afb_req_get_application_id(req),
+ a_drawing_name, a_drawing_area,
+ [&req](const char *errmsg) {
+ if (errmsg != nullptr)
+ {
+ HMI_ERROR("wm", errmsg);
+ afb_req_fail(req, "failed", errmsg);
+ return;
+ }
+ afb_req_success(req, NULL, "success");
+ });
}
catch (std::exception &e)
{
- HMI_WARNING("wm", "failed", "Uncaught exception while calling activatesurface: %s", e.what());
+ HMI_WARNING("wm", "failed: Uncaught exception while calling activatesurface: %s", e.what());
+ g_afb_instance->app.exceptionProcessForTransition();
return;
}
}
return;
}
- g_afb_instance->app.api_deactivate_surface(a_drawing_name,
- [&req](const char *errmsg) {
- if (errmsg != nullptr)
- {
- HMI_ERROR("wm", errmsg);
- afb_req_fail(req, "failed", errmsg);
- return;
- }
- afb_req_success(req, NULL, "success");
- });
+ g_afb_instance->app.api_deactivate_surface(
+ afb_req_get_application_id(req), a_drawing_name,
+ [&req](const char *errmsg) {
+ if (errmsg != nullptr)
+ {
+ HMI_ERROR("wm", errmsg);
+ afb_req_fail(req, "failed", errmsg);
+ return;
+ }
+ afb_req_success(req, NULL, "success");
+ });
}
catch (std::exception &e)
{
- HMI_WARNING("wm", "Uncaught exception while calling deactivatesurface: %s", e.what());
+ HMI_WARNING("wm", "failed: Uncaught exception while calling deactivatesurface: %s", e.what());
+ g_afb_instance->app.exceptionProcessForTransition();
return;
}
}
}
afb_req_success(req, NULL, "success");
- g_afb_instance->app.api_enddraw(a_drawing_name);
+ g_afb_instance->app.api_enddraw(
+ afb_req_get_application_id(req), a_drawing_name);
}
catch (std::exception &e)
{
- HMI_WARNING("wm", "failed", "Uncaught exception while calling enddraw: %s", e.what());
+ HMI_WARNING("wm", "failed: Uncaught exception while calling enddraw: %s", e.what());
+ g_afb_instance->app.exceptionProcessForTransition();
return;
}
}