X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb_binding_api.cpp;h=735a572411975885af2c237e48d3d65ab569b5f7;hb=72295a67230bceb2777fca41fda92098acc15fab;hp=88616d506d1633b1bd2c5d293c8d14bde92ffad1;hpb=860d9537b74f6fe406d21d3da753a3d09b995557;p=apps%2Fagl-service-windowmanager-2017.git diff --git a/src/afb_binding_api.cpp b/src/afb_binding_api.cpp index 88616d5..735a572 100644 --- a/src/afb_binding_api.cpp +++ b/src/afb_binding_api.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Mentor Graphics Development (Deutschland) GmbH + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,9 @@ using json = nlohmann::json; #include namespace wm { -// _ _ _ _ _ _ _ -// | |__ (_)_ __ __| (_)_ __ __ _ __ _ _ __ (_) (_)_ __ ___ _ __ | | -// | '_ \| | '_ \ / _` | | '_ \ / _` | / _` | '_ \| | | | '_ ` _ \| '_ \| | -// | |_) | | | | | (_| | | | | | (_| | | (_| | |_) | | | | | | | | | |_) | | -// |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___\__,_| .__/|_| |_|_| |_| |_| .__/|_| -// |___/_____| |_| |_| +/** + * binding_api impl + */ binding_api::result_type binding_api::requestsurface( char const *drawing_name) { auto r = this->app->api_request_surface(drawing_name); @@ -41,6 +38,16 @@ binding_api::result_type binding_api::requestsurface( return Ok(json_object_new_int(r.unwrap())); } +binding_api::result_type binding_api::requestsurfacexdg( + char const *drawing_name, char const *ivi_id) { + auto r = this->app->api_request_surface(drawing_name, ivi_id); + if (r != nullptr) { + HMI_DEBUG("wm", "%s failed with error: %s", __func__, r); + return Err(r); + } + return Ok(json_object_new_object()); +} + binding_api::result_type binding_api::activatesurface( char const *drawing_name, char const *drawing_area) { HMI_DEBUG("wm", "%s drawing_name %s, drawing_area %s", __func__, drawing_name, drawing_area); @@ -100,7 +107,7 @@ binding_api::result_type binding_api::debug_status() { binding_api::result_type binding_api::debug_terminate() { HMI_DEBUG("wm", "%s", __func__); if (getenv("WINMAN_DEBUG_TERMINATE") != nullptr) { - raise(SIGKILL); // XXX afb-daemon kills it's pgroup using TERM, which + raise(SIGKILL); // afb-daemon kills it's pgroup using TERM, which // doesn't play well with perf } return Ok(json_object_new_object());