Ensure wm_subscribe returns the correct value
[apps/agl-service-windowmanager.git] / src / wm_layer.hpp
index 83a5e74..1521309 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
+ * Copyright (c) 2019 Konsulko Group
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,6 +35,7 @@ class LayerState
   public:
     LayerState();
     ~LayerState() = default;
+    const std::unordered_map<std::string, std::string> getCurrentState();
     const std::vector<unsigned> getIviIdList();
     void addLayer(unsigned layer);
     void removeLayer(unsigned layer);
@@ -64,11 +66,14 @@ class WMLayer
     WMError setLayerState(const LayerState& l);
     bool hasLayerID(unsigned id);
     bool hasRole(const std::string& role);
+    void setRemote(const bool newRemote) { remote = newRemote; }
+    bool isRemote(void) { return remote; }
 
     // Manipulation
     void addLayerToState(unsigned layer);
     void removeLayerFromState(unsigned layer);
     void attachAppToArea(const std::string& app, const std::string& area);
+    std::string attachedApp(const std::string& area);
     void update();
     void undo();
 
@@ -88,6 +93,7 @@ class WMLayer
     std::vector<unsigned>    id_list;
     unsigned id_begin;
     unsigned id_end;
+    bool remote = false;
 };
 
 } // namespace wm