diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-09-25 12:19:14 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-09-25 12:19:14 +0900 |
commit | d2c062959c55c61a4e350f6df480d46d2a8d769c (patch) | |
tree | 4b5c932b5d45ebf395b64a4bfccc67f5ce5bfc07 /src/wm_client.cpp | |
parent | 494d3a09bdbc74c9005db421122cc60acb733443 (diff) |
Implement attachApp
Change-Id: I4082fd400fd2f82fcb6cbbcc66d584fb0a572827
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/wm_client.cpp')
-rw-r--r-- | src/wm_client.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/wm_client.cpp b/src/wm_client.cpp index 84f9842..356cd6f 100644 --- a/src/wm_client.cpp +++ b/src/wm_client.cpp @@ -18,6 +18,8 @@ #include "wm_client.hpp" #include "util.hpp" #include <ilm/ilm_control.h> +#include <uuid/uuid.h> + #define INVALID_SURFACE_ID 0 @@ -188,6 +190,29 @@ WMError WMClient::setRenderOrder(const vector<string> &order) return ret; } +string WMClient::attachTmpServiceSurface(const string& supplier, const string& service_surface) +{ + string uuid; + uuid_t u; + char out[37]; // uuid is 36 characters + uuid_generate_random(u); + uuid_unparse(u, out); + uuid = out; + this->service2supplier.emplace(service_surface, supplier); + return uuid; +} + +WMError WMClient::attachServiceSurface(const string& service_surface, unsigned surface) +{ + WMError ret = WMError::NOT_REGISTERED; + if(this->service2supplier.count(service_surface) != 0) + { + this->service2surfaces.emplace(service_surface, surface); + ret = WMError::SUCCESS; + } + return ret; +} + #if GTEST_ENABLED bool WMClient::subscribe(afb_req req, const string &evname) { |