}
}
- 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){
wmClientCtxt* ctxt = new wmClientCtxt(a_drawing_name);
}
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;
return;
}
- auto ret = g_afb_instance->app.api_activate_surface(a_drawing_name, a_drawing_area);
- if (ret != nullptr) {
- afb_req_fail(req, "failed", ret);
- return;
- }
+ 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");
+ });
- afb_req_success(req, NULL, "success");
} catch (std::exception &e) {
- afb_req_fail_f(req, "failed", "Uncaught exception while calling activatesurface: %s", e.what());
+ HMI_WARNING("wm", "failed", "Uncaught exception while calling activatesurface: %s", e.what());
return;
}
return;
}
- auto ret = g_afb_instance->app.api_deactivate_surface(a_drawing_name);
- if (ret != nullptr) {
- afb_req_fail(req, "failed", ret);
- return;
- }
+ 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");
+ });
- afb_req_success(req, NULL, "success");
} catch (std::exception &e) {
- afb_req_fail_f(req, "failed", "Uncaught exception while calling deactivatesurface: %s", e.what());
+ HMI_WARNING("wm", "Uncaught exception while calling deactivatesurface: %s", e.what());
return;
}
}
afb_req_fail(req, "failed", "Need char const* argument drawing_name");
return;
}
+ afb_req_success(req, NULL, "success");
- auto ret = g_afb_instance->app.api_enddraw(a_drawing_name);
- if (ret != nullptr) {
- afb_req_fail(req, "failed", ret);
- return;
- }
+ g_afb_instance->app.api_enddraw(
+ afb_req_get_application_id(req), a_drawing_name);
- afb_req_success(req, NULL, "success");
} catch (std::exception &e) {
- afb_req_fail_f(req, "failed", "Uncaught exception while calling enddraw: %s", e.what());
+ HMI_WARNING("wm", "failed", "Uncaught exception while calling enddraw: %s", e.what());
return;
}
const struct afb_verb_v2 windowmanager_verbs[] = {
{ "requestsurface", windowmanager_requestsurface, nullptr, nullptr, AFB_SESSION_NONE },
{ "requestsurfacexdg", windowmanager_requestsurfacexdg, nullptr, nullptr, AFB_SESSION_NONE },
- { "activatesurface", windowmanager_activatesurface, nullptr, nullptr, AFB_SESSION_NONE },
- { "deactivatesurface", windowmanager_deactivatesurface, nullptr, nullptr, AFB_SESSION_NONE },
- { "enddraw", windowmanager_enddraw, nullptr, nullptr, AFB_SESSION_NONE },
+ { "activatesurface", windowmanager_activatesurface, nullptr, nullptr, AFB_SESSION_LOA_1 },
+ { "deactivatesurface", windowmanager_deactivatesurface, nullptr, nullptr, AFB_SESSION_LOA_1 },
+ { "enddraw", windowmanager_enddraw, nullptr, nullptr, AFB_SESSION_LOA_1 },
{ "getdisplayinfo", windowmanager_getdisplayinfo_thunk, nullptr, nullptr, AFB_SESSION_NONE },
- { "getareainfo", windowmanager_getareainfo_thunk, nullptr, nullptr, AFB_SESSION_NONE },
+ { "getareainfo", windowmanager_getareainfo_thunk, nullptr, nullptr, AFB_SESSION_LOA_1 },
{ "wm_subscribe", windowmanager_wm_subscribe, nullptr, nullptr, AFB_SESSION_NONE },
{ "list_drawing_names", windowmanager_list_drawing_names, nullptr, nullptr, AFB_SESSION_NONE },
{ "ping", windowmanager_ping, nullptr, nullptr, AFB_SESSION_NONE },