Add global error event
[apps/agl-service-windowmanager.git] / src / app.hpp
index 7782e04..25a72cb 100644 (file)
@@ -158,7 +158,9 @@ struct App
         Event_SyncDraw,
         Event_FlushDraw,
 
-        Event_Val_Max = Event_FlushDraw,
+        Event_Error,
+
+        Event_Val_Max = Event_Error,
     };
 
     const std::vector<const char *> kListEventName{
@@ -167,7 +169,8 @@ struct App
         "visible",
         "invisible",
         "syncdraw",
-        "flushdraw"};
+        "flushdraw",
+        "error"};
 
     struct controller_hooks chooks;
 
@@ -233,6 +236,7 @@ struct App
     //static int processTimerHandler(sd_event_source *s, uint64_t usec, void *userdata);
     void timerHandler();
     void removeClient(const std::string &appid);
+    bool subscribeEventForApp(const std::string &appid, afb_req req, const std::string &evname);
 
   private:
     optional<int> lookup_id(char const *name);