Change names. Not use sequence number but request number
[apps/agl-service-windowmanager.git] / src / wm-client.hpp
index 3680d8f..459822d 100644 (file)
@@ -30,6 +30,11 @@ extern "C"
 namespace wm
 {
 
+enum WM_CLIENT_ERROR_EVENT
+{
+    UNKNOWN_ERROR
+};
+
 class WMClient
 {
   public:
@@ -46,6 +51,9 @@ class WMClient
     bool removeSurfaceIfExist(unsigned surfaceID);
     bool removeRole(const std::string& role);
 
+    bool subscribe(afb_req req, const std::string &event_name);
+    void emitError(WM_CLIENT_ERROR_EVENT ev);
+
     void dumpInfo();
 
   private:
@@ -54,9 +62,9 @@ class WMClient
     std::unordered_map<std::string, unsigned> role2surface;
 #if GTEST_ENABLED
     // This is for unit test. afb_make_event occurs sig11 if call not in afb-binding
-    std::unordered_map<std::string, std::string> event_list;
+    std::unordered_map<std::string, std::string> event2list;
 #else
-    std::unordered_map<std::string, struct afb_event> event_list;
+    std::unordered_map<std::string, struct afb_event> event2list;
 #endif
 };
 } // namespace wm