From d31270592190870d13c98460d351697350c67cc2 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Mon, 14 May 2018 10:07:58 +0900 Subject: [Local]:1st step for blocking sequence * add new class to allocate window resource * add new class for list to hold clients information * change API of request surface Change-Id: Ic39fa8908163d49b429125639189dd89812f94e9 Signed-off-by: Kazumasa Mitsunari --- src/app.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/app.cpp') diff --git a/src/app.cpp b/src/app.cpp index 937da6a..53a645e 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -35,6 +35,8 @@ #include #include +#include "windowmanager-client.hpp" +#include "allocate_queue.hpp" namespace wm { @@ -58,6 +60,7 @@ const char kKeyHeightPixel[] = "height_pixel"; const char kKeyWidthMm[] = "width_mm"; const char kKeyHeightMm[] = "height_mm"; +static AllocateRequestList allocate_list; namespace { @@ -705,7 +708,7 @@ void App::emit_invisible(char const *label) { void App::emit_visible(char const *label) { return emit_visible(label, true); } -result App::api_request_surface(char const *drawing_name) { +result App::api_request_surface(char const *drawing_name, char const * appid, int flag) { auto lid = this->layers.get_layer_id(std::string(drawing_name)); if (!lid) { /** @@ -731,6 +734,10 @@ result App::api_request_surface(char const *drawing_name) { HMI_DEBUG("wm", "Set main_surface id to %u", id); } + // add client into the db + WMClient* client = new WMClient(appid, *lid, id, drawing_name); // role is drawing_name for now + allocate_list.addClient(client); + return Ok(id); } -- cgit 1.2.3-korg