Update wm_layer
[apps/agl-service-windowmanager-2017.git] / src / wm_layer.hpp
index b14be46..4002c4b 100644 (file)
@@ -56,11 +56,14 @@ class WMLayer
         STACK
     };
 
-    explicit WMLayer(json_object* j);
+    explicit WMLayer(json_object* j, unsigned uuid);
     ~WMLayer() = default;
+
+    // Status & Setting API
     unsigned getNewLayerID(const std::string& role);
     unsigned idBegin() { return this->id_begin; }
     unsigned idEnd()   { return this->id_end; }
+    unsigned getUuid() { return this->uuid; }
     const std::string& layerName();
     MANAGEMENT_TYPE    layerType() { return this->type; }
     void appendArea(const std::string& area);
@@ -69,9 +72,15 @@ class WMLayer
     WMError setLayerState(const LayerState& l);
     bool hasLayerID(unsigned id);
     bool hasRole(const std::string& role);
+
+    // Manipulation
+    void addLayer(unsigned layer);
+    WMError commitChange();
+
   private:
     LayerState tmp_state;
     LayerState state;
+    unsigned uuid;
     std::string name = ""; // Layer name
     MANAGEMENT_TYPE type;
     std::string role_list;