Waiting for the surface of new app is created before setting the size
[apps/agl-service-windowmanager.git] / src / app.hpp
index 57ffee2..13bc421 100644 (file)
@@ -128,6 +128,14 @@ struct id_allocator {
    }
 };
 
+typedef struct CarInfo {
+    bool parking_brake_stt;
+    bool accel_pedal_stt;
+    double accel_pedal_pos;
+    const char *car_stt;
+    bool headlamp_stt;
+} CarInfo;
+
 struct App {
 
    typedef std::unordered_map<uint32_t, struct compositor::rect> rect_map;
@@ -234,24 +242,26 @@ struct App {
    void surface_created(uint32_t surface_id);
    void surface_removed(uint32_t surface_id);
 
+   void setAccelPedalPos(double val);
+
 private:
-#if 1 // @@@@@
    PolicyManager pm_;
    LayoutManager lm_;
    std::unordered_map<std::string, int> role2surfaceid_;
    std::unordered_map<std::string, std::string> app2role_;
+   std::unordered_map<std::string, std::string> role2app_;
    std::unordered_map<int, int> appid2role_;
+   CarInfo crr_car_info_;
 
    int allocateSurface();
    void setSurfaceSize(const char* role, const char* area);
-   std::string roleToApp(std::string role);
    int loadAppDb();
 
 #if 0
    struct id_allocator app_id_alloc_;
    std::unordered_map<std::string, int> appname2appid_;
 #endif
-#endif
+
    optional<int> lookup_id(char const *name);
    optional<std::string> lookup_name(int id);