{
if (0 == this->role2surface.count(role))
{
- HMI_WARNING("wm", "invalid role");
+ HMI_NOTICE("wm", "invalid role %s : appID : %s", role.c_str(), this->id.c_str());
return INVALID_SURFACE_ID;
}
return this->role2surface.at(role);
std::string WMClient::role(unsigned surface) const
{
- for(const auto& [key, value] : this->role2surface)
+ for(const auto& x : this->role2surface)
{
- if(value == surface){
- return key;
+ if(x.second == surface)
+ {
+ return x.first;
}
}
return std::string("");
{
if (surface == x.second)
{
+ HMI_INFO("wm", "Remove surface from client %s: role %s, surface: %d",
+ this->id.c_str(), x.first.c_str(), x.second);
this->role2surface.erase(x.first);
ret = true;
break;
return ret;
}
+#ifndef GTEST_ENABLED
bool WMClient::subscribe(afb_req req, const string &evname)
{
if(evname != kKeyError){
HMI_DEBUG("wm", "afb_event_push failed: %m");
}
}
+#endif
void WMClient::dumpInfo()
{