Rename the arguments
[apps/agl-service-windowmanager.git] / src / wm-client.cpp
index 13dae6f..753b1d0 100644 (file)
@@ -37,12 +37,11 @@ static const char kKeyrole[] = "role";
 static const char kKeyError[] = "error";
 static const char kKeyErrorDesc[] = "kErrorDescription";
 
-WMClient::WMClient(const string &appid, unsigned layerID, unsigned surfaceID, const string &role)
-    : layer(layerID),
-      id(appid),
+WMClient::WMClient(const string &appid, unsigned layer, unsigned surface, const string &role)
+    : id(appid), layer(layer),
       role2surface(0)
 {
-    role2surface[role] = surfaceID;
+    role2surface[role] = surface;
     for (auto x : kWMEvents)
     {
 #if GTEST_ENABLED
@@ -76,12 +75,12 @@ WMClient::~WMClient()
 {
 }
 
-string WMClient::appID()
+string WMClient::appID() const
 {
     return this->id;
 }
 
-unsigned WMClient::surfaceID(const string &role)
+unsigned WMClient::surfaceID(const string &role) const
 {
     if (0 == this->role2surface.count(role))
     {
@@ -91,14 +90,14 @@ unsigned WMClient::surfaceID(const string &role)
     return this->role2surface.at(role);
 }
 
-unsigned WMClient::layerID()
+unsigned WMClient::layerID() const
 {
     return this->layer;
 }
 
-void WMClient::registerLayer(unsigned layerID)
+void WMClient::registerLayer(unsigned layer)
 {
-    this->layer = layerID;
+    this->layer = layer;
 }
 
 bool WMClient::addSurface(const string &role, unsigned surface)
@@ -112,12 +111,12 @@ bool WMClient::addSurface(const string &role, unsigned surface)
     return true;
 }
 
-bool WMClient::removeSurfaceIfExist(unsigned surfaceID)
+bool WMClient::removeSurfaceIfExist(unsigned surface)
 {
     bool ret = false;
     for (auto &x : this->role2surface)
     {
-        if (surfaceID == x.second)
+        if (surface == x.second)
         {
             this->role2surface.erase(x.first);
             ret = true;